Expand description
Provider-agnostic conversation types.
Every provider translates to and from these on the wire. Nothing in here knows about Anthropic, OpenAI, or any particular JSON shape.
Structs§
- Completion
Request - One request to a provider. Stateless — the full history goes every time.
- Completion
Response - Message
- Pricing
- Per-million-token prices. Configured, never guessed — hardcoding a price table guarantees it is wrong within a quarter.
- Refusal
- Tool
Spec - A tool as the model sees it.
- Usage
Enums§
- Block
- One piece of a message. A single assistant turn is often several blocks: thinking, then text, then one or more tool calls.
- Effort
- How hard the model should work. Maps to Anthropic’s
output_config.effort; other providers approximate or ignore it. - Role
- Stop
Reason - Why the model stopped generating.