Interface: ModelConfig
Defined in: packages/core/src/providers/types.ts:245
Properties
cacheControl?
optionalcacheControl?:CacheControlOption
Defined in: packages/core/src/providers/types.ts:301
Construction-time prompt-cache plan. true is the chat shorthand
(last-tool + system + last four, then capped). An object is an
explicit plan — { scope: 'prefix' } stamps last-tool + system.
false turns it off. Per-call cache / cacheControl /
enableCaching override this.
config?
optionalconfig?:ProviderConfig
Defined in: packages/core/src/providers/types.ts:260
Provider configuration (API key, custom fetch, etc.)
id
id:
string
Defined in: packages/core/src/providers/types.ts:247
Model identifier (e.g., 'gpt-5.6-luna', 'claude-3-5-sonnet-20241022')
provider?
optionalprovider?: keyof ModelProviderRegistry
Defined in: packages/core/src/providers/types.ts:257
Provider name (auto-detected from id if not specified)
Auto-detection rules:
- 'gpt-*' → 'openai'
- 'claude-*' → 'anthropic'
- Other models require explicit provider specification
reasoning?
optionalreasoning?:object
Defined in: packages/core/src/providers/types.ts:276
Reasoning configuration (for reasoning-capable models: gpt-5, o1, o3, o4)
budgetTokens?
optionalbudgetTokens?:number
Token budget for extended thinking (Anthropic models)
effort?
optionaleffort?:string&object|"low"|"medium"|"high"|"xhigh"|"max"
Reasoning effort level - higher effort = more thorough reasoning.
The named levels are the common ones and are what autocomplete offers,
but the set is the provider's, not ours: Anthropic advertises xhigh
and max for claude-opus-5, and publishes the list per model under
capabilities.effort — which listModels reports as ModelInfo.effort.
A closed union here would reject levels the provider documents, so the
type suggests without forbidding.
summary?
optionalsummary?:"concise"|"detailed"|"auto"
Reasoning summary style - concise, detailed, or auto
Example
model: {
id: 'gpt-5',
reasoning: {
effort: 'high',
summary: true
}
}