Skip to content

feat(registry): support search_url and feedback_url on custom registry providers - #4875

Merged
7Sageer merged 9 commits into
release/2026-11-13-2from
feat-custom-registry-endpoints
Nov 13, 2026
Merged

7Sageer merged 9 commits into
release/2026-11-13-2from
feat-custom-registry-endpoints

Conversation

@7Sageer

@7Sageer 7Sageer commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Requirement or Bug

通过自定义注册表(兼容 models.dev 的 api.json)接入自有模型网关的团队,在使用未登录托管 Kimi Code OAuth 账号的环境(或同时登录了托管账号但切到自定义注册表模型的会话)时,无法将 WebSearch 和 /feedback 路由到该注册表配套的搜索与反馈服务。本 PR 支持在 api.json 的每个 Provider 条目下声明可选的 search_url 与 feedback_url,自动按当前模型所属 Provider 启用并复用其凭证鉴权。

Bug Reproduction Steps

N/A

Root Cause

N/A

Code Changes

在兼容 models.dev 的 api.json 每个 Provider 条目下扩展两个扁平可选字符串字段 search_url 与 feedback_url,导入和启动刷新时落盘到 config.toml 对应 [providers.<id>] 表中(字段非空即启用,上游移除后下次刷新自动从本地移除)。运行时通过 resolveActiveModelProvider(对齐模型目录的 model.providerId ?? model.provider ?? default_provider 与 default_model 优先级)反查当前模型所属 Provider 的配置与凭证(resolveModelAuthMaterial:api_key、api_key_env、[providers.<id>.env]、oauth 及 custom_headers)发送请求。

WebSearch 留在 WebSearchProviderService。/feedback(含文本提交、session.zip 导出与 repo.zip 扫描打包及分片上传)统一收敛到引擎 App 级 IFeedbackService,外部契约只保留 availability 与 submit 两个方法。TUI 只负责门控、弹窗和显示结果,提交走 KimiHarness.submitFeedback。

flowchart LR
    Registry["api.json Provider Entry<br/>(search_url / feedback_url)"] -->|import / refresh| Config["config.toml<br/>[providers.&lt;id&gt;]"]
    Config --> Resolve["resolveActiveModelProvider<br/>+ resolveModelAuthMaterial"]
    Resolve --> WebSearch["WebSearchProviderService"]
    Resolve --> Feedback["IFeedbackService<br/>(availability / submit)"]
    TUI["TUI /feedback"] --> Harness["KimiHarness"]
    Harness --> Feedback
    Feedback -->|export| SessionZip["ISessionExportService<br/>(session.zip)"]
    Feedback -->|scan + pack| RepoZip["feedback/codebase<br/>(repo.zip)"]
    WebSearch -->|Bearer provider credential| SearchAPI["POST &lt;search_url&gt;"]
    Feedback -->|Bearer provider credential| FeedbackAPI["POST &lt;feedback_url&gt;<br/>+ /upload_url &amp; /upload_complete"]
Loading

当前模型的 provider 有非空 feedback_url 时,只用该 provider 的凭证发往该地址;凭证缺失或冲突时返回错误,不落到托管通道。没有 feedback_url 时才走托管 OAuth。session.zip 与 repo.zip 的准备、流式哈希计算和分片上传都在 FeedbackService.submit 内完成,附件部分失败通过 attachmentFailed: true 返回,不影响文本反馈的成功状态。

决策 选择 没选 理由
配置作用域 Provider 级(api.json Provider 条目 → [providers.<id>]) 顶层全局 [services] api.json 顶层是同构字典,顶层加元数据会让旧客户端触发无效条目告警;落盘在 Provider 下可避免被 OAuth 登录/登出覆盖,且切换模型时不会跨 Provider 串台上传会话或源码
启停控制 扁平可选字符串 search_url / feedback_url,非空即启用 额外增加布尔 enable 子对象 两个端点可独立启停,上游移除字段即可在刷新时自动关闭,且可直接复用现有标量 TOML 读写逻辑
搜索优先级 非 OAuth 显式 [services.moonshot_search] > 当前模型 Provider search_url > 托管 OAuth 搜索 [services.moonshot_search] 无条件最高 /login 会自动落盘带 oauth 引用的 [services.moonshot_search],区分是否携带 oauth 可同时保留 KIMI_WEB_SEARCH_BASE_URL 等显式覆盖能力,并避免托管登录遮蔽当前 Provider 的 search_url
feedback 归属与接口边界 IFeedbackService 收拢文本提交与附件打包上传,只暴露 availability 与 submit 在 SDK 维护第二套凭证解析,或跨层穿透 createUploadUrl / completeUpload 凭证规则、ISessionExportService、缓存与日志目录都在引擎内;分片上传是提交的内部步骤,收进 submit 后无需跨层暴露分片接口

