Skip to content

Commit ebb29d1

Browse files
committed
feat(config): 更新内置供应商配置并优化模型视觉能力管理
- 更新内置供应商列表及默认端点配置 - 优化模型配置逻辑,确保新增模型强制应用供应商的 defaultVision 设置 - 完善相关单元测试以覆盖视觉能力覆盖逻辑
1 parent f6b49b5 commit ebb29d1

3 files changed

Lines changed: 37 additions & 79 deletions

File tree

README.md

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
**一键切换多厂商 AI 模型,打破 Copilot 套餐限制。**
44

5-
支持智谱、Kimi、讯飞、火山引擎、MiniMax、百度千帆、腾讯云、京东云、快手 KAT、X-AIO、Compshare、阿里云、七牛、DeepSeek 等国产大厂,以及**任何**兼容 OpenAI Chat、OpenAI Responses 或 Anthropic 接口风格的供应商。无需改变使用习惯,直接在 VS Code Copilot Chat 中无缝调用。
5+
支持智谱、Kimi、讯飞、火山引擎、MiniMax、百度千帆、腾讯云、京东云、快手 KAT、X-AIO、Compshare、阿里云、小米 MiMo、DeepSeek 等国产大厂,以及**任何**兼容 OpenAI Chat、OpenAI Responses 或 Anthropic 接口风格的供应商。无需改变使用习惯,直接在 VS Code Copilot Chat 中无缝调用。
66

77
---
88

@@ -59,40 +59,35 @@ code --install-extension techfetch-dev.coding-plans-for-copilot
5959

6060
以下供应商已内置默认配置,安装后即可使用:
6161

