MCPcopy Index your code
hub / github.com/simstudioai/sim / getThinkingCapability

Function getThinkingCapability

apps/sim/providers/models.ts:3668–3684  ·  view source on GitHub ↗
(
  modelId: string
)

Source from the content-addressed store, hash-verified

3666 * Returns the thinking capability config if supported, null otherwise.
3667 */
3668export function getThinkingCapability(
3669 modelId: string
3670): { levels: string[]; default?: string } | null {
3671 const normalizedModelId = modelId.toLowerCase()
3672
3673 for (const provider of Object.values(PROVIDER_DEFINITIONS)) {
3674 for (const model of provider.models) {
3675 if (model.capabilities.thinking) {
3676 const baseModelId = model.id.toLowerCase()
3677 if (normalizedModelId === baseModelId || normalizedModelId.startsWith(`${baseModelId}-`)) {
3678 return model.capabilities.thinking
3679 }
3680 }
3681 }
3682 }
3683 return null
3684}
3685
3686/**
3687 * Get all models that support thinking capability

Callers 2

buildThinkingConfigFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected