惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
U
Unit 42
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
J
Java Code Geeks
D
DataBreaches.Net
B
Blog RSS Feed
D
Docker
L
LangChain Blog
aimingoo的专栏
aimingoo的专栏
F
Fortinet All Blogs
Y
Y Combinator Blog
A
About on SuperTechFans
V
V2EX
罗磊的独立博客
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
MongoDB | Blog
MongoDB | Blog
博客园 - 【当耐特】
Last Week in AI
Last Week in AI
S
SegmentFault 最新的问题
月光博客
月光博客
Vercel News
Vercel News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
阮一峰的网络日志
阮一峰的网络日志

est の 输入 输出和出入

Doherty 多尔蒂阈值 海南之行后记 The httpx 1.0 situation git fetch 实现断点续传 继续搓英汉双解词典v3 邮箱生态调研2026 “畜牲” 飞书并入豆包,文档是否减少? 从菲尔兹奖谈「包养」 iosevka字体让中文 ASCII diagram 图表对齐 为什么 Github OAuth 故意拦截 CORS gitweets改版,复刻微信「朋友圈」 MiMoCode 干完活儿发通知 写作能力和 locate cost grep vs sqlite 谁更适合微信聊天记录? [AI] curl -NT. 导致100% CPU原因 或许「数羊」真是个有效的入睡法 唯物主义「天命」论 我的 Vibe Coding 最佳实践——ADR文档 MacOS 快速插入当前时间 locate cost 基于 git 的零拷贝静态web服务器 AI和柜台费 Sutton 论 discovery Elon Musk 五步工作法 Playlet:DLNA听歌神器 免安装app播放NAS里的歌 不修改nginx接收websocket AI 硬伤 理解LLM的范式——它就是个差分机? 路径依赖
Mimocode/Opencode 的 Responses API 支持
est · 2026-08-29 · via est の 输入 输出和出入

当前的 MiMoCodev0.1.13里,Responses API 有两套入口

  1. Vercel SDK 的 responses() 方法 —— 触发条件是 provider id 为 openai / github-copilot / azure
  2. provider 为 gitlab 且每个模型加上 "useResponsesApi": true

就tmd很神奇。。一眼 vibe coding。我感觉世界上理解 Responses API 意义的人可能比例很少。。。

gitlab

{
  "$schema": "https://mimo.xiaomi.com/mimocode/config.json",
  "provider": {
    "gitlab": {
      "name": "GitLab",
      "models": {
        "gpt-5-codex": { "useResponsesApi": true }
      }
    }
  }
}

可以通过 GITLAB_INSTANCE_URL GITLAB_TOKEN 环境变量去变通,但是 token 来自 directAccessClient.getDirectAccessToken() 走的是 GitLab 的 token-exchange 协议(auth.openai.com 那套 OAuth exchange)

所以即使能把 instanceUrl 骗过去,token 交换这一步也会因为不是真 GitLab token 而失败——没有可配置的开源端点/key 入口,也没有绕过 token-exchange 的开关。

复用 openai 这个 provider id

支持自定义 options.baseURL + apiKey

{
  "$schema": "https://mimo.xiaomi.com/mimocode/config.json",
  "provider": {
    "openai": {
      "name": "My Responses Backend",
      "npm": "@ai-sdk/openai",
      "models": { "my-model": { "name": "my-model" } },
      "options": {
        "baseURL": "https://你的后端域名/v1",
        "apiKey": "你的key"
      }
    }
  }
}

provider id 必须是 openai/github-copilot/azure 之一

两个npm包的区别

@ai-sdk/openai-compatible@ai-sdk/openai 都是来自 Vercel

@ai-sdk/openai-compatible @ai-sdk/openai
是什么 MiMoCode 自带/打包的通用 OpenAI 兼容适配器 Vercel 官方的 OpenAI 原生 provider
适用对象 任何"像 OpenAI"的第三方端点(OpenRouter、DeepSeek、本地 vLLM、各种网关) OpenAI 自家 API,或任何支持 OpenAI Responses API 的后端(靠 baseURL 指过去)
在 MiMoCode 里的默认角色 自定义 provider 的默认 npm(你不写 npm 时,up() 函数默认填它) 绑定内置 openai provider id
协议能力 只有 Chat Completions(languageModel() Chat Completions + Responses API(responses() 方法)
路由差异 通用路径 W() 里固定走 M.languageModel(id) → chat 内置 openai loader 的 getModelreturn Z.responses(Q) → 默认就走 Responses
  • npm: "@ai-sdk/openai-compatible" + 任意自定义 id** → 永远走 Chat Completions,拿不到 Responses API。这是最常用但偏偏不支持 responses 的那个。
  • npm: "@ai-sdk/openai" 本身有 responses() 方法,但只有当 provider id 叫 openaigithub-copilotazure,它们 loader 里也调 responses())时,MiMoCode 才会用 Z.responses(Q)。自定义 id + @ai-sdk/openai 会掉回通用 languageModel() = chat。

实测模型支持

Opencode Go

model completions responses
deepseek-v4-flash ✅ 200 ✅ 200
deepseek-v4-flash-vision-exp ✅ 200 ✅ 200
deepseek-v4-pro ✅ 200 ✅ 200
glm-5 ✅ 200 ❌ 500
glm-5.1 ✅ 200 ❌ 500
glm-5.2 ✅ 200 ❌ 500
glm-5.3 ✅ 200 ❌ 500
glm-5.3-flash ✅ 200 ❌ 500
gpt-5.6-luna ❌ 500 ✅ 200
grok-4.5 ❌ 503 ✅ 200
grok-4.6 ❌ 401 ✅ 200
hy3 ✅ 200 ❌ 500
hy3-preview ❌ 400 ❌ 500
hy4-preview ✅ 200 ❌ 500
kimi-k2.5 ✅ 200 ❌ 500
kimi-k2.6 ✅ 200 ❌ 500
kimi-k2.7-code ✅ 200 ❌ 500
kimi-k3 ✅ 200 ❌ 401
longcat-2.0 ✅ 200 ❌ 500
mimo-v2-omni ❌ 400 ❌ 500
mimo-v2-pro ❌ 400 ❌ 500
mimo-v2.5 ✅ 200 ❌ 500
mimo-v2.5-pro ✅ 200 ❌ 500
minimax-m2.5 ✅ 200 ❌ 401
minimax-m2.7 ❌ 500 ❌ 500
minimax-m3 ✅ 200 ❌ 401
muse-spark-1.2-contributor ❌ 500 ✅ 200
qwen3.5-plus ✅ 200 ❌ 401
qwen3.6-plus ✅ 200 ❌ 401
qwen3.7-max ✅ 200 ❌ 401
qwen3.7-plus ✅ 200 ❌ 401
qwen3.8-flash ✅ 200 ❌ 401
qwen3.8-max ✅ 200 ❌ 401

Opencode Zen

model completions responses
big-pickle ⚠️ 429 ❌ 500
hy3-free ✅ 200 ❌ 500
laguna-s-2.1-free ✅ 200 ❌ 500
ling-3.0-flash-fin-free ✅ 200 ❌ 500
mimo-v2.5-free ⚠️ 429 ❌ 500
muse-spark-1.2-contributor-free ❌ 500 ✅ 200
nemotron-3-ultra-free ❌ 000 ❌ 500

需要付费的 401 Insufficient balance 我就懒得测了。