Modules§
Structs§
- Chat
Request - Chat
Response - Message
- Server
Tool - Server-side tool definition. These tools are executed by the API provider rather than by the client. Currently only web_search_tool is supported.
- Usage
- Token accounting for one provider turn.
input_tokensalready includes cached/uncached portions combined — when providers expose cache details separately we capture them here so callers can report cache effectiveness. - WebSearch
Content - Content returned by the server-side web search tool.
- WebSearch
Result Item
Enums§
- Content
Block - Message
Content - Provider
Type - Provider type enumeration for factory creation.
- Role
- Stop
Reason - Stream
Event - Incremental events emitted during a streaming chat turn.
Traits§
Functions§
- create_
provider - Create a provider instance based on type and configuration. This is the recommended way to obtain a Provider instance.
- create_
provider_ with_ headers - Create a provider with extra headers support.
- infer_
provider_ type - Infer provider type from model name. Returns Anthropic for Claude models, OpenAI for GPT models.