Skip to content

fix(models): a Bedrock -v1:0 version is not an Ollama tag - #1463

Merged
iamtoruk merged 3 commits into
getagentseal:mainfrom
ulises-c:fix/bedrock-version-not-ollama-tag
Sep 17, 2026
Merged

iamtoruk merged 3 commits into
getagentseal:mainfrom
ulises-c:fix/bedrock-version-not-ollama-tag

Conversation

@ulises-c

Copy link
Copy Markdown
Contributor

Summary

Testing

  • I have tested this locally against real data (not just unit tests)
  • npm test passes — main (3684f1d): 4147 passed / 5 skipped; branch: 4148 passed / 5 skipped, +1, zero new failures. New test is red on main, green here.
  • npm run build succeeds; npx tsc --noEmit clean

Real data: on main, isExpectedFreeModel('anthropic.claude-nonexistent-99-v1:0') returns true and findUnpricedModels drops the row; with this change it returns false and 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.

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.
@ulises-c

Copy link
Copy Markdown
Contributor Author

@iamtoruk this is the looksLikeLocalModel split you offered to take on its own in #1448: -v\d+:\d+$ exempted before the tag rule, no route machinery. One test, red on main, green here; suite 4148/4147.

Sequencing: this first, then #1448 (now the field-based rework you asked for) rebases onto it — the branches touch different regions of models.ts and merge clean, and #1448 does not duplicate these lines.

@iamtoruk

Copy link
Copy Markdown
Member

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 -v<n>:<n>. OpenAI's Bedrock ids have no v. openai.gpt-oss-120b-1:0 is the live id on the Bedrock model card, and openai.gpt-5.6-luna-1:0 has the same shape; both still read as Ollama tags on this branch. Widen to -v?\d+:\d+$ and add one of those to the test, then it goes in.

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.
@iamtoruk
iamtoruk merged commit 9cd7dc5 into getagentseal:main Sep 17, 2026
@ulises-c
ulises-c deleted the fix/bedrock-version-not-ollama-tag branch September 18, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants