Skip to content

feat(kimi): add kimi-responses preset for the OpenAI Responses wire - #5429

Closed
yuanyuanlove wants to merge 4 commits into
lidge-jun:devfrom
yuanyuanlove:feature-20260921-kimi-responses-preset
Closed

yuanyuanlove wants to merge 4 commits into
lidge-jun:devfrom
yuanyuanlove:feature-20260921-kimi-responses-preset

Conversation

@yuanyuanlove

@yuanyuanlove yuanyuanlove commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

问题

Kimi 订阅端同时提供 Chat Completions 和 OpenAI Responses 两种协议(同一 baseUrl、同一 OAuth 账号、同一模型 kimi-for-coding)。目前 opencodex 只有一个 kimi 预设,用户想用 Responses wire 必须手改 config 里的 adapter 字段——既是隐藏操作,也容易踩到 #4726 的工具结果邻接 400。仓库里 Z.AI(zai-responses)和火山引擎(volcengine-plan-responses)已经用"独立 Responses 预设"解决了同类问题,Kimi 缺一个对等的入口。

证据(2026-09-21 实测,非文档转述)

改动

  • entries-core.ts:新增 kimi-responses 预设(adapter=openai-responses,oauthId: "kimi" 复用登录态),模型元数据与 Chat 预设完全一致(kimi-for-coding 默认、1M 上下文、low/high/max 档位、image 输入),挂 requiresAdjacentResponsesToolResults: true,featured: false 避免首页塞两个 Kimi 入口。
  • provider-registry-parity.test.ts:新增预设的 wire / oauthId 复用 / 模型名单 / 上下文窗口 / 档位断言;modelSuffixBracketStrip 和 jawcode alias 的派生列表自动纳入新 id。
  • providers.md(EN + zh-cn):Kimi 行补 kimi-responses 预设说明及两条 wire 的差异(思考加密 vs 明文)。

验证

  • bun x tsc --noEmit 干净。
  • bun test tests/providers/provider-registry-parity.test.ts tests/codex-integration/codex-catalog.test.ts tests/providers/model-rename-migration.test.ts:441 pass / 0 fail。
  • docs-site 构建:bun install --frozen-lockfile && bun run build(497 页,exit 0)。

备注

Review readiness checklist

This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:

  • All CI tests are green on my local testing.

  • I pushed my PR to the latest dev commit.

  • I resolved all correct Codex and CodeRabbit findings.

  • My PR is ready for review.

Summary by CodeRabbit

  • New Features

    • Added the optional Kimi Responses provider, allowing Kimi account logins to use the OpenAI Responses protocol.
    • Kimi coding models retain visible tool calls while reasoning content remains encrypted server-side with this preset.
    • The default Kimi Chat preset continues to provide plaintext reasoning.
  • Documentation

    • Updated the English and Chinese provider guides with details about the kimi-responses option and its behavior.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Assignees

Couldn't load assignees.