Build a Vercel AI SDK language model from environment variables.
Supports Kimi (Moonshot AI), OpenAI, DeepSeek, and local Ollama servers. All
providers expose an OpenAI-compatible endpoint, so they are created through
@ai-sdk/openai.
Parameters
overrides: {baseURL?:string;model?:string} = {}
Optional overrides for model and base URL.
Returns LanguageModelV1
A configured language model.
Throws
When a cloud provider's required API key is missing.
Build a Vercel AI SDK language model from environment variables.
Supports Kimi (Moonshot AI), OpenAI, DeepSeek, and local Ollama servers. All providers expose an OpenAI-compatible endpoint, so they are created through
@ai-sdk/openai.