VS Code
用一个 Base URL 和一个密钥,把 VS Code 接到 ExoticRouter:这里是要填的值,以及它们在 VS Code 里填在哪里。
| 设置 | 值 |
|---|---|
| Base URL | https://api.exoticrouter.com/v1 |
| API 密钥 | 你的密钥,在 API 密钥页面 |
| 模型 | 模型 ID,例如 anthropic/claude-sonnet-5-5,见模型页面 |
如果工具会自己在地址后面加 /v1,就填 https://api.exoticrouter.com。
这是一个示例,只列了几个模型,密钥用占位符代替。把 sk-er-YOUR-KEY 换成你自己的密钥。
chatLanguageModels.json 放在这里:
| 系统 | 路径 |
|---|---|
| macOS | ~/Library/Application Support/Code/User/chatLanguageModels.json |
| Linux | ~/.config/Code/User/chatLanguageModels.json |
| Windows | %APPDATA%\Code\User\chatLanguageModels.json |
[ { "name": "ExoticRouter", "vendor": "customendpoint", "apiKey": "sk-er-YOUR-KEY", "apiType": "chat-completions", "models": [ { "id": "anthropic/claude-fable-5-2", "name": "Claude Fable 5.2", "url": "https://api.exoticrouter.com/v1/chat/completions", "toolCalling": true, "vision": true, "contextWindow": 1000000, "maxOutputTokens": 64000 }, { "id": "anthropic/claude-haiku-5-5", "name": "Claude Haiku 5.5", "url": "https://api.exoticrouter.com/v1/chat/completions", "toolCalling": true, "vision": true, "contextWindow": 1000000, "maxOutputTokens": 64000 }, { "id": "anthropic/claude-opus-5", "name": "Claude Opus 5", "url": "https://api.exoticrouter.com/v1/chat/completions", "toolCalling": true, "vision": true, "contextWindow": 1000000, "maxOutputTokens": 64000 }, { "id": "anthropic/claude-opus-5-5", "name": "Claude Opus 5.5", "url": "https://api.exoticrouter.com/v1/chat/completions", "toolCalling": true, "vision": true, "contextWindow": 1000000, "maxOutputTokens": 128000 }, { "id": "anthropic/claude-sonnet-5", "name": "Claude Sonnet 5", "url": "https://api.exoticrouter.com/v1/chat/completions", "toolCalling": true, "vision": true, "contextWindow": 1000000, "maxOutputTokens": 64000 }, { "id": "anthropic/claude-sonnet-5-5", "name": "Claude Sonnet 5.5", "url": "https://api.exoticrouter.com/v1/chat/completions", "toolCalling": true, "vision": true, "contextWindow": 1000000, "maxOutputTokens": 64000 }, { "id": "openai/gpt-6.1-sol", "name": "GPT-6.1 Sol", "url": "https://api.exoticrouter.com/v1/chat/completions", "toolCalling": true, "vision": true, "contextWindow": 1050000, "maxOutputTokens": 128000 }, { "id": "openai/gpt-6.2-astra", "name": "GPT-6.2 Astra", "url": "https://api.exoticrouter.com/v1/chat/completions", "toolCalling": true, "vision": true, "contextWindow": 1050000, "maxOutputTokens": 128000 }, { "id": "openai/gpt-6.2-sol", "name": "GPT-6.2 Sol", "url": "https://api.exoticrouter.com/v1/chat/completions", "toolCalling": true, "vision": true, "contextWindow": 1050000, "maxOutputTokens": 128000 }, { "id": "360/gpt-6.1-sol", "name": "gpt-6.1-sol", "url": "https://api.exoticrouter.com/v1/chat/completions", "toolCalling": false, "vision": false, "contextWindow": 128000, "maxOutputTokens": 16384 } ] }]在 VS Code 的命令面板里运行 Chat: Open Language Models (JSON),把这一项加进它打开的那个文件的列表里(这里显示的路径是这个文件通常所在的位置)。然后在聊天的模型选择器里选模型。你自己的密钥只在聊天里生效,行内补全用不了。
它能用哪些模型
Section titled “它能用哪些模型”VS Code 使用 OpenAI API,模型库里的每个文本模型都支持:Claude、GPT、Gemini 等等,用各自的 ID 指定。
这个设置的说明见 VS Code 自己的文档。
- Cline:通过智能体读写项目文件、运行开发工具。
- Continue:在代码仓库上运行可配置的 AI 检查和编程工作流。
- Zed:把编程智能体和编辑功能集成在一个协作编辑器里。
- JetBrains AI Assistant:为 JetBrains IDE 加上代码建议和 AI 聊天。
- TRAE:AI 开发环境,用来规划和编写软件。