阅读指南:

  1. packages/oauth/src/custom-registry.ts:api.json 解析、刷新落盘与 api_key_env 端点变更保护。
  2. packages/agent-core-v2/src/llm-adapter/model/model-auth.ts:resolveActiveModelProvider 统一解析模型与所属 Provider。
  3. packages/agent-core-v2/src/app/auth/webSearch/webSearchService.ts:搜索三层优先级。
  4. packages/agent-core-v2/src/app/auth/feedbackService.ts:按模型解析 feedback_url 或托管 OAuth,完成文本提交及 session.zip / repo.zip 打包分片上传。
  5. apps/kimi-code/src/tui/commands/info.ts:只做门控和弹窗,提交走 harness.submitFeedback。

feedback/{archive,upload,codebase} 从 apps/kimi-code/src/feedback/ 平移至 packages/agent-core-v2/src/app/auth/feedback/,可以略读。

Behavior Changes and Affected Users

行为 改动前 改动后 依赖旧行为的人群 退路
同时登录托管 Kimi Code OAuth 且切换到声明了 search_url 的自定义 Provider 模型时调用 WebSearch 命中 /login 自动写入的 [services.moonshot_search] 托管端点 优先命中当前模型所属 Provider 的 search_url;切回无 search_url 的模型仍走托管 OAuth 搜索 同时保留 /login 登录态与带 search_url 的自定义注册表配置的所有客户端(TUI、print 模式、desktop/web、VS Code、ACP、SDK) 设置 KIMI_WEB_SEARCH_BASE_URL / KIMI_WEB_SEARCH_API_KEY 或手写不含 oauth 的 [services.moonshot_search]
未登录托管 OAuth 账号、使用带 feedback_url 的 Provider 模型提交反馈 TUI 提示未登录并退出 引擎用该 Provider 的凭证向 feedback_url 提交文本和附件分片上传 使用带 feedback_url 的自定义注册表模型的 TUI 用户 从 Provider 配置移除 feedback_url
配置了 api_key_env 的自定义注册表 Provider 在刷新时上游新增或修改 search_url / feedback_url 仅在 api(base_url)变更时报错拦截 search_url 或 feedback_url 新增/变更同样报错拦截;上游移除字段允许正常刷新清除 使用 api_key_env 绑定环境变量密钥的自定义注册表用户 按报错提示临时移除 api_key_env 重新导入核验地址后再恢复
packages/agent-core-v2/docs/config-manifest.toml 与 SDK ProviderConfigSchema [providers."<name>"] 无 search_url / feedback_url 新增两个可选字符串键,未配置时读写行为与旧版完全一致;当字段在内存中被移除时写回 TOML 会同步删除旧键 所有读取 config.toml 的客户端及外部配置消费者 可选字段,不配置即与旧版一致
内部包 @moonshot-ai/kimi-code-sdk 的 KimiAuthFacade.submitFeedback / createFeedbackUploadUrl / completeFeedbackUpload 托管 OAuth 反馈的 SDK 入口 移除,统一改由 KimiHarness.feedbackAvailability 与 KimiHarness.submitFeedback 调引擎 IFeedbackService 直接调用内部 SDK KimiAuthFacade 反馈方法的调用方(仓库内仅 TUI 使用,已迁移) 改调 KimiHarness.submitFeedback(维护者已在 PR 确认移除旧内部入口)

受影响模块与测试覆盖:

  • @moonshot-ai/kimi-code-oauth:custom-registry.test.ts 覆盖导入、刷新移除及 api_key_env 地址变更拦截。
  • @moonshot-ai/agent-core-v2:test/app/auth/feedback.test.ts 与 test/app/auth/auth.test.ts 覆盖 feedback_url / search_url 凭证、default_model / default_provider / providerId 优先级、provider.env、缺凭证不串到托管地址、无配置时回退托管 OAuth,以及 session.zip + repo.zip 打包上传与部分失败降级;codebase-upload.test.ts 覆盖代码库扫描打包与分片上传。
  • @moonshot-ai/kimi-code:kimi-tui-message-flow.test.ts 覆盖 TUI 在引擎报告 needs-login / 抛错 / ready / attachmentFailed 时的门控与提示。
