Expand description
Wire API implementations, one per API id, and dispatch by model.
Modules§
- anthropic
anthropic-messages: the Anthropic Messages API and compatible endpoints.- bedrock
bedrock-converse-stream: Amazon Bedrock’s ConverseStream API.- classify
- Classifier APIs: TypeSafe’s System One protocol, the same protocol on Cloudflare Workers AI, and classification with a llama.cpp chat model.
google-generative-ai: the Gemini API’sstreamGenerateContent.- images
- Image generation over OpenRouter’s chat completions endpoint.
- mistral
mistral-conversations: Mistral’s native chat completions endpoint.- openai_
completions openai-completions: the OpenAI Chat Completions API and the many compatible endpoints, with per-provider compat flags.- openai_
responses - The OpenAI Responses API and its two variants:
openai-responses,azure-openai-responsesandopenai-codex-responses(ChatGPT’s Codex backend). - pi_
messages pi-messages: pi’s own message protocol, spoken by the Radius gateway.
Structs§
- Apis
- Wire APIs by id: the built-ins plus any registered by extensions.
- Codex
WebSocket Stats - pi’s
OpenAICodexWebSocketDebugStatsfor one session.
Traits§
- Model
Operations - The classifier and image APIs that a provider registered by an extension
implements (pi-ai’s
classifyandgenerateImagesof the provider).
Functions§
- builtin
- The built-in implementation of a wire API id.
- close_
codex_ websockets - pi’s
closeOpenAICodexWebSocketSessions: closes the socketssession_idkeeps, or every session’s. A socket in use closes when its request ends. - codex_
websocket_ stats - pi’s
getOpenAICodexWebSocketDebugStats: whatsession_id’s WebSocket requests did in this process. - failed_
stream - A stream that ends at once with
messageas its error. - reset_
codex_ websocket_ stats - pi’s
resetOpenAICodexWebSocketDebugStats: forgets the statistics and the SSE fallback ofsession_id, or of every session.