MCPcopy Create free account
hub / github.com/coder/coder / bedrockModelRequiresAdaptiveThinking

Function bedrockModelRequiresAdaptiveThinking

aibridge/intercept/messages/base.go:438–441  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

436//
437// See https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-anthropic-claude-opus-4-7.html
438func 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.

Calls 1

ContainsMethod · 0.45

Tested by

no test coverage detected