Model catalog — registry-backed lookups for model metadata.
Every fn here delegates to llm.sdk.registry; the hardcoded catalog atom that previously lived here is gone (all former entries are present in the bundled models.dev snapshot at resources/models-dev-snapshot.json).
Single-arg lookups (get-model, context-length, model-capable?) scan across providers and return the first match — stable for globally unique model ids (gpt-4o, claude-opus-4-7), non-deterministic for ambiguous ids that exist under multiple providers (e.g. a model served by both :openrouter and :openai). Prefer the provider-aware overloads when the id is ambiguous.
Model catalog — registry-backed lookups for model metadata. Every fn here delegates to llm.sdk.registry; the hardcoded catalog atom that previously lived here is gone (all former entries are present in the bundled models.dev snapshot at resources/models-dev-snapshot.json). Single-arg lookups (get-model, context-length, model-capable?) scan across providers and return the first match — stable for globally unique model ids (gpt-4o, claude-opus-4-7), non-deterministic for ambiguous ids that exist under multiple providers (e.g. a model served by both :openrouter and :openai). Prefer the provider-aware overloads when the id is ambiguous.
(context-length model-id)(context-length provider model-id)Return the context length for a model in tokens, or nil when unknown.
Return the context length for a model in tokens, or nil when unknown.
(get-model model-id)(get-model provider model-id)Look up a model entry by id. With one arg, scans across providers (first match wins). With two args, queries the registry directly.
Look up a model entry by id. With one arg, scans across providers (first match wins). With two args, queries the registry directly.
(list-models)Return a sorted seq of unique model ids the registry knows about.
Return a sorted seq of unique model ids the registry knows about.
(max-output-tokens model-id)(max-output-tokens provider model-id)Return the maximum output tokens for a model, or nil when unknown.
Return the maximum output tokens for a model, or nil when unknown.
(model-capable? model-id capability)(model-capable? provider model-id capability)Check if a model supports a capability keyword (e.g. :tools, :vision, :cache). Returns false when the model is unknown or has no :model/capabilities set on its registry entry.
Check if a model supports a capability keyword (e.g. :tools, :vision, :cache). Returns false when the model is unknown or has no :model/capabilities set on its registry entry.
(models-by-provider provider)Return every model entry the registry has under the given SDK provider keyword.
Return every model entry the registry has under the given SDK provider keyword.
(register-model model-id entry)(register-model provider model-id entry)Register a model entry. Pushes into the registry's override tier. Accepts either a (model-id, entry) pair or a (provider, model-id, entry) triple. With a single id, derives the provider from the entry's :model/provider key.
Register a model entry. Pushes into the registry's override tier. Accepts either a (model-id, entry) pair or a (provider, model-id, entry) triple. With a single id, derives the provider from the entry's :model/provider key.
(resolve-model model-name)Fuzzy-match a model name against the registry. Tries: exact id, provider-prefixed id (anthropic/claude → claude), then substring over every known model id. Returns a registry entry or nil.
Fuzzy-match a model name against the registry. Tries: exact id, provider-prefixed id (anthropic/claude → claude), then substring over every known model id. Returns a registry entry or nil.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |