Repository navigation
fix(models): a Bedrock -v1:0 version is not an Ollama tag - #1463
Conversation
Claude Code with CLAUDE_CODE_USE_BEDROCK=1 records Bedrock's foundation-model id, which ends in `-v<major>:<minor>` (`anthropic.claude-haiku-4-5-20251001-v1:0`). `looksLikeLocalModel` treats any `:` as an Ollama / LM Studio tag, so an unpriced Bedrock model was classed as expected-free: excluded from `models --unpriced`, from the unpriced warning and from the pricing-coverage denominator, its metered spend sitting at $0 with nothing flagging the gap. Exempt the version shape before the tag rule. Ollama tags (`qwen3.6:35b`, `gpt-oss:120b`, `llama3.1:8b-instruct-q4_K_M`) keep their treatment. Split out of getagentseal#1448 at review; no route or display change here.
|
@iamtoruk this is the Sequencing: this first, then #1448 (now the field-based rework you asked for) rebases onto it — the branches touch different regions of |
|
Checked: the test is red on main, green here, real Ollama tags still read as local, 4,148 passing, byte-identical unpriced list on my data. One gap before I merge: the regex only catches |
# Conflicts: # CHANGELOG.md
Not every Bedrock foundation-model id spells the `v` in its version suffix. OpenAI and Cohere ids on Bedrock end in a bare `-<major>:<minor>` (`openai.gpt-oss-120b-1:0`, `cohere.rerank-v3-5:0`), so `-v\d+:\d+$` left 11 priced ids in the LiteLLM snapshot still reading as Ollama tags and still dropping out of the pricing-coverage denominator. Checked against the snapshot: `-v?\d+:\d+$` matches 245 of the 279 colon-bearing ids, every one a Bedrock id across ai21, amazon, anthropic, cohere, meta, mistral, openai, qwen, twelvelabs and writer plus the regional prefixes, and none of the 34 Ollama, fine-tune or OpenRouter tags.
Summary
-v<major>:<minor>(anthropic.claude-haiku-4-5-20251001-v1:0, what Claude Code writes withCLAUDE_CODE_USE_BEDROCK=1);looksLikeLocalModelread that colon as an Ollama:tag, so such a model was excluded frommodels --unpriced, the unpriced warning and the pricing-coverage denominator, with its metered spend at $0 and nothing flagging it./-v\d+:\d+$/before the tag rule. Ollama / LM Studio tags are unaffected.Testing
npm testpasses —main(3684f1d): 4147 passed / 5 skipped; branch: 4148 passed / 5 skipped, +1, zero new failures. New test is red onmain, green here.npm run buildsucceeds;npx tsc --noEmitcleanReal data: on
main,isExpectedFreeModel('anthropic.claude-nonexistent-99-v1:0')returnstrueandfindUnpricedModelsdrops the row; with this change it returnsfalseand the row is listed. Checked against the Bedrock ids on this machine's Claude Code and Hermes sessions (anthropic.claude-haiku-4-5-20251001-v1:0,us.anthropic.claude-haiku-4-5-20251001-v1:0,openai.gpt-5.6-luna) and the Ollama tags in the existing tests.