bedrockModelRequiresAdaptiveThinking returns true if the given Bedrock model ID only supports the "adaptive" thinking type and rejects the legacy "enabled" + budget_tokens shape with a 400. Claude Opus 4.7 was the first model in this category. See https://docs.aws.amazon.com/bedrock/latest/userguid
(model string)
| 436 | // |
| 437 | // See https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-anthropic-claude-opus-4-7.html |
| 438 | func bedrockModelRequiresAdaptiveThinking(model string) bool { |
| 439 | return strings.Contains(model, "anthropic.claude-opus-4-7") || |
| 440 | strings.Contains(model, "anthropic.claude-opus-4-8") |
| 441 | } |
| 442 | |
| 443 | // filterBedrockBetaFlags removes unsupported beta flags from the Anthropic-Beta |
| 444 | // header and also removes model-gated flags the current model doesn't support. |
no test coverage detected