Repository navigation
A deployment that refuses reasoning_effort none on tool requests too is not sent none again (#1353) - #1372
Conversation
…is not sent none again (deeplethe#1353) Signed-off-by: Quintin Botes <quintinbotes@outlook.com>
WaylandYang
left a comment
There was a problem hiding this comment.
Thanks, this is the follow-up from #1368. One tightening: the clear at lib.rs:931 fires on any 400 from the retry, so an unrelated 400 there (context length, a bad tool schema) also forgets none, and the next tool call pays an extra 400 to learn it again. Please clear it only when the retry's error mentions reasoning_effort, and add a test where an unrelated 400 keeps the flag.
…ed 400 keeps it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Quintin Botes <quintinbotes@outlook.com>
|
Done in ccb8fc3: the flag is cleared only when the retry's error mentions |
|
The clear is now limited to a retry that is refused for |
|
Description updated. |
WaylandYang
left a comment
There was a problem hiding this comment.
Thanks, the description matches the code now. Merging.
Refs #1353: the optional point from the review of #1368.
Why
#1368 learns
reasoning_effort: "none"for tool requests from the first refusal. If the retry withnoneis refused too, the deployment rejectsnoneas well, and the flag would make every later tool request carry a value that cannot work.What changes
post_tools, a 400 on the retry whose error mentionsreasoning_effortclearstools_without_effortbefore returning the error, so later tool requests go back to the configured effort. Any other 400 on the retry (context length, a bad tool schema) keeps the flag, so the next tool call does not pay an extra 400 to learn it again.How it was checked
a_deployment_that_refuses_none_too_is_not_sent_none_again: an endpoint that refuses every tool body getslow, thennone, the call fails, and the next tool body carrieslowagain.rust:1on top ofdevc929083:cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warnings(no warnings) andcargo test --locked --workspace(1,657 passed).Before review
git commit -s)cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warningsandcargo test --workspacepass