验证详情
  • packages/oauth、packages/node-sdk、packages/agent-core-v2、apps/kimi-code 相关 9 个测试文件共 874 项测试全部通过。
  • typecheck、lint:imports、oxlint --type-aware 零错误。

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue (external PRs: issue must have a maintainer's /approve).
  • I have added tests that prove my feature works.
  • The behavior-change table above is complete, and every removed behavior or flipped default is named in the changeset and either has an escape hatch or was explicitly approved by a maintainer in this PR.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

Copilot AI balanced review requested due to automatic review settings November 12, 2026 12:25
@changeset-bot

changeset-bot Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6ac735d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@7Hanrui

7Hanrui commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T11:40:01.087217Z 6ac735d Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b1f6e979f0

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/node-sdk/src/auth.ts Outdated
if (provider === undefined || feedbackUrl === undefined || feedbackUrl.length === 0) {
return undefined;
}
const credential = declaredProviderCredential(provider, providerName);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Honor provider env credentials for custom feedback

When a provider relies on the documented [providers.<name>.env] credential fallback, declaredProviderCredential returns none because it only examines apiKey, apiKeyEnv, and OAuth. The facade consequently ignores the configured feedback_url and falls through to the managed OAuth path, even though the same provider credential works for model requests and WebSearch. Resolve the provider-type-specific env credential here before selecting the custom feedback target.

Useful? React with 👍 / 👎.

Comment thread packages/node-sdk/src/auth.ts Outdated
Comment on lines +211 to +212
if (custom?.kind === 'custom') {
return fetchSubmitFeedback(custom.feedbackUrl, custom.apiKey, body);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Forward provider custom headers to feedback endpoints

When a custom provider requires [providers.<name>.custom_headers]—for example, a gateway that requires an organization or routing header—the new feedback path passes only the URL, API key, and body. The submit and both attachment helpers then construct fixed headers, so /feedback fails even though model requests and the new WebSearch path forward the provider's custom headers. Include these headers in all three custom feedback requests.

Useful? React with 👍 / 👎.

Comment on lines +119 to +122
when: (accessor) =>
accessor
.get(IWebSearchProviderService)
.hasWebSearchProvider(accessor.get(IAgentLoopService).getModel()),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Deactivate WebSearch after switching providers

When a session starts on a model whose provider has search_url and later switches to a model with neither search_url nor a managed/service fallback, this model-dependent predicate has already registered WebSearch. AgentToolActivationService skips registered contributions and never deactivates them when when becomes false, so subsequent tool reconciliation continues advertising WebSearch; any call then fails with “web search is no longer configured.” Reevaluate and remove this contribution on model changes, or filter it from the request tool set dynamically.

Useful? React with 👍 / 👎.

@7Hanrui

7Hanrui commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 8c20d54def

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@7Hanrui

7Hanrui commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

@codex review

1 similar comment
@7Hanrui

7Hanrui commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 297fb9819e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

"@moonshot-ai/kimi-code": patch
---

Support optional `search_url` and `feedback_url` fields on custom registry (`api.json`) providers for `WebSearch` and `/feedback`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve the existing feedback SDK methods

When an SDK consumer calls KimiHarness.auth.submitFeedback, createFeedbackUploadUrl, or completeFeedbackUpload, this release removes those exported KimiAuthFacade methods and result types, so previously valid clients stop compiling or fail at runtime. The replacement methods on KimiHarness do not preserve that API, while this changeset advertises only the new registry fields; retain deprecated forwarding methods, or obtain explicit approval for the break and name the lost API and migration in the changeset.

AGENTS.md reference: AGENTS.md:L114-L116

Useful? React with 👍 / 👎.

Comment on lines +582 to +584
feedback: {
availability: (modelAlias) =>
call('feedbackService', 'availability', [modelAlias]) as Promise<FeedbackAvailability>,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add cross-transport conformance coverage for feedback

For the new global.feedback facade, no case was added to test/helpers/conformance.ts, so none of its four methods or result variants is exercised through the memory and IPC transports that this public facade must support. Add the feedback flow to the shared conformance suite, including the optional model alias and error/login results, rather than relying only on direct core and TUI tests.

AGENTS.md reference: packages/klient/AGENTS.md:L36-L40

Useful? React with 👍 / 👎.

Comment on lines +89 to +90
const providerName = nonEmptyString(model.provider ?? model.providerId);
if (providerName === undefined) return undefined;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Resolve the effective provider consistently

When a model relies on default_provider, this resolver returns undefined even though the model catalog runs that model through IProviderService.getDefaultProvider(); when both providerId and provider are present, it also chooses them in the opposite order from the catalog. The same divergence exists in FeedbackService.customProvider, with feedback additionally ignoring the default model when its optional alias is omitted. These supported configurations therefore disable the custom endpoints or, in the dual-field case, can send searches and feedback to a different provider than the model request; mirror the catalog's providerId ?? provider ?? defaultProvider resolution and its default-model fallback in both services.

Useful? React with 👍 / 👎.

@7Hanrui

7Hanrui commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ee63280406

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +205 to +207
const token = refresh
? await this.oauth.resolveTokenProvider(key, auth.oauth)?.getAccessToken()
: await this.oauth.getCachedAccessToken(key, auth.oauth);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Return structured errors for custom OAuth failures

When a provider with feedback_url uses OAuth and reading or refreshing its token rejects—for example because the token store is unavailable or the refresh token is expired—the rejection escapes bearer() instead of producing the FeedbackSubmitResult/availability { kind: 'error' } variant. Consequently the kap-server route returns a transport-level 500 and klient callers receive a rejected call, unlike the managed branch which catches getAccessToken() failures. Catch both OAuth calls here and convert them to the declared error result.

Useful? React with 👍 / 👎.

input: FeedbackUploadUrlInput,
modelAlias?: string,
): Promise<FeedbackUploadUrlResult> {
const target = await this.resolveTarget(modelAlias, true);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Pin uploads to the original feedback target

When provider configuration changes after text feedback is submitted but before its attachments finish—for example, a runtime registry refresh removes the active alias or changes its feedback_url while the TUI is exporting and packaging the session—createUploadUrl() resolves the target again and can switch from the original custom endpoint to a different endpoint or the managed fallback. The resulting request carries an ID issued by the first backend, so attachment upload fails or can be associated with an unrelated record if IDs overlap; completeUpload() repeats the same re-resolution. Bind the upload flow to the target selected by submit() rather than consulting mutable model configuration at every stage.

Useful? React with 👍 / 👎.

@7Hanrui

7Hanrui commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 0d2023269a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@7Hanrui

7Hanrui commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: b23874b57c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@7Hanrui

7Hanrui commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 21b276f7d9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@7Sageer
7Sageer marked this pull request as ready for review November 13, 2026 11:18
@pkg-pr-new

pkg-pr-new Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@6ac735d
npx https://pkg.pr.new/@moonshot-ai/kimi-code@6ac735d

commit: 6ac735d

@7Hanrui

7Hanrui commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

@codex review

@7Sageer
7Sageer changed the base branch from main to release/2026-11-13-2 November 13, 2026 11:25
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: a827029866

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Web and desktop reach this machine through kap-server, so feedback submission resolves the active model's provider in the engine and is exposed on the same route and klient method. The SDK facade keeps the managed OAuth path and no longer re-derives provider credentials.
Product clients submit feedback through the engine. The SDK facade and oauth toolkit no longer keep a second managed-only submission path.
The HTTP body uses the engine field names, so the route forwards it and the klient contract imports the same schemas.
TUI reaches IFeedbackService through the harness. The HTTP routes, klient facade, and the schemas that only served them have no caller.
The feedback codebase scanner added in this branch calls
promisify(execFile) at module scope and is now reachable from the
agent-core-v2 index, so partial child_process mocks in these suites
failed module evaluation.
@7Sageer
7Sageer force-pushed the feat-custom-registry-endpoints branch from a827029 to 6ac735d Compare November 13, 2026 11:35
@7Hanrui

7Hanrui commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 6ac735ddfe

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@7Sageer
7Sageer merged commit 4c72e1d into release/2026-11-13-2 Nov 13, 2026
14 checks passed
@7Sageer
7Sageer deleted the feat-custom-registry-endpoints branch November 13, 2026 15:24
@github-actions github-actions Bot mentioned this pull request Nov 13, 2026
7723qqq pushed a commit to 7723qqq/kimi-code that referenced this pull request Nov 14, 2026
…y providers

Port MoonshotAI#4875: custom registry entries carry optional search_url/feedback_url into provider config; WebSearch and /feedback resolve the active model's provider credential, with the engine owning feedback submission and attachment packaging. The fork keeps its streaming dual-hash session digest, pre-read size guard and codebaseTruncated reporting. Also refresh the tool.test content-part snapshots that had drifted from the emitted block/startedAt fields.
wbxl2000 pushed a commit that referenced this pull request Nov 16, 2026
* fix(agent-core-v2): avoid quadratic cloning during session replay (#4885)

* fix(agent-core-v2): avoid quadratic cloning during session replay

* fix(agent-core-v2): isolate replay assignments and preserve rollback order

* refactor(agent-core-v2): make participant mutable replay explicit opt-in

---------

Co-authored-by: kimi-agent-bot <[email protected]>

* fix(agent-core-v2): validate Kimi media upload status (#4905)

* fix(agent-core-v2): reject failed Kimi image extraction

* chore: add Kimi image extraction changeset

* fix(agent-core-v2): validate Kimi media upload status

* fix(kap-server): forward swarm member task events (#4922)

* test(agent-core-v2): make zero-timeout task wait deterministic (#4925)

Co-authored-by: kimi-agent-bot <[email protected]>

* feat(registry): support search_url and feedback_url on custom registry providers (#4875)

* feat(registry): support search_url and feedback_url on custom registry providers

* fix(sdk): honor provider.env credentials and custom_headers for feedback_url

* refactor(core): submit feedback through the engine

Web and desktop reach this machine through kap-server, so feedback submission resolves the active model's provider in the engine and is exposed on the same route and klient method. The SDK facade keeps the managed OAuth path and no longer re-derives provider credentials.

* refactor(sdk): drop the unused feedback facade

Product clients submit feedback through the engine. The SDK facade and oauth toolkit no longer keep a second managed-only submission path.

* refactor(feedback): share engine schemas across route and klient

The HTTP body uses the engine field names, so the route forwards it and the klient contract imports the same schemas.

* refactor(feedback): drop unused kap and klient surfaces

TUI reaches IFeedbackService through the harness. The HTTP routes, klient facade, and the schemas that only served them have no caller.

* refactor(feedback): package and upload feedback attachments in the engine

* refactor(feedback): keep FeedbackService internal to agent-core-v2

* test(cli): provide execFile in node:child_process mocks

The feedback codebase scanner added in this branch calls
promisify(execFile) at module scope and is now reachable from the
agent-core-v2 index, so partial child_process mocks in these suites
failed module evaluation.

* feat(feedback): disclose submitted files, attach request_id, and drop text-only option (#4876)

* feat(registry): support search_url and feedback_url on custom registry providers

* fix(sdk): honor provider.env credentials and custom_headers for feedback_url

* refactor(core): submit feedback through the engine

Web and desktop reach this machine through kap-server, so feedback submission resolves the active model's provider in the engine and is exposed on the same route and klient method. The SDK facade keeps the managed OAuth path and no longer re-derives provider credentials.

* refactor(sdk): drop the unused feedback facade

Product clients submit feedback through the engine. The SDK facade and oauth toolkit no longer keep a second managed-only submission path.

* refactor(feedback): share engine schemas across route and klient

The HTTP body uses the engine field names, so the route forwards it and the klient contract imports the same schemas.

* refactor(feedback): drop unused kap and klient surfaces

TUI reaches IFeedbackService through the harness. The HTTP routes, klient facade, and the schemas that only served them have no caller.

* refactor(feedback): package and upload feedback attachments in the engine

* refactor(feedback): keep FeedbackService internal to agent-core-v2

* test(cli): provide execFile in node:child_process mocks

The feedback codebase scanner added in this branch calls
promisify(execFile) at module scope and is now reachable from the
agent-core-v2 index, so partial child_process mocks in these suites
failed module evaluation.

* feat(feedback): disclose submitted files, attach request_id, and drop text-only option

* fix(session-export): keep SESSION_NOT_FOUND for missing non-empty session ids

The global-log-only fallback exists for feedback submissions without an
active session (empty id). Scoping it to empty ids restores the 40401
envelope that kap-server's export route promises for unknown sessions.

* test(agent-core-v2): pin retained request id semantics in llmRequester assertions

* chore: sync web dist from code-app

code-app: 11563df26b92f0035659083327976a2e9b8e6727

code-app-release: b0b6d9c7a45c96ca48039ff05789c6e90f76ef20

code-app-local-build: 005d2b437493b7ab04d01f70542f3b6356699f4d

* ci: release packages (#4918)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix(agent-core-v2): align request id back-sync with main

---------

Co-authored-by: kimi-agent-bot <[email protected]>
Co-authored-by: Haozhe <[email protected]>
Co-authored-by: 7Sageer <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants