fix(sync): OpenCode 模型改用官方 models 接口,修复文档改版导致的连续两天 exit=2
官方把文档的 `## Endpoints` 表改成「看 console 页 / 用 models 接口」, HTML 里不再有带 opencode.ai/ 地址的模型行,fetch_opencode() 的 <tr>/<td> 解析拿不到任何行 → 自动化日报「模型清单同步」整块失败: [2026-11-17 23:02:18] exit=2 RuntimeError: OpenCode 文档没解析出 Endpoints 表 [2026-11-18 23:02:29] exit=2 同上 改为优先读官方 models 接口(实测无需鉴权): GET https://opencode.ai/inference/go/v1/models (zen/go/v1/models 同源同内容) 每条自带 id/name/type/api{chat-completions,responses,messages,generate-content}/ recommended_api/limit{context,output}/cost.text.*.price/go.limited_regions, 据此推导协议线、免费标记与地区限制;HTML 表解析降级为兜底(接口不可用才走)。 首次落盘: - 删除 opencode/mimo-v2.5、mimo-v2.5-pro(上游已被 V2.6 取代) - 上下文 hy4-flash-free → 1048576/65536;qwen4-max → 1000000/262144 - 跳过 gemini-4-argon(仅 generate-content)、beam-free 与 muse-spark-1.2/1.3(地区限制) 验证:落盘后 28 个模型、/healthz 200、hot_reload 自动生效未重启、重跑「无漂移」; sync_onemin.py 同步通过(49 接口 / 43 配置 / 跳过重名 6)。 顺带把运行时的 data/ban_history.jsonl 加进 .gitignore(含被封 IP,属隐私)。
This commit is contained in:
1 parent
2eee87f5fa
commit
83ecea482f
4 files changed
+190
-22
No files matched your search
@@ -30,6 +30,8 @@ data/feedback_media/
|
||||
# 运行期状态(第三十轮):会话落盘 / 视频归属落盘 —— 都是运行数据,且含账号名与凭证哈希,
|
||||
# 属"可重新生成、不该进版本库"的一类(重启后从空开始,语义上无害)
|
||||
data/sessions.json
|
||||
# 封禁历史(2026-11-19 补):运行时数据,且**含被封 IP 与操作人**,属隐私,不入库
|
||||
data/ban_history.jsonl
|
||||
data/video_owners.json
|
||||
|
||||
# 智能体运行记录(第三十八轮):运行时数据(谁在什么时候用了哪个智能体),
|
||||
|
||||
Reference in new issue
Block a user