Skip to main content

Interface: ModelConfig

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

Model configuration with provider details

Examples​

Simple string (uses env vars)

model: 'gpt-5.6-luna'

With provider config

model: {
id: 'gpt-5.6-luna',
provider: 'openai',
config: {
apiKey: 'sk-...',
fetch: customFetch
}
}

Properties​

cacheControl?​

optional cacheControl?: CacheControlOption

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

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?​

optional config?: ProviderConfig

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


id​

id: string

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


provider?​

optional provider?: ProviderName

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

Provider name. When omitted it is read from the id: an explicit provider|id / provider:id prefix, or a vendor-owned id prefix from the catalog (gpt- → openai, claude- → anthropic, …). Other ids need it.


reasoning?​

optional reasoning?: object

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

Written into each provider's own form by its catalog reasoning capability; providers without one ignore it.

budgetTokens?​

optional budgetTokens?: number

Token budget for thinking. Wins over effort where the provider takes a budget; ignored by Claude models that think adaptively (4.6+).

effort?​

optional effort?: "max" | "low" | "medium" | "high" | "xhigh" | string & object

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?​

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

Example​

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