62-
| 供应商 | 默认端点(Anthropic| OpenAI 兼容端点 |
62+
| 供应商 | 默认端点(内置| 其他兼容端点 |
6363
| --- | --- | --- |
64-
| 智谱(zhipu) | `https://open.bigmodel.cn/api/anthropic/v1` | `https://open.bigmodel.cn/api/coding/paas/v4` |
64+
| 智谱(zhipu) | `https://open.bigmodel.cn/api/coding/paas/v4` | `https://open.bigmodel.cn/api/anthropic`(Claude Code) / `https://open.bigmodel.cn/api/paas/v4`(通用) |
6565
| z.ai | `https://api.z.ai/api/anthropic` | `https://api.z.ai/api/coding/paas/v4` |
6666
| 火山引擎 | `https://ark.cn-beijing.volces.com/api/coding` | `https://ark.cn-beijing.volces.com/api/coding/v3` |
6767
| Volcengine Overseas | `https://ark.ap-southeast.bytepluses.com/api/coding` | `https://ark.ap-southeast.bytepluses.com/api/coding/v3` |
68-
| MiniMax Mainland | `https://api.minimaxi.com/anthropic` | `https://api.minimaxi.com/v1` |
69-
| MiniMax Overseas | `https://api.minimax.io/anthropic` | `https://api.minimax.io/v1` |
70-
| Kimi Mainland | `https://api.moonshot.cn/anthropic` | `https://api.moonshot.cn/v1` |
71-
| Kimi Overseas | `https://api.moonshot.ai/anthropic` | `https://api.moonshot.ai/v1` |
72-
| 阿里云(Aliyun) | `https://coding.dashscope.aliyuncs.com/apps/anthropic` | `https://coding.dashscope.aliyuncs.com/v1` |
73-
| 腾讯云 | `https://api.lkeap.cloud.tencent.com/coding/anthropic` ||
74-
| 七牛(Qiniu) | `https://api.qnaigc.com` ||
68+
| Kimi | `https://api.kimi.com/coding/v1` | `https://api.kimi.com/coding/v1` |
69+
| 阿里云(Aliyun) | `https://token-plan.cn-beijing.maas.aliyuncs.com/apps/anthropic` | `https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1` |
70+
| 腾讯云 | `https://api.lkeap.cloud.tencent.com/plan/anthropic` | `https://api.lkeap.cloud.tencent.com/plan/v3` |
71+
| 小米 MiMo | `https://token-plan-cn.xiaomimimo.com/anthropic` | `https://token-plan-cn.xiaomimimo.com/v1` |
7572
| DeepSeek | `https://api.deepseek.com/anthropic` | `https://api.deepseek.com/v1` |
7673
| OpenRouter | `https://openrouter.ai/api` | `https://openrouter.ai/api/v1` |
7774

78-
如需切换到 OpenAI 兼容端点,修改供应商的 `baseUrl``defaultApiStyle` 即可。
7975

8076
### 配置示例
8177

82-
**Anthropic 风格(默认)**
78+
**Anthropic 风格示例**
8379

8480
```json
8581
{
8682
"coding-plans.vendors": [
8783
{
88-
"name": "zhipu",
89-
"baseUrl": "https://open.bigmodel.cn/api/anthropic/v1",
90-
"usageUrl": "https://open.bigmodel.cn/api/monitor/usage/quota/limit",
84+
"name": "my-anthropic-vendor",
85+
"baseUrl": "https://api.example.com/anthropic",
9186
"defaultApiStyle": "anthropic",
9287
"useModelsEndpoint": false,
9388
"models": [
9489
{
95-
"name": "glm-4.7",
90+
"name": "my-model",
9691
"capabilities": { "tools": true, "vision": false },
9792
"contextSize": 128000
9893
}
@@ -271,7 +266,7 @@ graph TB
271266

272267
#### 📦 大陆套餐
273268

274-
- **覆盖范围**:智谱、Kimi、讯飞、火山引擎、MiniMax、百度千帆、腾讯云、京东云、快手 KAT、X-AIO、Compshare、阿里云、Infini、七牛、小米 MiMo、摩尔线程、阶跃星辰、联通云、国家超算互联网等 20+ 供应商
269+
- **覆盖范围**:智谱、Kimi、讯飞、火山引擎、MiniMax、百度千帆、腾讯云、京东云、快手 KAT、X-AIO、Compshare、阿里云、Infini、小米 MiMo、摩尔线程、阶跃星辰、联通云、国家超算互联网等 20+ 供应商
275270
- **计价方式**:人民币(CNY)
276271
- **筛选规则**:仅展示标准月费套餐(不含年费、季费与首月特惠价)
277272
- **展示内容**:套餐名称、价格、包含额度、有效期、购买链接

README_en.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
**Switch between multiple AI model vendors with one click, breaking Copilot plan limitations.**
44

5-
Supports domestic major vendors like Zhipu, Kimi, iFlytek, Volcengine, MiniMax, Baidu Qianfan, Tencent Cloud, JD Cloud, Kuaishou KAT, X-AIO, Compshare, Alibaba Cloud, Qiniu, DeepSeek, as well as **any** vendor compatible with OpenAI Chat, OpenAI Responses, or Anthropic API styles. No need to change usage habits; seamlessly call directly in VS Code Copilot Chat.
5+
Supports domestic major vendors like Zhipu, Kimi, iFlytek, Volcengine, MiniMax, Baidu Qianfan, Tencent Cloud, JD Cloud, Kuaishou KAT, X-AIO, Compshare, Alibaba Cloud, Xiaomi MiMo, DeepSeek, as well as **any** vendor compatible with OpenAI Chat, OpenAI Responses, or Anthropic API styles. No need to change usage habits; seamlessly call directly in VS Code Copilot Chat.
66

77
---
88

@@ -59,40 +59,38 @@ You can also directly edit `settings.json`; the extension will open settings and
5959

6060
The following vendors come with built-in default configurations and are ready to use after installation:
6161

62-
| Vendor | Default Endpoint (Anthropic) | OpenAI Compatible Endpoint |
62+
| Vendor | Default Built-in Endpoint | Other Compatible Endpoints |
6363
| --- | --- | --- |
64-
| Zhipu (zhipu) | `https://open.bigmodel.cn/api/anthropic/v1` | `https://open.bigmodel.cn/api/coding/paas/v4` |
64+
| Zhipu (zhipu) | `https://open.bigmodel.cn/api/coding/paas/v4` | `https://open.bigmodel.cn/api/anthropic` (Claude Code) / `https://open.bigmodel.cn/api/paas/v4` (general) |
6565
| z.ai | `https://api.z.ai/api/anthropic` | `https://api.z.ai/api/coding/paas/v4` |
6666
| Volcano Engine | `https://ark.cn-beijing.volces.com/api/coding` | `https://ark.cn-beijing.volces.com/api/coding/v3` |
6767
| Volcengine Overseas | `https://ark.ap-southeast.bytepluses.com/api/coding` | `https://ark.ap-southeast.bytepluses.com/api/coding/v3` |
68-
| MiniMax Mainland | `https://api.minimaxi.com/anthropic` | `https://api.minimaxi.com/v1` |
69-
| MiniMax Overseas | `https://api.minimax.io/anthropic` | `https://api.minimax.io/v1` |
70-
| Kimi Mainland | `https://api.moonshot.cn/anthropic` | `https://api.moonshot.cn/v1` |
71-
| Kimi Overseas | `https://api.moonshot.ai/anthropic` | `https://api.moonshot.ai/v1` |
72-
| Alibaba Cloud (Aliyun) | `https://coding.dashscope.aliyuncs.com/apps/anthropic` | `https://coding.dashscope.aliyuncs.com/v1` |
73-
| Tencent Cloud | `https://api.lkeap.cloud.tencent.com/coding/anthropic` ||
74-
| Qiniu (七牛) | `https://api.qnaigc.com` ||
68+
| Kimi | `https://api.kimi.com/coding/v1` | `https://api.kimi.com/coding/v1` |
69+
| Alibaba Cloud (Aliyun) | `https://token-plan.cn-beijing.maas.aliyuncs.com/apps/anthropic` | `https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1` |
70+
| Tencent Cloud | `https://api.lkeap.cloud.tencent.com/plan/anthropic` | `https://api.lkeap.cloud.tencent.com/plan/v3` |
71+
| Xiaomi MiMo | `https://token-plan-cn.xiaomimimo.com/anthropic` | `https://token-plan-cn.xiaomimimo.com/v1` |
7572
| DeepSeek | `https://api.deepseek.com/anthropic` | `https://api.deepseek.com/v1` |
7673
| OpenRouter | `https://openrouter.ai/api` | `https://openrouter.ai/api/v1` |
7774

7875
To switch to OpenAI-compatible endpoints, modify the vendor's `baseUrl` and `defaultApiStyle`.
76+
The built-in Zhipu default uses the dedicated GLM Coding Plan endpoint `https://open.bigmodel.cn/api/coding/paas/v4`. If you want the Claude Code-compatible entrypoint instead, switch `baseUrl` to `https://open.bigmodel.cn/api/anthropic` and set `defaultApiStyle` to `anthropic`.
77+
The built-in Xiaomi MiMo default uses the Token Plan endpoint. If you want pay-as-you-go API access instead, switch `baseUrl` to `https://api.xiaomimimo.com/anthropic` (`https://api.xiaomimimo.com/v1` for OpenAI compatibility) and use the matching API key.
7978

8079
### Configuration Examples
8180

82-
**Anthropic Style (Default)**
81+
**Anthropic Style Example**
8382

8483
```json
8584
{
8685
"coding-plans.vendors": [
8786
{
88-
"name": "zhipu",
89-
"baseUrl": "https://open.bigmodel.cn/api/anthropic/v1",
90-
"usageUrl": "https://open.bigmodel.cn/api/monitor/usage/quota/limit",
87+
"name": "my-anthropic-vendor",
88+
"baseUrl": "https://api.example.com/anthropic",
9189
"defaultApiStyle": "anthropic",
9290
"useModelsEndpoint": false,
9391
"models": [
9492
{
95-
"name": "glm-4.7",
93+
"name": "my-model",
9694
"capabilities": { "tools": true, "vision": false },
9795
"contextSize": 128000
9896
}
@@ -271,7 +269,7 @@ graph TB
271269

272270
#### 📦 Domestic Plans
273271

274-
- **Coverage**: Zhipu, Kimi, iFLYTEK, Volcengine, MiniMax, Baidu Qianfan, Tencent Cloud, JD Cloud, Kuaishou KAT, X-AIO, Compshare, Alibaba Cloud, Infini, Qiniu, Xiaomi MiMo, Moore Threads, StepFun, China Unicom Cloud, National Supercomputing Internet, and 20+ more vendors
272+
- **Coverage**: Zhipu, Kimi, iFLYTEK, Volcengine, MiniMax, Baidu Qianfan, Tencent Cloud, JD Cloud, Kuaishou KAT, X-AIO, Compshare, Alibaba Cloud, Infini, Xiaomi MiMo, Moore Threads, StepFun, China Unicom Cloud, National Supercomputing Internet, and 20+ more vendors
275273
- **Currency**: Chinese Yuan (CNY)
276274
- **Filtering Rules**: Standard monthly plans only (excluding annual, quarterly, and first-month promotional prices)
277275
- **Display**: Plan name, price, included quota, validity period, purchase links

package.json

Lines changed: 11 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "coding-plans-for-copilot",
33
"displayName": "%displayName%",
44
"description": "%description%",
5-
"version": "0.7.18",
5+
"version": "0.7.19",
66
"publisher": "techfetch-dev",
77
"repository": {
88
"type": "git",
@@ -355,21 +355,14 @@
355355
},
356356
"default": [
357357
{
358-
"name": "zhipu",
359-
"baseUrl": "https://open.bigmodel.cn/api/anthropic/v1",
358+
"name": "Zhipu",
359+
"baseUrl": "https://open.bigmodel.cn/api/coding/paas/v4",
360360
"usageUrl": "https://open.bigmodel.cn/api/monitor/usage/quota/limit",
361-
"defaultApiStyle": "anthropic",
361+
"defaultApiStyle": "openai-chat",
362362
"defaultVision": false,
363363
"useModelsEndpoint": true,
364364
"models": []
365365
},
366-
{
367-
"name": "z.ai",
368-
"baseUrl": "https://api.z.ai/api/anthropic",
369-
"models": [],
370-
"useModelsEndpoint": true,
371-
"defaultApiStyle": "anthropic"
372-
},
373366
{
374367
"name": "火山引擎",
375368
"baseUrl": "https://ark.cn-beijing.volces.com/api/coding",
@@ -378,43 +371,15 @@
378371
"defaultApiStyle": "anthropic"
379372
},
380373
{
381-
"name": "Volcengine Overseas",
382-
"baseUrl": "https://ark.ap-southeast.bytepluses.com/api/coding",
383-
"models": [],
384-
"useModelsEndpoint": true,
385-
"defaultApiStyle": "anthropic"
386-
},
387-
{
388-
"name": "MiniMax Mainland",
389-
"baseUrl": "https://api.minimaxi.com/anthropic",
390-
"models": [],
391-
"useModelsEndpoint": true,
392-
"defaultApiStyle": "anthropic"
393-
},
394-
{
395-
"name": "MiniMax Overseas",
396-
"baseUrl": "https://api.minimax.io/anthropic",
397-
"models": [],
398-
"useModelsEndpoint": true,
399-
"defaultApiStyle": "anthropic"
400-
},
401-
{
402-
"name": "Kimi Mainland",
403-
"baseUrl": "https://api.moonshot.cn/anthropic",
404-
"models": [],
405-
"useModelsEndpoint": true,
406-
"defaultApiStyle": "anthropic"
407-
},
408-
{
409-
"name": "Kimi Overseas",
410-
"baseUrl": "https://api.moonshot.ai/anthropic",
374+
"name": "Kimi",
375+
"baseUrl": "https://api.kimi.com/coding/v1",
411376
"models": [],
412377
"useModelsEndpoint": true,
413378
"defaultApiStyle": "anthropic"
414379
},
415380
{
416381
"name": "Aliyun",
417-
"baseUrl": "https://coding.dashscope.aliyuncs.com/apps/anthropic",
382+
"baseUrl": "https://token-plan.cn-beijing.maas.aliyuncs.com/apps/anthropic",
418383
"models": [],
419384
"useModelsEndpoint": true,
420385
"defaultApiStyle": "anthropic"
@@ -427,15 +392,15 @@
427392
"defaultApiStyle": "anthropic"
428393
},
429394
{
430-
"name": "腾讯云",
431-
"baseUrl": "https://api.lkeap.cloud.tencent.com/coding/anthropic",
395+
"name": "Tencent",
396+
"baseUrl": "https://api.lkeap.cloud.tencent.com/plan/anthropic",
432397
"models": [],
433398
"useModelsEndpoint": true,
434399
"defaultApiStyle": "anthropic"
435400
},
436401
{
437-
"name": "Qiniu",
438-
"baseUrl": "https://api.qnaigc.com",
402+
"name": "Xiaomi MiMo",
403+
"baseUrl": "https://token-plan-cn.xiaomimimo.com/anthropic",
439404
"models": [],
440405
"useModelsEndpoint": true,
441406
"defaultApiStyle": "anthropic"

0 commit comments

Comments
 (0)