Skip to content

fix(claude): drop prefill and forced tool_choice where Anthropic rejects them - #5555

Draft
caiotheodoro wants to merge 1 commit into
mainfrom
fix/claude-unsupported-features
Draft

caiotheodoro wants to merge 1 commit into
mainfrom
fix/claude-unsupported-features

Conversation

@caiotheodoro

@caiotheodoro caiotheodoro commented Oct 16, 2026 •

Copy link
Copy Markdown

Summary

#5524 removed assistant_prefill (Claude 4.6+) and forced tool_choice (Opus/Sonnet 5.5) from providers/anthropic. The same models on every other provider still declare them, so the gateway offers features that return 400.

 features:
-    - assistant_prefill     # Claude >= 4.6          77 files
-    - tool_choice           # Opus / Sonnet 5.5      20 files
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]
Loading

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-5 is also in trueforge's #5544, which is left alone.

Evidence

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.

…cts them

Same rule #5524 applied to providers/anthropic, extended to every other
provider serving these models.
@github-actions

Copy link
Copy Markdown
Contributor

SDK live feature checks

Result: failed (85/85 scenarios)

Informational — does not block merge.

Model Pass Fail
aws-bedrock-mantle/anthropic.claude-opus-4-7 0 1
aws-bedrock-mantle/anthropic.claude-opus-4-8 0 1
aws-bedrock-mantle/anthropic.claude-opus-5-5 0 1
aws-bedrock-mantle/anthropic.claude-opus-5 0 1
aws-bedrock-mantle/anthropic.claude-sonnet-5 0 1
aws-bedrock/au.anthropic.claude-fable-5 0 1
aws-bedrock/au.anthropic.claude-opus-4-6-v1 0 1
aws-bedrock/au.anthropic.claude-opus-4-7 0 1
aws-bedrock/au.anthropic.claude-opus-4-8 0 1
aws-bedrock/au.anthropic.claude-opus-5-5 0 1
aws-bedrock/au.anthropic.claude-opus-5 0 1
aws-bedrock/au.anthropic.claude-sonnet-4-6 0 1
aws-bedrock/au.anthropic.claude-sonnet-5-5 0 1
aws-bedrock/au.anthropic.claude-sonnet-5 0 1
aws-bedrock/eu.anthropic.claude-opus-4-6-v1 0 1
aws-bedrock/eu.anthropic.claude-opus-4-7 0 1
aws-bedrock/eu.anthropic.claude-opus-4-8 0 1
aws-bedrock/eu.anthropic.claude-opus-5-5 0 1
aws-bedrock/eu.anthropic.claude-opus-5 0 1
aws-bedrock/eu.anthropic.claude-sonnet-4-6 0 1
aws-bedrock/eu.anthropic.claude-sonnet-5 0 1
aws-bedrock/global.anthropic.claude-fable-5 0 1
aws-bedrock/global.anthropic.claude-opus-4-6-v1 0 1
aws-bedrock/global.anthropic.claude-opus-4-8 0 1
aws-bedrock/global.anthropic.claude-opus-5-5 0 1
aws-bedrock/global.anthropic.claude-opus-5 0 1
aws-bedrock/global.anthropic.claude-sonnet-4-6 0 1
aws-bedrock/global.anthropic.claude-sonnet-5-5 0 1
aws-bedrock/global.anthropic.claude-sonnet-5 0 1
aws-bedrock/in.anthropic.claude-opus-5 0 1
aws-bedrock/jp.anthropic.claude-opus-4-7 0 1
aws-bedrock/jp.anthropic.claude-opus-4-8 0 1
aws-bedrock/jp.anthropic.claude-opus-5-5 0 1
aws-bedrock/jp.anthropic.claude-sonnet-4-6 0 1
aws-bedrock/us.anthropic.claude-fable-5 0 1
aws-bedrock/us.anthropic.claude-opus-4-6-v1 0 1
aws-bedrock/us.anthropic.claude-opus-4-8 0 1
aws-bedrock/us.anthropic.claude-opus-5-5 0 1
aws-bedrock/us.anthropic.claude-opus-5 0 1
aws-bedrock/us.anthropic.claude-sonnet-4-6 0 1
aws-bedrock/us.anthropic.claude-sonnet-5-5 0 1
azure-ai-foundry/claude-opus-4-7 0 1
azure-ai-foundry/claude-opus-4-8 0 1
azure-ai-foundry/claude-opus-5-2 0 1
azure-ai-foundry/claude-opus-5-5-2 0 1
azure-ai-foundry/claude-opus-5-5 0 1
azure-ai-foundry/claude-opus-5 0 1
azure-ai-foundry/claude-sonnet-4-6 0 1
azure-ai-foundry/claude-sonnet-5 0 1
databricks/databricks-claude-opus-4-6 0 1
databricks/databricks-claude-opus-4-7 0 1
databricks/databricks-claude-sonnet-4-6 0 1
databricks/databricks-claude-sonnet-5 0 1
databricks/system.ai.claude-opus-4-6 0 1
databricks/system.ai.claude-opus-4-7 0 1
databricks/system.ai.claude-sonnet-4-6 0 1
google-vertex/anthropic/claude-fable-5 0 1
google-vertex/anthropic/claude-opus-4-6 0 1
google-vertex/anthropic/claude-opus-4-6@default 0 1
google-vertex/anthropic/claude-opus-4-7 0 1
google-vertex/anthropic/claude-opus-4-8 0 1
google-vertex/anthropic/claude-opus-5-5 0 1
google-vertex/anthropic/claude-opus-5 0 1
google-vertex/anthropic/claude-sonnet-4-6 0 1
google-vertex/anthropic/claude-sonnet-4-6@default 0 1
google-vertex/anthropic/claude-sonnet-5-5 0 1
google-vertex/anthropic/claude-sonnet-5 0 1
microsoft-foundry/claude-fable-5-1 0 1
microsoft-foundry/claude-fable-5 0 1
microsoft-foundry/claude-opus-4-7 0 1
microsoft-foundry/claude-opus-4-8-2 0 1
microsoft-foundry/claude-opus-4-8 0 1
microsoft-foundry/claude-opus-5-2 0 1
microsoft-foundry/claude-opus-5-5-2 0 1
microsoft-foundry/claude-opus-5-5 0 1
microsoft-foundry/claude-opus-5 0 1
microsoft-foundry/claude-sonnet-4-6 0 1
microsoft-foundry/claude-sonnet-5-2 0 1
microsoft-foundry/claude-sonnet-5-5-2 0 1
microsoft-foundry/claude-sonnet-5-5 0 1
openrouter/anthropic/claude-opus-4.7 0 1
openrouter/anthropic/claude-opus-5.5 0 1
openrouter/anthropic/claude-opus-5.5:batch 0 1
openrouter/anthropic/claude-sonnet-5.5 0 1
openrouter/anthropic/claude-sonnet-5.5:batch 0 1

