agent_models/lib.rs
1//! Provider-independent model contracts and integrations for the AI Platform.
2//!
3//! This crate defines the common conversation API used by the agent runtime,
4//! including messages, requests, responses, tool definitions, token usage, and
5//! errors. It also contains provider adapters and the configuration-backed
6//! registry that resolves a configured model identifier into a conversation
7//! client.
8//!
9//! Provider-specific HTTP details and wire-format data remain encapsulated inside
10//! their respective adapters; callers work with the shared model types instead.
11//! Agent execution, tool authorization, conversation lifecycle, and orchestration
12//! are responsibilities of the runtime and higher-level crates, not this crate.
13
14mod client;
15mod error;
16mod models;
17mod providers;
18mod registry;
19mod types;
20
21pub use client::ConversationClient;
22pub use error::{ModelError, ModelFailureCategory};
23pub use models::{ModelCapability, ModelConfig};
24pub use registry::{ProviderInfo, ProviderModelInfo, Registry};
25pub use types::{
26 ConversationMessage, ConversationRequest, ConversationResponse, ProviderReportedCost,
27 TokenUsage, ToolCall, ToolDefinition,
28};