Skip to main content

Module model

Module model 

Source
Expand description

Model provider integration and label-based routing.

This module adapts provider-specific completion APIs to the common CompletionRequest and AgentOutput contract used by Anda agents. Built-in providers currently include OpenAI-compatible APIs, Anthropic, and Google Gemini.

The Models registry maps model labels such as primary, fallback, pro, flash, or lite to concrete Model instances. Labels let agents request capability tiers without hard-coding provider model names.

Custom providers can implement CompletionFeaturesDyn and be wrapped with Model::with_completer.

Re-exports§

pub use reqwest;

Modules§

anthropic
Anthropic Claude API client implementation for Anda Engine
gemini
Gemini Moonshot API client implementation for Anda Engine
openai
OpenAI API client implementation for Anda Engine

Structs§

AnyHost
MockImplemented
Mock implementation for tests and examples.
Model
Concrete model entry registered with the engine.
ModelConfig
Serializable configuration for constructing a model adapter.
Models
Thread-safe model registry used by the engine.
NotImplemented
Placeholder implementation that returns errors for completion requests.
Proxy
Configuration of a proxy that a Client should pass requests to.

Traits§

CompletionFeaturesDyn
Object-safe completion provider interface.

Functions§

request_client_builder
Creates a reqwest client builder with Anda Engine defaults.