Skip to content

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-flash matches glm-5.3-flash
  • deepseek/deepseek-v4.1-flash matches deepseek-v4.1-flash
  • accounts/fireworks/models/glm-5p3-flash matches glm-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.

Parameter Type
modelId string
options ResolveModelOptions

Promise< | ModelCapabilities | undefined>