text
stringlengths
0
59.1k
```ts
import { Agent } from "@voltagent/core";
import { createOpenAICompatible } from "@ai-sdk/openai-compatible";
const customProvider = createOpenAICompatible({
name: "openai",
baseURL: "https://api.openai.com/v1",
apiKey: process.env.OPENAI_API_KEY,
headers: {
"X-Client-Source": "voltagent-docs",
},
});
const agent = new Agent({
name: "custom-agent",
model: customProvider("gpt-4o-mini"),
});
```
:::note
VoltAgent does not include fallback chains yet. Implement retries or failover in your app if needed.
:::
## Use ai-sdk directly
You can use ai-sdk provider modules anywhere VoltAgent expects a `LanguageModel`:
```ts
import { mistral } from "@ai-sdk/mistral";
import { Agent } from "@voltagent/core";
const agent = new Agent({
name: "mistral-agent",
model: mistral("mistral-small-latest"),
});
```
<|endoftext|>
# source: VoltAgent__voltagent/website/models-docs/providers/vercel.md type: docs
---
title: Vercel AI Gateway
---
<!-- THIS FILE IS AUTO-GENERATED BY website/scripts/generate-model-docs.js. DO NOT EDIT MANUALLY. -->
# Vercel AI Gateway
Use `vercel/<model>` with VoltAgent's model router.
## Quick start
```ts
import { Agent } from "@voltagent/core";
const agent = new Agent({
name: "vercel-agent",
instructions: "You are a helpful assistant",
model: "vercel/alibaba/qwen-3-14b",
});
```
## Environment variables
- `AI_GATEWAY_API_KEY`
## Provider package
`@ai-sdk/gateway`
## Default base URL
Not listed.
You can override the base URL by setting `VERCEL_BASE_URL`.
## Provider docs
- https://github.com/vercel/ai/tree/5eb85cc45a259553501f535b8ac79a77d0e79223/packages/gateway
## Models
<details>
<summary>Show models (179)</summary>
- alibaba/qwen-3-14b
- alibaba/qwen-3-235b
- alibaba/qwen-3-30b
- alibaba/qwen-3-32b
- alibaba/qwen3-235b-a22b-thinking
- alibaba/qwen3-coder
- alibaba/qwen3-coder-30b-a3b
- alibaba/qwen3-coder-plus
- alibaba/qwen3-embedding-0.6b
- alibaba/qwen3-embedding-4b
- alibaba/qwen3-embedding-8b
- alibaba/qwen3-max
- alibaba/qwen3-max-preview
- alibaba/qwen3-next-80b-a3b-instruct
- alibaba/qwen3-next-80b-a3b-thinking