Skip to content

Interface: LLMRequest

@providerprotocol/ai


@providerprotocol/ai / @providerprotocol/ai / LLMRequest

Defined in: src/types/llm.ts:260

Internal

Request passed from the llm() core to providers.

Contains all information needed by a provider to execute inference. The config is required here because llm() resolves defaults before passing to providers.

TParams = unknown

Provider-specific parameter type

config: ProviderConfig

Defined in: src/types/llm.ts:280

Provider infrastructure config (resolved by llm() core)


messages: Message[]

Defined in: src/types/llm.ts:262

All messages for this request (history + new input)


optional params: TParams

Defined in: src/types/llm.ts:271

Model-specific parameters (passed through unchanged)


optional signal: AbortSignal

Defined in: src/types/llm.ts:283

Abort signal for cancellation


optional structure: JSONSchema

Defined in: src/types/llm.ts:277

Structured output schema (if requested)


optional system: string | unknown[]

Defined in: src/types/llm.ts:268

System prompt - string or provider-specific array format. Arrays are passed through directly to the provider.


optional tools: Tool<unknown, unknown>[]

Defined in: src/types/llm.ts:274

Tools available for this request