Skip to main content

Module agent_model

Module agent_model 

Source
Expand description

Provider-neutral model calls, independent of the agent execution loop. Recorded calls persist metadata only; conversation snapshots belong to the runtime. No credentials or raw provider errors enter the event log.

Modules§

catalog 🔒
Trusted, compiled model-provider registration and construction.
fake
Deterministic model fixture. Each call consumes one scripted outcome.
ollama
Native, non-streaming Ollama chat adapter with a loopback-only transport.
openai
OpenAI Responses adapter: stateless, non-streaming, caller-owned history. See SPEC-0016 for supported items and intentionally deferred streaming.

Structs§

ModelError
ModelProviderCatalog
Catalog of trusted model-provider factories.
ModelProviderImplementation
Stable provider implementation metadata for compatibility decisions.
ModelRegistry
ModelRequest
ModelResponse
ModelTool
OutputSchema
ProviderContinuation
Opaque adapter-owned continuation, serialized with the conversation. It may contain sensitive context; never include it in metadata events or diagnostics.
RecordedModelResponse
RegisteredModel 🔒
ToolCall
Usage

Enums§

FinishReason
ModelErrorKind
Safe diagnostic categories: never attach a raw HTTP body, URL or credential.
ModelMessage

Constants§

MODEL_MAX_ATTEMPTS 🔒

Traits§

ModelProvider
One configured provider/model. The model name and credentials are bound at construction, so requests cannot override their registry alias’s model.
ModelProviderFactory
A compiled, trusted provider factory registered explicitly by the host.

Functions§

model_error_is_retryable 🔒
model_retry_delay 🔒
wire_name 🔒

Type Aliases§

ModelResult