Repository navigation
feat(search): let users turn off the paid DeepSeek account search fallback - #197
Closed
ferrisching wants to merge 1 commit into
Closed
ferrisching wants to merge 1 commit into
ferrisching wants to merge 1 commit into
Conversation
…lback The DSH search wrapper falls back to the signed-in DeepSeek account when the configured provider reports a missing credential. That route calls the Search API, which bills every successful request, while the settings page and the search result disclosed none of it (issue #196). - add the accountSearchFallback setting (on by default, off keeps the original missing-credential error instead of spending) - state the per-request price in the Web & tools hint, in both locales - show the switch next to the search source radios unless the source is Codex - cover the opt-out in the account-search and capability-settings tests
Owner
|
这个问题已在 #199 处理并进入 main。目前采用的是直接移除插件额外的 DeepSeek 账号付费回退,因此不再增加单独的收费回退开关。同时补齐了“其他模型”总开关在各搜索入口的限制,并明确了自动和手动选择搜索来源时的路由边界。这个 PR 的问题目标已由新的实现覆盖,原方案就不再合并了,先关闭。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the billing surprise reported in #196: when DSH's own search provider reports a missing credential, the plugin falls back to the signed-in DeepSeek account's Search API, which bills every successful request — and nothing in the UI, the transcript or the tool result said so.
What this changes
accountSearchFallback(onby default,offavailable): when off, a missing-credential search keeps the originalWEB_PROVIDER_CREDENTIAL_MISSINGerror instead of falling back, so the search fails with the existing configuration guidance and spends nothing.Codex(the fallback never applies there). It is not inside the search-scope details, which hide for theDSHsource — the case where the fallback matters most.README.md/README.en.md: one row in the models-and-search table documenting the new switch.Default stays
onso existing installs behave as before; failing closed is opt-in. If you would rather shipoffby default, that is a one-line change insrc/capability-settings.js(the read fallback and the schema default) — happy to flip it.Behavior
accountSearchFallback: onaccountSearchFallback: offWEB_PROVIDER_CREDENTIAL_MISSINGCode
src/deepseek-account-search.js—createDshAccountSearchProviderchecksoptions.allowAccountFallback?.()before the account call, logsDeepSeek account fallback disabled, and rethrows.src/capability-settings.js—ACCOUNT_SEARCH_FALLBACK_FIELD/ACCOUNT_SEARCH_FALLBACK_MODES, read + patch validation.src/index.js— settings schema defaulton; wiresallowAccountFallbackfromreadCapabilitySettings.src/capability-preferences.jsx+src/client-preferences.jsx—AccountSearchFallbackPreference.src/client-locales.js— zh/en strings.Tests
The single failure (
subagent-runtime.test.mjs→ "preparation checks the provider-local CLI...") also fails on unmodifiedmainin this environment because the Codex subtask runtime is not installed; it is unrelated to this change.New coverage:
tests/deepseek-account-search.test.mjs— off keeps the credential error and never callsfetch; the default path still falls back (existing test).tests/capability-settings.test.mjs— defaulton, explicitoff, invalid values normalized, patch validation.tests/plugin-integration.test.mjs— the RPC status shape now includesaccountSearchFallback: 'on'.Build:
pnpm buildsucceeds locally (system node; the DSH-bundled runtime node cannotdlopenrolldown's native binding on this machine because of a Team ID mismatch, which is environment-specific).Not in this PR
#196 also asked whether the "other models" master switch should gate search. Reading
src/index.js(effectiveSearchMode+ the comment above the router), the switch is documented to turn off Codex subscription search for other models, leaving "DSH search" (including this fallback) in place — so that part looks intentional rather than a bug. I left it unchanged; if the intended semantics are different, this PR can be extended.