Skip to main content

resolve

Function resolve 

Source
pub fn resolve(model_id: &str) -> Option<&'static CatalogModel>
Expand description

The catalog model for a client-sent model id, accepting the Anthropic-native spellings agent CLIs actually send alongside the catalog’s public ids.

Claude Code’s /model emits ids like claude-sonnet-4-5-20250929 or claude-haiku-4-5, Bedrock-aware clients may carry the full upstream id (us.anthropic.claude-haiku-4-5-20251001-v1:0), and Vertex clients the @date form (claude-sonnet-4-5@20250929). Exact public ids win; otherwise the id is canonicalized — vendor/geo prefix, InvokeModel -vN[:M] suffix, and either release-date suffix drop off, and a dashed minor version becomes the catalog’s dotted form (claude-haiku-4-5claude-haiku-4.5).

A public id can appear once per cloud, and this returns the first catalog entry — for a multi-cloud id that is the AWS one. Callers routing by a binding must use resolve_for with the binding’s cloud.