resolveModelCapabilities
function resolveModelCapabilities(modelId, options?): Promise< | ModelCapabilities| undefined>;Defined in: core/src/capability.ts:232
Resolve model capabilities (context window, tool calling, vision, reasoning) by looking up the model in a live or cached models.dev catalog.
Normalizes model identifiers across gateway spellings:
z-ai/glm-5.3-flashmatchesglm-5.3-flashdeepseek/deepseek-v4.1-flashmatchesdeepseek-v4.1-flashaccounts/fireworks/models/glm-5p3-flashmatchesglm-5.3-flash
Never throws. If the catalog cannot be retrieved or the model is unknown,
it returns undefined so capability lookups never break caller execution.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
modelId |
string |
options |
ResolveModelOptions |
Returns
Section titled “Returns”Promise<
| ModelCapabilities
| undefined>