va-ai-api-bridge (va-aab)
Protocol translation primitives for AI API request and response shapes.
va-ai-api-bridge (nickname: va-aab) is intentionally not an HTTP gateway. It does not perform networking, store credentials, manage accounts, retry upstreams, or own chat history. It provides the shared Rust types and traits VibeAround can use to translate between API package shapes such as OpenAI Responses, OpenAI Chat Completions, Anthropic Messages, and Gemini Generate Content.
Boundary
agent wire request
-> source WireTranslator
-> UniversalRequest
-> optional provider adapter
-> target WireTranslator
-> upstream wire request
upstream wire response / stream chunk
-> target WireTranslator
-> UniversalEvent
-> optional provider adapter
-> source WireTranslator
-> agent wire response / stream event
The host application remains responsible for:
- HTTP routes and upstream requests
- authorization headers and profile credentials
- chat history and launch/session context
- SSE framing and transport lifecycle
- plugin loading and sandboxing
Provider adapters only transform package shapes:
- prepare a target protocol request body before the host sends it
- map provider responses or stream chunks back into universal events
- read host-supplied context such as provider settings or normalized history
Crate Layout
protocol: supported wire protocol identifiersschema: provider catalog types and light serde shells for supported wire payloadsuniversal: protocol-neutral request, content, tool, reasoning, and usage typesstream: protocol-neutral streaming event types and translator statetranslator: behavior traits for translating schema/value payloads to and from universal typesadapter: traits and context for provider-specific package transformsproviders: built-in provider adapters for common OpenAI-compatible quirks
Built-in Translators
OpenAiChatTranslator:/v1/chat/completionsOpenAiResponsesTranslator:/v1/responsesAnthropicMessagesTranslator:/v1/messagesGeminiGenerateContentTranslator:/{version}/models/{model}:generateContent
Status
This crate is an early API skeleton. The schema layer is deliberately permissive and keeps unknown fields so providers can evolve without breaking the bridge. Built-in translators cover the common request, response, and stream packet shapes; built-in provider adapters cover the provider-specific package transforms that can stay independent of host networking, credentials, and profile storage.