Skip to content

fix(anthropic): drop unsupported assistant_prefill and forced tool_choice - #5524

Merged
bhaveshpatel640 merged 2 commits into
mainfrom
fix/anthropic-drop-unsupported-features
Oct 16, 2026
Merged

bhaveshpatel640 merged 2 commits into
mainfrom
fix/anthropic-drop-unsupported-features

Conversation

@bhaveshpatel640

@bhaveshpatel640 bhaveshpatel640 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Remove assistant_prefill from Claude 4.6+ / later models that Anthropic documents as unsupported.
  • Remove tool_choice from claude-opus-5-5 and claude-sonnet-5-5, which reject forced tool / any (auto still works via function_calling).
  • Catalog-only change; no harness/SDK updates in this PR.

Models

assistant_prefill removed (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-6
  • claude-opus-4-7, claude-opus-4-8
  • claude-opus-5, claude-sonnet-5, claude-fable-5
  • claude-opus-5-5, claude-sonnet-5-5

tool_choice removed (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-5

Evidence

Test plan

  • Confirm YAML diffs are feature-list only
  • Optional: live smoke on one prefill-removed model and one 5.5 model (tools with auto still pass; prefill / forced tool_choice scenarios 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_prefill is 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_choice is removed only from claude-opus-5-5 and claude-sonnet-5-5, which do not support forced tool / any modes. function_calling remains, so automatic tool use via auto is still represented.

Catalog-only change to features lists; 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.

…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
bhaveshpatel640 marked this pull request as ready for review October 15, 2026 13:49
Comment thread providers/anthropic/claude-fable-5.yaml
Comment thread providers/anthropic/claude-sonnet-5-5.yaml
@github-actions

Copy link
Copy Markdown
Contributor

SDK live feature checks

Result: passed (213 scenarios)

Informational — does not block merge.

Model Pass Fail
anthropic/claude-fable-5 23 0
anthropic/claude-opus-4-6 22 0
anthropic/claude-opus-4-7 23 0
anthropic/claude-opus-4-8 23 0
anthropic/claude-opus-5-5 24 0
anthropic/claude-opus-5 25 0
anthropic/claude-sonnet-4-6 22 0
anthropic/claude-sonnet-5-5 24 0
anthropic/claude-sonnet-5 27 0

@bhaveshpatel640
bhaveshpatel640 merged commit e9acde7 into main Oct 16, 2026
4 checks passed
@bhaveshpatel640
bhaveshpatel640 deleted the fix/anthropic-drop-unsupported-features branch October 16, 2026 06:53
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants