Skip to main content

Interface: ModelConfig

Defined in: packages/core/src/providers/types.ts:242

Properties

cacheControl?

optional cacheControl?: boolean

Defined in: packages/core/src/providers/types.ts:288

Enable prompt caching on this model's system message. When true, marks the system message for Anthropic ephemeral caching. Reduces input token costs by up to 90% (Anthropic) or 50% (OpenAI) when the same system prompt is reused across calls.


config?

optional config?: ProviderConfig

Defined in: packages/core/src/providers/types.ts:257

Provider configuration (API key, custom fetch, etc.)


id

id: string

Defined in: packages/core/src/providers/types.ts:244

Model identifier (e.g., 'gpt-4o-mini', 'claude-3-5-sonnet-20241022')


provider?

optional provider?: keyof ProviderRegistry

Defined in: packages/core/src/providers/types.ts:254

Provider name (auto-detected from id if not specified)

Auto-detection rules:

  • 'gpt-*' → 'openai'
  • 'claude-*' → 'anthropic'
  • Other models require explicit provider specification

reasoning?

optional reasoning?: object

Defined in: packages/core/src/providers/types.ts:273

Reasoning configuration (for reasoning-capable models: gpt-5, o1, o3, o4)

budgetTokens?

optional budgetTokens?: number

Token budget for extended thinking (Anthropic models)

effort?

optional effort?: "low" | "medium" | "high"

Reasoning effort level - higher effort = more thorough reasoning

summary?

optional summary?: "concise" | "detailed" | "auto"

Reasoning summary style - concise, detailed, or auto

Example

model: {
id: 'gpt-5',
reasoning: {
effort: 'high',
summary: true
}
}