feat(web-search): add LangSearch provider and reranking#1893
feat(web-search): add LangSearch provider and reranking#1893lucasfelipe24 wants to merge 2 commits into
Conversation
🦋 Changeset detectedLatest commit: 7ed2c11 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1265c49d6b
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (config.services?.moonshotSearch !== undefined) { | ||
| await host.harness.removeService('moonshotSearch'); |
There was a problem hiding this comment.
Preserve Moonshot as the disabled-flag fallback
When a user configures LangSearch over an existing Moonshot backend, deleting moonshotSearch removes the fallback that both runtime implementations select whenever langsearch-web-search is later disabled. Disabling the experimental flag therefore hides WebSearch entirely instead of reverting to the user's working Moonshot credentials; keep the Moonshot section because LangSearch already takes precedence while enabled.
Useful? React with 👍 / 👎.
| if (config.services?.langsearch !== undefined) { | ||
| await host.harness.removeService('langsearch'); |
There was a problem hiding this comment.
Preserve the API key used by rerank when switching providers
If [services.rerank] omits its own API key, both engines intentionally reuse services.langsearch.apiKey. Switching to Moonshot here deletes that key without updating or removing the independently configured reranker, so subsequent searches silently stop being reranked. Before removing LangSearch, preserve its key in the rerank section or require a dedicated rerank key.
Useful? React with 👍 / 👎.
Related Issue
Related to #1041
Problem
WebSearchcurrently depends on Moonshot-managed search credentials, so users of third-party models cannot configure an independent backend. Search results also cannot be optionally reranked across backends.What changed
kimi searchconfiguration flows with atomicconfig.tomlpersistenceThe feature is gated by
langsearch-web-search; Moonshot search remains available when the flag is disabled. Reranking is configured independently and falls back to the original result order if the rerank request fails.Validation
pnpm run sherifpassedChecklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.