Typed marker returned when a provider intentionally has no live model-list
endpoint. Callers may use a separate canonical static catalog only for this
condition; transport, authentication, and malformed-response failures must
remain actionable.
ModelProvider capabilities declaration.
Describes what features a model_provider supports, enabling intelligent
adaptation of tool calling modes and request formatting.
Structured events emitted by model_provider streaming APIs.
This extends plain text chunk streaming with explicit tool-call signals so
agent loops can preserve native tool semantics without parsing payload text.
Anthropic’s thinking.display request field (beta
thinking-display-updates-2026-08-18), controlling whether thinking
blocks come back omitted, as progress updates, or summarized.
Output-token budget roomy enough for typical agent turns. Providers
override per family where the model’s own context window is the
binding constraint.
Industry-neutral sampling temperature. OpenAI, Gemini, OpenRouter, and
most OpenAI-compatible endpoints document 0.7 as their typical default;
Anthropic and Ollama override (1.0 and 0.0 respectively).
HTTP timeout for cloud inference. Local model_providers (Ollama) override
upward since CPU/GPU-bound inference runs slower than round-tripping to
a hyperscaler.
Wire protocol used when the model_provider doesn’t declare one. Only OpenAI’s
Codex stack uses the “responses” protocol; everything else speaks the
classic chat completions shape.
Anthropic’s documented minimum for extended-thinking budget_tokens.
Requests below this are rejected with 400 by the provider; clamping at
resolution time gives a clearer error site than the first API call.
Project a full agent conversation history down to the flat ChatMessage
shape durable session backends store: user/assistant chat turns only,
system prompt excluded (the backend restores against the caller’s own
system prompt, not a persisted one). AssistantToolCalls and
ToolResults are tool-loop plumbing that durable session transcripts have
never persisted; only the visible chat turns are kept.
Count the conversation entries a transcript projects into, without
materializing them. One entry per chat message; an assistant tool-call
message contributes its non-empty text plus one entry per call; a tool
result folds into the entry of a call still awaiting a result (FIFO by
tool_call_id) and otherwise counts as its own orphan entry.