MoonshotAI / MoonshotAI/kimi-code
Kimi Code 内置 WebSearch 与第三方模型原生 web_search 冲突
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 1.2k
- Avg merge
- 11h 53m
- Merged PRs (30d)
- 350
Description
问题描述
Kimi Code 内置了由客户端执行的 WebSearch 工具。
部分第三方模型(例如 Grok)同时通过 Responses API 提供由模型服务商执行的原生 web_search 工具。
这两种工具名称和用途接近,但执行位置不同:
WebSearch:由 Kimi Code 客户端执行。web_search:由第三方模型服务商在服务端执行。
当第三方模型本身支持原生 web_search 时,Kimi Code 仍然会向模型提供自己的 WebSearch,可能造成工具重复或冲突,模型也无法明确判断应该使用哪一种搜索方式。
目前可以全局关闭 Kimi Code 的工具:
[tools]
disabled = ["WebSearch"]
但关闭后,Kimi Code 并不会自动启用或传递第三方模型的原生 web_search,因此模型可能完全失去网页搜索能力。
期望行为
希望 Kimi Code 能够支持第三方模型提供的原生 web_search,并允许用户在模型配置中选择使用:
- Kimi Code 内置的
WebSearch - 第三方模型原生的
web_search
当启用模型原生 web_search 时,Kimi Code 应避免同时提供内置 WebSearch,防止两种搜索工具冲突。
补充说明
已确认部分第三方模型通过 OpenAI 兼容 Responses API 使用:
{
"tools": [
{
"type": "web_search"
}
]
}
可以正常执行服务端网页搜索。
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the model configuration and tool-passing path for the OpenAI-compatible Responses API, then inspect how the existing [tools] disabled setting affects WebSearch. Define how a model selects native web_search versus the built-in tool, and verify that the selected option is sent without exposing both search tools. Add or update tests for each selection and the conflict-avoidance behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100