Bedrock's output_config.effort field on Claude Opus 4.5 (gated by the effort-2025-11-24 Anthropic-Beta flag) only accepts the enum values low, medium, and high. The upstream Anthropic Messages API enum also includes xhigh and max. When a client request carries one of the unaccepted values and AI Bridge keeps output_config for the request, Bedrock returns a 400:
{"message":"output_config.effort: Input should be 'low', 'medium' or 'high'"}
Pre-existing on main. Reproduces by sending output_config: {effort: "max"} to an Opus 4.5 Bedrock route with the effort-2025-11-24 beta flag set.
Related to coder/aibridge#280 (Opus 4.7+ adaptive-only thinking), addressed in #25335. That PR does not cover this enum drift — it only touches the adaptive-only path; Opus 4.5 reaches Bedrock via the existing beta-flag-gated output_config exemption in removeUnsupportedBedrockFields.
Suggested fix
When forwarding output_config.effort to Bedrock, clamp values not in the model's accepted set. For Opus 4.5: xhigh and max → high. Should be model-aware in case other Bedrock models accept different subsets.
Out of scope for this fix
The whole Bedrock-shape adaptation block in aibridge/intercept/messages is flagged as temporary — a planned native Bedrock provider removes the enum-drift problem entirely.
Bedrock's
output_config.effortfield on Claude Opus 4.5 (gated by theeffort-2025-11-24Anthropic-Beta flag) only accepts the enum valueslow,medium, andhigh. The upstream Anthropic Messages API enum also includesxhighandmax. When a client request carries one of the unaccepted values and AI Bridge keepsoutput_configfor the request, Bedrock returns a 400:Pre-existing on
main. Reproduces by sendingoutput_config: {effort: "max"}to an Opus 4.5 Bedrock route with theeffort-2025-11-24beta flag set.Related to coder/aibridge#280 (Opus 4.7+ adaptive-only thinking), addressed in #25335. That PR does not cover this enum drift — it only touches the adaptive-only path; Opus 4.5 reaches Bedrock via the existing beta-flag-gated
output_configexemption inremoveUnsupportedBedrockFields.Suggested fix
When forwarding
output_config.effortto Bedrock, clamp values not in the model's accepted set. For Opus 4.5:xhighandmax→high. Should be model-aware in case other Bedrock models accept different subsets.Out of scope for this fix
The whole Bedrock-shape adaptation block in
aibridge/intercept/messagesis flagged as temporary — a planned native Bedrock provider removes the enum-drift problem entirely.