Repository navigation
fix(claude): drop prefill and forced tool_choice where Anthropic rejects them - #5555
Draft
caiotheodoro wants to merge 1 commit into
Draft
caiotheodoro wants to merge 1 commit into
caiotheodoro wants to merge 1 commit into
Conversation
…cts them Same rule #5524 applied to providers/anthropic, extended to every other provider serving these models.
Contributor
SDK live feature checksResult: failed (85/85 scenarios) Informational — does not block merge.
Failures
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#5524 removed
assistant_prefill(Claude 4.6+) and forcedtool_choice(Opus/Sonnet 5.5) fromproviders/anthropic. The same models on every other provider still declare them, so the gateway offers features that return 400.flowchart TD F[Claude file on a non-Anthropic provider] --> V{model >= 4.6?} V -->|yes| AP[drop assistant_prefill<br/>Anthropic returns 400] V -->|no| K1[keep] F --> O{Opus or Sonnet 5.5?} O -->|yes| TC["drop tool_choice<br/>(forced tool / any rejected;<br/>auto stays via function_calling)"] O -->|no| K2[keep] AP --> S{"file in an open PR?<br/>5505, 5542, 5514, trueforge 5544"} TC --> S S -->|yes| L[left to that PR] S -->|no| E[edited here]85 files, deletions only: aws-bedrock 36 | microsoft-foundry 13 | google-vertex 11 | azure-ai-foundry 8 | databricks 7 | aws-bedrock-mantle 5 | openrouter 5.
Not here: files already fixed in open PRs (#5505, #5542, #5514).
eu.anthropic.claude-sonnet-5-5is also in trueforge's #5544, which is left alone.Evidence
tool_choicetypetool/anynot supported.autostill works throughfunction_calling.Merge Danger
Door: two-way
Blast Radius: features
Clients asking the gateway for prefill or forced tool choice on these models get the feature reported as unsupported instead of a provider 400.