OpenCode
Integrate AllToken with the Vercel AI SDK.
Installation
npm
$ npm install @ai-sdk/openai-compatibleConfiguration
Configure AllToken as the provider in your OpenCode config:
JSON config
| 1 | { |
| 2 | "provider": "openai-compatible", |
| 3 | "baseURL": "https://api.alltoken.ai/v1", |
| 4 | "apiKey": "your_alltoken_api_key", |
| 5 | "model": "deepseek-chat" |
| 6 | } |
Supported features
AllToken via the Vercel AI SDK supports:
- Streaming text generation
- Thinking mode (extended reasoning)
- Multimodal input (images + text)
- Function calling / tool use