config: 刷新 OpenCode Go 模型清单(35 个,含免费模型标注)
- 上游 GET /models(35 条)+ 官方文档价格/端点表对齐:新增 deepseek-flash(三线全通)、 grok-4.7(responses)、omen-alpha(chat)、gpt-6-luna(responses)、mimo-v2.6-flash(chat)、 mimo-v2.6-pro(chat)、space-bunny-free(chat + messages) - 下线 union-alpha(Union Alpha Free,上游已 retire,实测 400 Model is unavailable) - 免费标注:space-bunny-free 的 display_name 写为「Space Bunny Free(免费)」 - 7 个新模型逐条真实调用验过三条线(chat/messages/responses 各一只瘦请求)后定 protocols; 顺手复核 kimi-k3 / minimax-m3 / deepseek-v4.1-flash 标注仍正确 - README:供应商表模型数 17 → 35、模型清单按「线 + 免费」重写、三线直传小节同步 - CHANGELOG:新增 2026-09-21 条目(含「探测必须带专属 UA,否则 Cloudflare 403 error code: 1010」的踩坑记录)
This commit is contained in:
1 parent
ddd6fa8e8f
commit
3b83dcfc75
3 files changed
+101
-17
No files matched your search
@@ -1,5 +1,38 @@
|
|||||||
# CHANGELOG
|
# CHANGELOG
|
||||||
|
|
||||||
|
## 2026-09-21 · 刷新 OpenCode Go 模型清单(35 个,标注免费模型)
|
||||||
|
|
||||||
|
**老板需求(原话)**:把 ai 网关的 OpenCode Go 的模型更新一下,**免费的也要标注出来**,弄好后重启上线。
|
||||||
|
|
||||||
|
### 数据来源
|
||||||
|
1. 上游活列表 `GET https://opencode.ai/zen/go/v1/models`(真实 key,35 条);
|
||||||
|
2. 官方文档价格表 / 模型-端点表(`opencode.ai/docs/go`,给出每个模型的**原生线**与**价格**,`Space Bunny Free` 一行价格是 `Free / Free / Free`、额度 `Unlimited`(限时));
|
||||||
|
3. models.dev 的 `opencode-go` 目录(36 条,用于交叉核对价格;其中 `ox-alpha-free` 也是 cost 0,但上游 `/models` 与官方文档都没有它 → 未收录)。
|
||||||
|
|
||||||
|
### 变更
|
||||||
|
- **新增 7 个**:`deepseek-flash`(三线全通)、`grok-4.7`(responses)、`omen-alpha`(chat)、
|
||||||
|
`gpt-6-luna`(responses)、`mimo-v2.6-flash`(chat)、`mimo-v2.6-pro`(chat)、
|
||||||
|
`space-bunny-free`(chat + messages)。
|
||||||
|
- **下线 1 个**:`union-alpha`(Union Alpha Free)—— 上游 `/models` 已不再返回,实测回
|
||||||
|
`400 Model is unavailable.`;条目移除,免费位由 `space-bunny-free` 接替。
|
||||||
|
- **免费标注**:`space-bunny-free` 的 `display_name` 写成 `Space Bunny Free(免费)`,模型页/接口
|
||||||
|
一眼可见;yaml 里同时写了官方价格表证据的注释。
|
||||||
|
- **协议线**:7 个新模型逐条真实调用验过(chat / messages / responses 各一只瘦请求,
|
||||||
|
`max_tokens=1`,带 `x-opencode-session` 与专属 UA)——上游对不可用的线回
|
||||||
|
`503 {"error":{"type":"server_error","message":"Upstream request failed: Endpoint is unavailable"}}`,
|
||||||
|
据此定 `protocols`。顺手复核了 3 个存量多线模型(`kimi-k3` / `minimax-m3` / `deepseek-v4.1-flash`),
|
||||||
|
标注仍然正确。
|
||||||
|
- **README**:供应商表模型数 17 → 35、模型清单小节按「线 + 免费」重写、三线直传小节数字同步。
|
||||||
|
|
||||||
|
### 踩坑记录(下次别再犯)
|
||||||
|
- 探测上游必须带**专属 UA**(`api-gateway/2.4.0 (jakon opencode-go)`):用 python urllib 的默认 UA
|
||||||
|
会被 Cloudflare 拦成 `403 error code: 1010`,看起来像"模型不可用",其实是 UA 被 ban。
|
||||||
|
|
||||||
|
### 验证
|
||||||
|
- `yaml.safe_load` 通过、`providers.opencode.models` = 35、带「免费」标注 1 个;
|
||||||
|
- 全量单测与 `scripts/ci_check.sh` 六道门禁;
|
||||||
|
- 重启后线上 `/v1/models` 抽查新模型与免费标注(见提交说明)。
|
||||||
|
|
||||||
## 2026-09-18 · 第三十一轮:虚拟模型 id(别名 `wjd`)—— 客户端固定一个模型名,实际打给谁由页面决定
|
## 2026-09-18 · 第三十一轮:虚拟模型 id(别名 `wjd`)—— 客户端固定一个模型名,实际打给谁由页面决定
|
||||||
|
|
||||||
**老板需求(原话)**:设一个 `wjd` 模型 id,路由到指定的模型上(不是"跨格式");**管理员**在
|
**老板需求(原话)**:设一个 `wjd` 模型 id,路由到指定的模型上(不是"跨格式");**管理员**在
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ api-gateway/
|
|||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
| Agnes AI | `https://api.agnes-ai.cn/v1` | Bearer | `agnes-3.0-flash`、`agnes-2.5-flash`(text,支持图像输入)、`agnes-image-2.5-flash`(image)、`agnes-video-2.5-flash`(video) |
|
| Agnes AI | `https://api.agnes-ai.cn/v1` | Bearer | `agnes-3.0-flash`、`agnes-2.5-flash`(text,支持图像输入)、`agnes-image-2.5-flash`(image)、`agnes-video-2.5-flash`(video) |
|
||||||
| 火山方舟 Coding | `https://ark.cn-beijing.volces.com/api/coding/v3` | Bearer | `ark-code-latest`(text) |
|
| 火山方舟 Coding | `https://ark.cn-beijing.volces.com/api/coding/v3` | Bearer | `ark-code-latest`(text) |
|
||||||
| OpenCode Go | `https://opencode.ai/zen/go/v1` | Bearer + `x-opencode-session` | 17 个文本模型(见下方小节) |
|
| OpenCode Go | `https://opencode.ai/zen/go/v1` | Bearer + `x-opencode-session` | 35 个模型,含 **1 个免费**(`space-bunny-free`,见下方小节) |
|
||||||
|
|
||||||
> OpenCode Go 是每月订阅的编程模型入口(不在订阅内按 token 额外计费)。官方硬性要求每个
|
> OpenCode Go 是每月订阅的编程模型入口(不在订阅内按 token 额外计费)。官方硬性要求每个
|
||||||
> `/chat/completions` 带 **`x-opencode-session`**(缺失直接 400),并建议专属 `User-Agent`。
|
> `/chat/completions` 带 **`x-opencode-session`**(缺失直接 400),并建议专属 `User-Agent`。
|
||||||
@@ -72,12 +72,24 @@ api-gateway/
|
|||||||
> 并重试 3 次、最终回 502(第二十六轮已修:这类非法值入站即 **422**,且**一次都不发上游**)。
|
> 并重试 3 次、最终回 502(第二十六轮已修:这类非法值入站即 **422**,且**一次都不发上游**)。
|
||||||
> - 建议用 `uuid4().hex`,或用 `用户:对话` 这类你自己可控且稳定的值。
|
> - 建议用 `uuid4().hex`,或用 `用户:对话` 这类你自己可控且稳定的值。
|
||||||
>
|
>
|
||||||
> 收录的 17 个文本模型(OpenAI 兼容 `/chat/completions` 线,真实 key 实测 200):
|
> 收录 **35 个**模型(2026-09-21 按上游 `GET /models` + 官方文档表刷新,每条线的可用性都真实调用验过):
|
||||||
> `glm-5.3-flash`、`glm-5.3`、`glm-5.2`、`glm-5.1`、`kimi-k3`、`kimi-k2.7-code`、`kimi-k2.6`、
|
>
|
||||||
> `longcat-2.0`、`deepseek-v4-pro`、`deepseek-v4-flash`、`deepseek-flash`、`deepseek-v4.1-flash`(视觉)、
|
> - ⭐ **免费**:`space-bunny-free`(Space Bunny Free)—— 官方价格表标 Free / Free / Free、
|
||||||
> `deepseek-v4-flash-vision-exp`(视觉)、`mimo-v2.5`、`mimo-v2.5-pro`、`hy4-preview`、`hy3`。
|
> 额度 Unlimited(限时);网关里 `display_name` 带「(免费)」标注,模型页一眼能认出来。
|
||||||
> OpenCode Go 其余模型走 Anthropic `messages` 或 OpenAI `responses` 契约(本网关为 OpenAI 兼容
|
> - `chat/completions` 线:`glm-5.3-flash`、`glm-5.3`、`glm-5.2`、`glm-5.1`、`kimi-k2.7-code`、
|
||||||
> 转发,暂未接入);`glm-5`、`kimi-k2.5`、`hy3-preview` 实测上游返回「Model is unavailable」未收录。
|
> `kimi-k2.6`、`longcat-2.0`、`mimo-v2.5`、`mimo-v2.5-pro`、`mimo-v2.6-flash`、`mimo-v2.6-pro`、
|
||||||
|
> `omen-alpha`、`hy4-preview`、`hy3`
|
||||||
|
> - `chat/completions` + `messages`:`kimi-k3`、`minimax-m3`、`minimax-m2.5`、`qwen3.8-max`、
|
||||||
|
> `qwen3.8-flash`、`qwen3.7-max`、`qwen3.7-plus`、`qwen3.6-plus`、`space-bunny-free`
|
||||||
|
> - `messages` 线:`minimax-m2.7`
|
||||||
|
> - `responses` 线:`grok-4.6`、`grok-4.7`、`gpt-5.6-luna`、`gpt-6-luna`、
|
||||||
|
> `muse-spark-1.3-contributor`、`muse-spark-1.2-contributor`
|
||||||
|
> - 三线全通:`deepseek-v4.1-flash`(视觉)、`deepseek-v4-pro`、`deepseek-v4-flash`、
|
||||||
|
> `deepseek-v4-flash-vision-exp`(视觉)、`deepseek-flash`
|
||||||
|
>
|
||||||
|
> 本轮变化:新增 7 个(`deepseek-flash` / `grok-4.7` / `omen-alpha` / `gpt-6-luna` /
|
||||||
|
> `mimo-v2.6-flash` / `mimo-v2.6-pro` / `space-bunny-free`),下线 1 个(`union-alpha`,上游已 retire)。
|
||||||
|
> 文档未收但上游有的(`deepseek-flash` / `omen-alpha`)按实测收录并注明。
|
||||||
|
|
||||||
> Agnes 的图像/视频走自有端点,通过供应商配置里的 `media` 段指定。
|
> Agnes 的图像/视频走自有端点,通过供应商配置里的 `media` 段指定。
|
||||||
|
|
||||||
@@ -173,9 +185,9 @@ providers:
|
|||||||
| `responses` | `POST /v1/responses` | `Authorization: Bearer` |
|
| `responses` | `POST /v1/responses` | `Authorization: Bearer` |
|
||||||
|
|
||||||
模型支持哪几条线写在各供应商的 `models[].protocols`;**不声明 = 只认 `chat/completions`**
|
模型支持哪几条线写在各供应商的 `models[].protocols`;**不声明 = 只认 `chat/completions`**
|
||||||
(Agnes / 火山方舟即如此,行为与改造前完全一致)。OpenCode Go 的 29 个文档模型按**实测**逐一
|
(Agnes / 火山方舟即如此,行为与改造前完全一致)。OpenCode Go 的 **35 个模型**按**实测**逐一
|
||||||
标线(`deepseek-v4.1-flash` / `deepseek-v4-pro` / `deepseek-v4-flash` / `deepseek-v4-flash-vision-exp`
|
标线(`deepseek-v4.1-flash` / `deepseek-v4-pro` / `deepseek-v4-flash` / `deepseek-v4-flash-vision-exp` /
|
||||||
三线全通)。`GET /v1/models` 会回 `protocols`,前端据此标格式。
|
`deepseek-flash` 三线全通)。`GET /v1/models` 会回 `protocols`,前端据此标格式。
|
||||||
|
|
||||||
**路由别名 `wjd` 已于第二十七轮(2026-09-18)整体删除**:不再有 `routes` 配置段、不再有
|
**路由别名 `wjd` 已于第二十七轮(2026-09-18)整体删除**:不再有 `routes` 配置段、不再有
|
||||||
多模型 fallback、`/v1/models` 里也没有 `type: "route"` 条目。理由:三线直传下模型 id 必须与
|
多模型 fallback、`/v1/models` 里也没有 `type: "route"` 条目。理由:三线直传下模型 id 必须与
|
||||||
|
|||||||
+46
-7
@@ -91,6 +91,10 @@ providers:
|
|||||||
# ── 模型 ─────────────────────────────────────────────────
|
# ── 模型 ─────────────────────────────────────────────────
|
||||||
# models[].protocols = 该模型**能用哪几条线**(入站格式必须与出站一致)。
|
# models[].protocols = 该模型**能用哪几条线**(入站格式必须与出站一致)。
|
||||||
# 取值:chat/completions | messages | responses;不写 = 只认 chat/completions。
|
# 取值:chat/completions | messages | responses;不写 = 只认 chat/completions。
|
||||||
|
# **2026-09-21 更新**:按上游 `GET /models`(35 个)+ 官方文档表刷新 —— 新增 7 个
|
||||||
|
# (deepseek-flash / grok-4.7 / omen-alpha / gpt-6-luna / mimo-v2.6-flash /
|
||||||
|
# mimo-v2.6-pro / space-bunny-free),下线 1 个(union-alpha),**免费模型标注在
|
||||||
|
# display_name 里带「(免费)」**(当前只有 space-bunny-free)。
|
||||||
# 实测口径(2026-09-18 全量扫描 29 个文档模型 × 3 条线,非文档线另做
|
# 实测口径(2026-09-18 全量扫描 29 个文档模型 × 3 条线,非文档线另做
|
||||||
# 「流式 + 工具调用」复核,全部 200):官方文档标注的线**一定**可用;
|
# 「流式 + 工具调用」复核,全部 200):官方文档标注的线**一定**可用;
|
||||||
# 另外有一批模型实测能走多条线(OpenCode 侧自带跨格式适配),按实测多标:
|
# 另外有一批模型实测能走多条线(OpenCode 侧自带跨格式适配),按实测多标:
|
||||||
@@ -152,6 +156,30 @@ providers:
|
|||||||
display_name: "Hy3"
|
display_name: "Hy3"
|
||||||
type: "text"
|
type: "text"
|
||||||
protocols: ["chat/completions"]
|
protocols: ["chat/completions"]
|
||||||
|
# ── 2026-09-21 按上游 /models + 官方文档表补录 ──────────
|
||||||
|
- id: "mimo-v2.6-flash"
|
||||||
|
display_name: "MiMo V2.6 Flash"
|
||||||
|
type: "text"
|
||||||
|
# 实测:chat 200;messages / responses 都是 503「Endpoint is unavailable」
|
||||||
|
protocols: ["chat/completions"]
|
||||||
|
- id: "mimo-v2.6-pro"
|
||||||
|
display_name: "MiMo V2.6 Pro"
|
||||||
|
type: "text"
|
||||||
|
protocols: ["chat/completions"]
|
||||||
|
- id: "omen-alpha"
|
||||||
|
display_name: "Omen Alpha"
|
||||||
|
type: "text"
|
||||||
|
# 上游新模型(官方文档表还没收);实测只有 chat 线可用
|
||||||
|
protocols: ["chat/completions"]
|
||||||
|
- id: "space-bunny-free"
|
||||||
|
display_name: "Space Bunny Free(免费)"
|
||||||
|
type: "text"
|
||||||
|
# ★ 免费模型:官方文档价格表 Free / Free / Free,额度 Unlimited(限时)。
|
||||||
|
# 接替已下线的 union-alpha(Union Alpha Free)。
|
||||||
|
# 实测 chat 200、messages 200、responses 503 → 标两条线。
|
||||||
|
# (models.dev 里另有个 ox-alpha-free 也是 cost 0,但上游 /models 与官方文档
|
||||||
|
# 都没有它,故不收录。)
|
||||||
|
protocols: ["chat/completions", "messages"]
|
||||||
# ── Chat + Messages 两条线都实测可用 ─────────────────
|
# ── Chat + Messages 两条线都实测可用 ─────────────────
|
||||||
- id: "kimi-k3"
|
- id: "kimi-k3"
|
||||||
display_name: "Kimi K3"
|
display_name: "Kimi K3"
|
||||||
@@ -206,29 +234,40 @@ providers:
|
|||||||
type: "text"
|
type: "text"
|
||||||
vision: true # 官方标 Vision,支持图像转 token 输入
|
vision: true # 官方标 Vision,支持图像转 token 输入
|
||||||
protocols: ["chat/completions", "messages", "responses"]
|
protocols: ["chat/completions", "messages", "responses"]
|
||||||
|
- id: "deepseek-flash"
|
||||||
|
display_name: "DeepSeek Flash"
|
||||||
|
type: "text"
|
||||||
|
# 2026-09-21 上游新出现(官方文档表未收);实测三线全通
|
||||||
|
protocols: ["chat/completions", "messages", "responses"]
|
||||||
# ── Anthropic Messages 线(文档主推这条)─────────────
|
# ── Anthropic Messages 线(文档主推这条)─────────────
|
||||||
- id: "minimax-m2.7"
|
- id: "minimax-m2.7"
|
||||||
display_name: "MiniMax M2.7"
|
display_name: "MiniMax M2.7"
|
||||||
type: "text"
|
type: "text"
|
||||||
# 实测:messages 线 200,chat / responses 都是 500 → 只标 messages
|
# 实测:messages 线 200,chat / responses 都是 500 → 只标 messages
|
||||||
protocols: ["messages"]
|
protocols: ["messages"]
|
||||||
- id: "union-alpha"
|
# 2026-09-21:`union-alpha`(Union Alpha Free)已从上游 Go 计划下线(/models 不再返回,
|
||||||
display_name: "Union Alpha Free"
|
# 实测 messages 线回 400「Model is unavailable.」)→ 条目移除;免费位由
|
||||||
type: "text"
|
# `space-bunny-free` 接替(见上面 chat 段,带「免费」标注)。
|
||||||
# 文档标的 messages 线,但实测上游回 400「Model is unavailable.」
|
|
||||||
# (限时免费模型,额度/可用性由上游控制)。先按文档收录并标注真实线,
|
|
||||||
# 调用时上游的不可用会原样回给客户端(网关不替它编文案)。
|
|
||||||
protocols: ["messages"]
|
|
||||||
# ── OpenAI Responses 线 ───────────────────────────────
|
# ── OpenAI Responses 线 ───────────────────────────────
|
||||||
- id: "grok-4.6"
|
- id: "grok-4.6"
|
||||||
display_name: "Grok 4.6"
|
display_name: "Grok 4.6"
|
||||||
type: "text"
|
type: "text"
|
||||||
# 实测:responses 200;chat / messages 都是 401 "not supported for format"
|
# 实测:responses 200;chat / messages 都是 401 "not supported for format"
|
||||||
protocols: ["responses"]
|
protocols: ["responses"]
|
||||||
|
- id: "grok-4.7"
|
||||||
|
display_name: "Grok 4.7"
|
||||||
|
type: "text"
|
||||||
|
# 2026-09-21 新增;实测 responses 200,chat / messages 都是 503「Endpoint is unavailable」
|
||||||
|
protocols: ["responses"]
|
||||||
- id: "gpt-5.6-luna"
|
- id: "gpt-5.6-luna"
|
||||||
display_name: "GPT 5.6 Luna"
|
display_name: "GPT 5.6 Luna"
|
||||||
type: "text"
|
type: "text"
|
||||||
protocols: ["responses"]
|
protocols: ["responses"]
|
||||||
|
- id: "gpt-6-luna"
|
||||||
|
display_name: "GPT 6 Luna"
|
||||||
|
type: "text"
|
||||||
|
# 2026-09-21 新增;实测 responses 200(官方文档表同样标 responses)
|
||||||
|
protocols: ["responses"]
|
||||||
- id: "muse-spark-1.3-contributor"
|
- id: "muse-spark-1.3-contributor"
|
||||||
display_name: "Muse Spark 1.3 Contributor"
|
display_name: "Muse Spark 1.3 Contributor"
|
||||||
type: "text"
|
type: "text"
|
||||||
|
|||||||
Reference in new issue
Block a user