Skip to main content

Crate agent_models

Crate agent_models 

Source
Expand description

Provider-independent model contracts and integrations for the AI Platform.

This crate defines the common conversation API used by the agent runtime, including messages, requests, responses, tool definitions, token usage, and errors. It also contains provider adapters and the configuration-backed registry that resolves a configured model identifier into a conversation client.

Provider-specific HTTP details and wire-format data remain encapsulated inside their respective adapters; callers work with the shared model types instead. Agent execution, tool authorization, conversation lifecycle, and orchestration are responsibilities of the runtime and higher-level crates, not this crate.

Structs§

ConversationRequest
ConversationResponse
ModelConfig
ProviderInfo
Credential-free metadata for a configured provider and its models.
ProviderModelInfo
ProviderReportedCost
Provider-reported monetary cost from a model response.
Registry
TokenUsage
Provider-reported token counts normalized across model APIs.
ToolCall
ToolDefinition

Enums§

ConversationMessage
ModelCapability
Declarative compatibility capabilities supported by a model.
ModelError
ModelFailureCategory

Traits§

ConversationClient