Skip to main content

Module provider

Module provider 

Source
Expand description

AI Provider abstraction layer

Unified interface for multiple AI providers (OpenAI, Anthropic, Google, StepFun, etc.)

Modules§

anthropic
Anthropic provider implementation using the Messages API
bedrock
Amazon Bedrock provider implementation using the Converse API
copilot
GitHub Copilot provider implementation using raw HTTP.
google
Google Gemini provider implementation
models
Model catalog from CodeTether API
moonshot
Moonshot AI provider implementation (direct API)
openai
OpenAI provider implementation
openrouter
OpenRouter provider implementation using raw HTTP
stepfun
StepFun provider implementation (direct API, not via OpenRouter)
zai
Z.AI provider implementation (direct API)

Structs§

CompletionRequest
Request to generate a completion
CompletionResponse
Response from a completion request
Message
A message in a conversation
ModelInfo
Information about a model
ProviderRegistry
Registry of available providers
ToolDefinition
Tool definition for the model
Usage
Token usage information

Enums§

ContentPart
FinishReason
Role
StreamChunk
A streaming chunk from the model

Traits§

Provider
Provider trait that all AI providers must implement

Functions§

parse_model_string
Parse a model string in the format “provider/model”