Skip to main content
Create an OpenAI-compatible provider pointed at the gateway, then use it as your model with generateText / streamText.

Install

Generate text

Pass your end-user id via the provider’s headers. Use provider.chat(...) so calls go to the /chat/completions endpoint Orbitrage routes.

Stream text

Tool calling works exactly as the AI SDK documents — Orbitrage doesn’t change the API. For hosted managed tools, call the gateway directly or via the raw OpenAI client.
Pin a direct model (glm-5.2, minimax-m3) for predictable behavior; switch the string to "auto" to let Orbitrage route.