data/api/api_provider library
Classes
- ApiConfig
- Configuration for the API provider.
- ApiProvider
- Abstract provider interface — implemented by Anthropic and OpenAI shim.
- ContentBlockDeltaEvent
- Emitted when incremental text is appended to a content block.
- ContentBlockStartEvent
- Emitted when a new content block (text or tool use) starts.
- ContentBlockStopEvent
- Emitted when a content block finishes streaming.
- ErrorEvent
- Emitted when an error occurs during streaming.
- MessageDeltaEvent
- Emitted with final message metadata (stop reason, token usage).
- MessageStartEvent
- Emitted when a new message begins streaming.
- MessageStopEvent
- Emitted when the message stream is complete.
- StreamEvent
- Stream event from the API — mirrors Anthropic's SSE events.
Enums
- ApiProviderType
- Supported API provider types.