◉CLAUDE LABJP
●2.1.301 — Adds the vim % motion, LaTeX math rendering in the VS Code panel, and a retry-watchdog limit for usage-limit waits (10/15)●2.1.299 — Conversations over 200K tokens left idle about 54 minutes get compacted; MCP allow rules now match only the server they name●SONNET 4.5 — Retires on the Claude API on 11/30, 45 days left. Migrate to Sonnet 5.5●WINDOWS — Reports say hooks break silently only on Japanese-locale Windows; check the character encoding first●FAST MODE — Opus 5.5 fast mode is out of research preview and no longer needs the beta header (10/15)●NEW — I Put a Ten-Line Promise File at the To…●2.1.301 — Adds the vim % motion, LaTeX math rendering in the VS Code panel, and a retry-watchdog limit for usage-limit waits (10/15)●2.1.299 — Conversations over 200K tokens left idle about 54 minutes get compacted; MCP allow rules now match only the server they name●SONNET 4.5 — Retires on the Claude API on 11/30, 45 days left. Migrate to Sonnet 5.5●WINDOWS — Reports say hooks break silently only on Japanese-locale Windows; check the character encoding first●FAST MODE — Opus 5.5 fast mode is out of research preview and no longer needs the beta header (10/15)●NEW — I Put a Ten-Line Promise File at the To…
Articles/API & SDK
⬡ API & SDK/2026-06-23Advanced

When the Same Model Has a Different Name Everywhere — Designing a Cross-Provider Model Identity Resolver for Claude

Now that Fable 5 is available on the API, Bedrock, and Vertex at once, the same model carries a different identifier on each. Here is how to untangle hardcoded model strings with a small resolver that maps logical names to physical IDs, carries capability flags, and verifies identifiers at startup.

Claude API128Amazon BedrockVertex AI3Model IdentifierMulti-ProviderConfiguration DesignProduction23

✦ Premium Article

The day Fable 5 became generally available, I tried to wire it into my unattended automation and ran straight into a quiet wall. I normally call the Claude API directly, but for one job I wanted to lean on Amazon Bedrock for latency and region reasons. The model string sitting in my code simply did not work there.

It was supposed to point at the same "Fable 5," yet the name was completely different depending on where I called it: claude-fable-5 on the API, an inference-profile ARN on Bedrock, a publisher model path on Vertex AI. As an indie developer running everything solo, that gap is more than a minor annoyance. When the model string is scribbled across the codebase, adding a single provider means hand-editing every call site.

This article walks through collapsing those scattered identifiers behind one layer of abstraction — "logical model name → physical identifier" — and operating it safely, capability differences and existence checks included, with implementation code.

Hardcoded model strings quietly stall your migration

Let me first make the cost of hardcoding concrete. In my pipeline, separate modules called Claude for different jobs: article generation, summarization, classification, integrity checks. When I went to try Fable 5 and counted with grep -rn 'claude-' src/ | grep -c model, I found the model: string written inline in 12 places.

Several of those still carried old Sonnet-era identifiers, and there was no way to tell from the code which were live and which were lingering out of inertia. Before even talking about switching providers, I had lost the ability to answer a basic question: which model am I calling, where, and how many times?

The root reason hardcoding stops working is that a model string compresses three separate concerns into one token: which generation/capability tier the model is (logical intent), which provider and identifier it lives at (physical location), and when it was pinned (version stability). When those three aren't separated, changing one of them forces you to rewrite the whole string.

Introduce one layer of logical model names

The starting point is simple: let the code reference only a "logical model name," and confine the translation to a physical identifier to a single place. Name the logical model by capability or role. Names like reasoning-default, fast-cheap, or long-output let the calling code express what it wants to do, so the call site reads in terms of intent rather than vendor strings.

The physical identifier is determined by the pair of logical name and provider. Keep that mapping as a single table.

Logical nameProviderPhysical identifier (example)
reasoning-defaultanthropicclaude-fable-5
reasoning-defaultbedrock(inference-profile ARN)
reasoning-defaultvertex(publisher model path)
fast-cheapanthropicclaude-haiku-4-5-20251001

Not writing the literal identifiers into the table is deliberate. ARNs and model paths get injected as environment variables or secrets; the table holds only a "key." That keeps the identifiers off the codebase, so swapping a region or project is a configuration change rather than a code change.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦A small resolver that maps a logical model name to the right physical identifier per provider, plus the migration steps to collapse a dozen scattered model strings into one place
✦A capability-flag design that bundles per-provider differences (1-hour prompt cache, 128K output, extended thinking) with the identifier so features degrade gracefully instead of breaking silently
✦A low-cost startup preflight that confirms the resolved identifier actually exists on that provider, and three operational pitfalls I hit running it
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

⬡ API & SDK2026-05-04
Claude API on Bun in Production: Migration Decisions and Implementation Patterns That Actually Survive Real Traffic
A practical guide to running Claude API services on Bun in production. Covers migration triggers from Node.js, built-in SQLite/WebSocket usage, streaming optimization, and the pitfalls that only surface after deployment — with working code and measured numbers.
⬡ API & SDK2026-04-30
Building a Production Multilingual Translation SaaS with Claude API — Glossaries, Style, and Domain Adaptation in Practice
A practical, code-first design guide for running a translation SaaS on Claude API: glossaries, style guides, domain adaptation, quality gates, and cost controls that survive real production traffic.
⬡ API & SDK2026-04-25
Claude API × Convex: Reactive AI Apps — Data Flow, Streaming, and Agent Patterns
How to combine Convex's reactive database with the Claude API to build chat and agent applications that hold up in production. Covers schema design, the Action/Mutation/Query boundary, streaming, tool-call state, and the cold-start pitfalls nobody warns you about.