mirror of
https://github.com/backnotprop/plannotator.git
synced 2026-09-14 14:17:26 +08:00
ec757d5539
The Ask AI feature hardcodes a bare model alias ("claude-sonnet-4-6")
and force-passes it to the spawned claude binary as --model. Bare
aliases are valid against the first-party Anthropic API but are
rejected by Bedrock/Vertex, which require a full inference-profile id /
ARN, producing:
API Error (claude-sonnet-4-6): 400 The provided model identifier
is invalid.
Add resolveSDKModel(): when CLAUDE_CODE_USE_BEDROCK / _VERTEX is set,
map the picker's family aliases (opus/sonnet/haiku) to the matching
ANTHROPIC_DEFAULT_*_MODEL env var, pass through identifiers that are
already ARNs / inference profiles, and otherwise fall back to
ANTHROPIC_MODEL or omit --model so the SDK inherits the env default.
Off Bedrock/Vertex behavior is unchanged.
Co-authored-by: Pavan Purewal <pavandeep.purewal@ticketmaster.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>