Repository navigation
fix: correct vendor model IDs and prices against primary docs (v1.22.1) - #122
Merged
Merged
Conversation
stackbilt-admin
pushed a commit
that referenced
this pull request
Oct 15, 2026
Review of #122: the old Claude IDs were only translated inside the Anthropic adapter, so routing preflight and gateway plans reported them as unknown and non-executable, and the factory checked quota and fired hooks under the old ID while recording usage under the real one. - getRoutingInfo/getGatewayRoutePlan and the factory entry points (responses, streams, client preflight) resolve the ID first. - Streaming takes cumulative usage from message_delta too. - Opus/Sonnet 4.6 report the 1M context; Claude 3.5 Haiku is $0.80/$4. - gpt-4o description no longer implies an OpenAI retirement. - Cache tests use an unchanged model ID so they isolate the cache math; new tests cover preflight, gateway plans, factory quota/hook IDs and every recommendation use case. - CHANGELOG notes the MODELS literal-type change. Co-Authored-By: Claude Opus 5.5 <[email protected]>
stackbilt-admin
pushed a commit
that referenced
this pull request
Oct 15, 2026
…emetry Round-2 review of #122: per-model ledger budgets keyed by an old Claude ID never saw spend recorded under the real ID, and a direct adapter's onSchemaDrift reported the unresolved ID. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Phase 1 of #112. The catalog and adapters advertised Anthropic IDs that do not exist (claude-*-20250618), priced Workers AI Llama/Mistral models up to 8,270x below Cloudflare's published rates, priced Claude Opus 4.6 at 3x its rate, ignored Anthropic prompt-cache charges, routed to Claude models the API has retired, and claimed gpt-4o was retired on a date OpenAI never announced. - Real dateless 4.6 IDs and the real Opus 4 snapshot; the invalid IDs earlier releases published are still accepted and mapped to real ones. - Anthropic cost includes cache reads (0.1x) and 5m/1h writes (1.25x/2x). - Retired Claude models are marked retired and excluded from routing. - Workers AI prices from Cloudflare's pricing page; unlisted models and Cerebras placeholders are labelled unverified. - OpenAI gpt-4/gpt-4-turbo/gpt-3.5-turbo carry the 2026-10-23 shutdown. Sources checked 2026-10-15; no live or billable vendor calls. Part of #112. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Review of #122: the old Claude IDs were only translated inside the Anthropic adapter, so routing preflight and gateway plans reported them as unknown and non-executable, and the factory checked quota and fired hooks under the old ID while recording usage under the real one. - getRoutingInfo/getGatewayRoutePlan and the factory entry points (responses, streams, client preflight) resolve the ID first. - Streaming takes cumulative usage from message_delta too. - Opus/Sonnet 4.6 report the 1M context; Claude 3.5 Haiku is $0.80/$4. - gpt-4o description no longer implies an OpenAI retirement. - Cache tests use an unchanged model ID so they isolate the cache math; new tests cover preflight, gateway plans, factory quota/hook IDs and every recommendation use case. - CHANGELOG notes the MODELS literal-type change. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…emetry Round-2 review of #122: per-model ledger budgets keyed by an old Claude ID never saw spend recorded under the real ID, and a direct adapter's onSchemaDrift reported the unresolved ID. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
stackbilt-admin
force-pushed
the
auto/bugfix/issue-112
branch
from
October 15, 2026 19:59
a46e628 to
4934cb8
Compare
This was referenced Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #112 (phase 1: verified corrections only). The issue stays open for phase 2.
Release: rebased onto
mainafter v1.22.0 and includes the v1.22.1 patch bump (package.json, lockfile root entries,src/version.ts, CHANGELOG[1.22.1]).Every value was checked against primary vendor documentation on 2026-10-15. No live or billable calls were made.
claude-opus-4-6-20250618/claude-sonnet-4-6-20250618→claude-opus-4-6/claude-sonnet-4-6. Model IDs are dateless from the 4.6 generation on.claude-opus-4-20250618→ the realclaude-opus-4-20250514(retired)message_deltausage) and non-streaming.retired, so routing no longer picks themgpt-4,gpt-4-turboandgpt-3.5-turbocarry the 2026-10-23 shutdown date. The unsupported "gpt-4o retired 2026-04-03" claim is removed.Compatibility
MODELS.CLAUDE_OPUS_4_6,CLAUDE_SONNET_4_6andCLAUDE_OPUS_4now hold the real IDs. Their literal types change becauseMODELSisas const; this is noted in the CHANGELOG. The old invalid strings are still accepted: the adapter, catalog lookups,getRoutingInfo/getGatewayRoutePlanand the factory entry points (quota checks, hooks, cache keys, client preflight),CreditLedgerbudgets/spend and schema-drift telemetry all translate them via the internalMODEL_ID_CORRECTIONS.Phase 2 (not here; needs design decisions)
gpt-4,gpt-4-turboandgpt-3.5-turboon 2026-10-23. After that the OpenAI adapter's allowlist holds onlygpt-4o-miniand the legacygpt-3.5-turbo-16k. OpenAI has scheduled itsgpt-4o-mini-2024-07-18snapshot to shut down on 2027-01-14; no shutdown has been announced for the alias. This needs the custom-model escape hatch and/or a refreshed OpenAI catalog.gpt-oss-120bID (shared with Groq routing), NVIDIA zero placeholders, provenance fields, and the drift canary.Tests
src/__tests__/catalog-accuracy.test.tshas 27 tests: adapter and catalog price parity, mapping of the old IDs to the real ones on the wire, preflight and gateway plans for the old IDs, the factory checking quota and recording usage under the real ID, retired exclusion for every use case, and cache-cost math (non-streaming, streaming viamessage_delta, and the no-split case) on an unchanged model ID so the cache math is isolated. Each fix was reverted in turn to confirm its test fails. Two existing tests that pinned the old invalid ID were updated. Infactory.test.tsonly those 2 lines are staged; the file's CRLF blob was left as is.Validation: 664 tests across 29 files, typecheck and the Worker import smoke test pass.
🤖 Generated with Claude Code