Skip to main content

Parameters

Returns

Non-streaming — ModelResponse

An OpenAI-compatible chat-completion dict with attribute access. Standard fields plus OpenTracy extras:

Streaming — Iterator[StreamChunk]

StreamChunk mirrors OpenAI’s SSE delta format across all providers. The engine translates Anthropic / Bedrock event-streams into OpenAI SSE.

Examples

Basic call:
Cross-provider with fallbacks:
Tool calling (provider-agnostic):
Engine routing (semantic auto):

Async

acompletion takes the same parameters and returns the same shape.

Errors