@ai-sdk/openai-compatible provider.
Install
Create the provider
Generate and stream
Tool calling
Multi-step tool loops work the same as with any first-party provider:Notes
- Reasoning tokens are reported.
usage.outputTokenDetails.reasoningTokensseparates thinking from visible output on reasoning models likez-ai/glm-5.2. - Not the same as AI Gateway. Vercel’s AI Gateway serves its own model catalog; this provider talks to Lyceum directly, so your traffic and billing stay with us.
- Keep
LYCEUM_API_KEYserver-side. Never ship it to a browser bundle.

