Repository navigation
fix(anthropic): drop unsupported assistant_prefill and forced tool_choice - #5524
Merged
Merged
Conversation
…oice Claude 4.6+ rejects assistant message prefill; Opus/Sonnet 5.5 reject tool_choice types tool/any. Align catalogue features with Anthropic docs and live API behavior. Co-authored-by: Cursor <cursoragent@cursor.com>
bhaveshpatel640
marked this pull request as ready for review
October 15, 2026 13:49
caiotheodoro
approved these changes
Oct 15, 2026
LordGameleo
reviewed
Oct 15, 2026
LordGameleo
reviewed
Oct 15, 2026
LordGameleo
approved these changes
Oct 15, 2026
Contributor
SDK live feature checksResult: passed (213 scenarios) Informational — does not block merge.
|
caiotheodoro
added a commit
that referenced
this pull request
Oct 16, 2026
Bedrock cross-region inference profiles (us./eu./jp./au./global.) already have their own files with these prices; as `region` values they fail the schema. Restored the base file's costs from main. #5524: Anthropic rejects these on this model (prefill: Claude 4.6+, forced tool_choice: Opus/Sonnet 5.5).
caiotheodoro
added a commit
that referenced
this pull request
Oct 16, 2026
#5524: Anthropic rejects these on this model (prefill: Claude 4.6+, forced tool_choice: Opus/Sonnet 5.5). `auto` still works through function_calling. Price $8/$40 matches https://platform.claude.com/docs/en/build-with-claude/fast-mode (fetched 2026-10-16).
caiotheodoro
added a commit
that referenced
this pull request
Oct 16, 2026
#5524: Anthropic rejects these on this model (prefill: Claude 4.6+, forced tool_choice: Opus/Sonnet 5.5).
caiotheodoro
added a commit
that referenced
this pull request
Oct 16, 2026
The managed generator keeps only flat rates (models-agent updation/job/providers/truefoundry_managed/generate.py `max_public_costs`), so this run dropped `tiered_pricing` and `priority_pricing`: requests past 272k (GPT-6) / 200k (grok-4.7) tokens would bill at the base rate. Restored those cost blocks from main (flat rates there are unchanged). #5524: Anthropic rejects these on this model (prefill: Claude 4.6+, forced tool_choice: Opus/Sonnet 5.5).
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
assistant_prefillfrom Claude 4.6+ / later models that Anthropic documents as unsupported.tool_choicefromclaude-opus-5-5andclaude-sonnet-5-5, which reject forcedtool/any(autostill works viafunction_calling).Models
assistant_prefillremoved (docs: “Prefilling is not supported on Claude 4.6 and later models… Requests using prefill with these models return a 400 error.” — Messages API):claude-opus-4-6,claude-sonnet-4-6claude-opus-4-7,claude-opus-4-8claude-opus-5,claude-sonnet-5,claude-fable-5claude-opus-5-5,claude-sonnet-5-5tool_choiceremoved (docs:tool_choice: type"tool"and"any"are not supported for this model. — Sonnet 5.5 migration, API primer):claude-opus-5-5,claude-sonnet-5-5Evidence
tool_choiceon these model IDsTest plan
autostill pass; prefill / forcedtool_choicescenarios no longer planned)Note
Low Risk
YAML feature-catalog edits only; aligns metadata with documented API limits and should reduce incorrect capability signaling rather than changing runtime request code.
Overview
Updates Anthropic provider YAML so advertised capabilities match what the live API accepts on newer Claude models.
assistant_prefillis removed from nine model definitions (Claude 4.6+ through Fable/Opus/Sonnet 5.x, including 5.5 variants). Anthropic returns HTTP 400 when prefill is used on these models; dropping the flag avoids planning or advertising that path.tool_choiceis removed only fromclaude-opus-5-5andclaude-sonnet-5-5, which do not support forcedtool/anymodes.function_callingremains, so automatic tool use viaautois still represented.Catalog-only change to
featureslists; no harness or SDK logic in this diff.Reviewed by Cursor Bugbot for commit 4ebf48f. Bugbot is set up for automated code reviews on this repo. Configure here.