Skip to main content
The AI SDK is the fastest way to build your own agent on Lyceum models. Use the @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.reasoningTokens separates thinking from visible output on reasoning models like z-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_KEY server-side. Never ship it to a browser bundle.