Description
@jerome-benoit/sap-ai-provider-v2 Anthropic Claude Opus 4.7+ models on SAP AI Core do not get adaptive reasoning with display: "summarized", unlike @ai-sdk/anthropic, @ai-sdk/google-vertex/anthropic, and @ai-sdk/amazon-bedrock.
Three issues in packages/opencode/src/provider/transform.ts:
anthropicOpus47OrLater regex /opus-(\d+)[.-](\d+)(?:[.@-]|$)/i requires opus- BEFORE the version. SAP AI Core uses an inverted format anthropic--claude-4.7-opus (family at the end), so the regex never matches.
anthropicAdaptiveEfforts substring list ["opus-4-6", "opus-4.6", "sonnet-4-6", "sonnet-4.6"] does not match anthropic--claude-4.6-opus either, so SAP Opus 4.6 also misses the 4-effort adaptive path.
- The
@jerome-benoit/sap-ai-provider-v2 case in variants() does not spread ...(adaptiveOpus ? { display: "summarized" } : {}) like @ai-sdk/anthropic (line ~845) and @ai-sdk/amazon-bedrock (line ~882) do.
Plugins
N/A
OpenCode version
dev
Steps to reproduce
- Configure SAP AI Core with
anthropic--claude-4.7-opus
- Select reasoning variant (high/xhigh/max)
- Expected:
{ thinking: { type: "adaptive", display: "summarized" }, effort } and 5 efforts (low|medium|high|xhigh|max)
- Actual:
{ thinking: { type: "enabled", budgetTokens: ... } } (budget-tokens fallback) — no adaptive, no display: "summarized", only 2 keys (high, max)
Authoritative model ID confirmed in SAP/ai-sdk-java, SAP/ai-sdk-js (scripts/sap-models.json and model-types.ts), and models.dev TOML (reasoning = true).
Operating System
macOS
Terminal
iTerm2
Description
@jerome-benoit/sap-ai-provider-v2Anthropic Claude Opus 4.7+ models on SAP AI Core do not get adaptive reasoning withdisplay: "summarized", unlike@ai-sdk/anthropic,@ai-sdk/google-vertex/anthropic, and@ai-sdk/amazon-bedrock.Three issues in
packages/opencode/src/provider/transform.ts:anthropicOpus47OrLaterregex/opus-(\d+)[.-](\d+)(?:[.@-]|$)/irequiresopus-BEFORE the version. SAP AI Core uses an inverted formatanthropic--claude-4.7-opus(family at the end), so the regex never matches.anthropicAdaptiveEffortssubstring list["opus-4-6", "opus-4.6", "sonnet-4-6", "sonnet-4.6"]does not matchanthropic--claude-4.6-opuseither, so SAP Opus 4.6 also misses the 4-effort adaptive path.@jerome-benoit/sap-ai-provider-v2case invariants()does not spread...(adaptiveOpus ? { display: "summarized" } : {})like@ai-sdk/anthropic(line ~845) and@ai-sdk/amazon-bedrock(line ~882) do.Plugins
N/A
OpenCode version
dev
Steps to reproduce
anthropic--claude-4.7-opus{ thinking: { type: "adaptive", display: "summarized" }, effort }and 5 efforts (low|medium|high|xhigh|max){ thinking: { type: "enabled", budgetTokens: ... } }(budget-tokens fallback) — no adaptive, nodisplay: "summarized", only 2 keys (high,max)Authoritative model ID confirmed in
SAP/ai-sdk-java,SAP/ai-sdk-js(scripts/sap-models.jsonandmodel-types.ts), andmodels.devTOML (reasoning = true).Operating System
macOS
Terminal
iTerm2