Expand description
OpenAI-compatible provider engine.
Ported from the openai-runtime prototype. Translates between Anthropic-shaped
messages/tools/content-blocks (the internal synaps representation) and
OpenAI chat/completions SSE wire.
Re-exports§
pub use types::ChatMessage;pub use types::ChatOptions;pub use types::ChatRequest;pub use types::FunctionCall;pub use types::FunctionDefinition;pub use types::OaiEvent;pub use types::ProviderConfig;pub use types::StreamOptions;pub use types::ToolCall;pub use types::ToolChoice;pub use types::ToolDefinition;pub use wire::StreamDecoder;
Modules§
- catalog
- Normalized model catalog types and provider-specific parsers.
- ping
- Model ping / health check.
- reasoning
- Provider-aware thinking/reasoning request helpers.
- registry
- Provider registry — catalog of known OpenAI-compatible endpoints.
- stream
- Streaming path for OpenAI-compatible providers.
- translate
- Anthropic ↔ OpenAI translation layer.
- types
- OpenAI-compatible wire types. Ported from the prototype
openai-runtimecrate. - wire
- SSE wire decoder for OpenAI-compatible streams. Ported from
openai-runtime::stream, withStreamEventrenamed toOaiEvent.
Enums§
- Provider
- Routing decision for a given model id.
Functions§
- clear_
extension_ manager_ for_ routing - extension_
manager_ for_ routing - resolve_
route - Decide which backend a model should route to.
- set_
extension_ manager_ for_ routing - try_
route - Try to route a request through an OpenAI-compatible provider.