Failures

  • aws-bedrock-mantle/anthropic.claude-opus-4-7 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock-mantle/anthropic.claude-opus-4-8 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock-mantle/anthropic.claude-opus-5-5 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock-mantle/anthropic.claude-opus-5 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock-mantle/anthropic.claude-sonnet-5 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/au.anthropic.claude-fable-5 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/au.anthropic.claude-opus-4-6-v1 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/au.anthropic.claude-opus-4-7 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/au.anthropic.claude-opus-4-8 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/au.anthropic.claude-opus-5-5 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/au.anthropic.claude-opus-5 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/au.anthropic.claude-sonnet-4-6 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/au.anthropic.claude-sonnet-5-5 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/au.anthropic.claude-sonnet-5 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/eu.anthropic.claude-opus-4-6-v1 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/eu.anthropic.claude-opus-4-7 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/eu.anthropic.claude-opus-4-8 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/eu.anthropic.claude-opus-5-5 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/eu.anthropic.claude-opus-5 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/eu.anthropic.claude-sonnet-4-6 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/eu.anthropic.claude-sonnet-5 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/global.anthropic.claude-fable-5 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/global.anthropic.claude-opus-4-6-v1 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/global.anthropic.claude-opus-4-8 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/global.anthropic.claude-opus-5-5 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/global.anthropic.claude-opus-5 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/global.anthropic.claude-sonnet-4-6 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/global.anthropic.claude-sonnet-5-5 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/global.anthropic.claude-sonnet-5 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/in.anthropic.claude-opus-5 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/jp.anthropic.claude-opus-4-7 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/jp.anthropic.claude-opus-4-8 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/jp.anthropic.claude-opus-5-5 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/jp.anthropic.claude-sonnet-4-6 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/us.anthropic.claude-fable-5 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/us.anthropic.claude-opus-4-6-v1 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/us.anthropic.claude-opus-4-8 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/us.anthropic.claude-opus-5-5 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/us.anthropic.claude-opus-5 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/us.anthropic.claude-sonnet-4-6 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • aws-bedrock/us.anthropic.claude-sonnet-5-5 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • azure-ai-foundry/claude-opus-4-7 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • azure-ai-foundry/claude-opus-4-8 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • azure-ai-foundry/claude-opus-5-2 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • azure-ai-foundry/claude-opus-5-5-2 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • azure-ai-foundry/claude-opus-5-5 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • azure-ai-foundry/claude-opus-5 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • azure-ai-foundry/claude-sonnet-4-6 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • azure-ai-foundry/claude-sonnet-5 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • databricks/databricks-claude-opus-4-6 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • databricks/databricks-claude-opus-4-7 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • databricks/databricks-claude-sonnet-4-6 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • databricks/databricks-claude-sonnet-5 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • databricks/system.ai.claude-opus-4-6 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • databricks/system.ai.claude-opus-4-7 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • databricks/system.ai.claude-sonnet-4-6 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • google-vertex/anthropic/claude-fable-5 setup: missing GitHub secret / env VERTEX_KEY_FILE
  • google-vertex/anthropic/claude-opus-4-6 setup: missing GitHub secret / env VERTEX_KEY_FILE
  • google-vertex/anthropic/claude-opus-4-6@default setup: missing GitHub secret / env VERTEX_KEY_FILE
  • google-vertex/anthropic/claude-opus-4-7 setup: missing GitHub secret / env VERTEX_KEY_FILE
  • google-vertex/anthropic/claude-opus-4-8 setup: missing GitHub secret / env VERTEX_KEY_FILE
  • google-vertex/anthropic/claude-opus-5-5 setup: missing GitHub secret / env VERTEX_KEY_FILE
  • google-vertex/anthropic/claude-opus-5 setup: missing GitHub secret / env VERTEX_KEY_FILE
  • google-vertex/anthropic/claude-sonnet-4-6 setup: missing GitHub secret / env VERTEX_KEY_FILE
  • google-vertex/anthropic/claude-sonnet-4-6@default setup: missing GitHub secret / env VERTEX_KEY_FILE
  • google-vertex/anthropic/claude-sonnet-5-5 setup: missing GitHub secret / env VERTEX_KEY_FILE
  • google-vertex/anthropic/claude-sonnet-5 setup: missing GitHub secret / env VERTEX_KEY_FILE
  • microsoft-foundry/claude-fable-5-1 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • microsoft-foundry/claude-fable-5 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • microsoft-foundry/claude-opus-4-7 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • microsoft-foundry/claude-opus-4-8-2 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • microsoft-foundry/claude-opus-4-8 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • microsoft-foundry/claude-opus-5-2 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • microsoft-foundry/claude-opus-5-5-2 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • microsoft-foundry/claude-opus-5-5 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • microsoft-foundry/claude-opus-5 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • microsoft-foundry/claude-sonnet-4-6 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • microsoft-foundry/claude-sonnet-5-2 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • microsoft-foundry/claude-sonnet-5-5-2 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • microsoft-foundry/claude-sonnet-5-5 setup: provider not in SDK live harness registry (add providers.ts + GitHub secret)
  • openrouter/anthropic/claude-opus-4.7 setup: missing GitHub secret / env OPENROUTER_API_KEY
  • openrouter/anthropic/claude-opus-5.5 setup: missing GitHub secret / env OPENROUTER_API_KEY
  • openrouter/anthropic/claude-opus-5.5:batch setup: missing GitHub secret / env OPENROUTER_API_KEY
  • openrouter/anthropic/claude-sonnet-5.5 setup: missing GitHub secret / env OPENROUTER_API_KEY
  • openrouter/anthropic/claude-sonnet-5.5:batch setup: missing GitHub secret / env OPENROUTER_API_KEY

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.

1 participant