DeepSeek Harness search key also used by chat: same ref
"I entered a key on the search page, and later chat spending also went through that key" — this is neither an illusion nor search counting chat tokens; both places default to the same credential reference name. The search plugin stores no key at all, it writes only a name into the credential domain, and the model route reads that same name by default (#11174). Think of "name" and "value" separately and the relationship becomes obvious.
DeepSeek Harness: Layer 1: what "entering a key on the search page" actually writes
It writes a credential entry reference name, not a search plugin configuration item.
- The submit action calls
credentials.set(this.ref(), value), writing the value into the credential domain. this.ref()is the reference name, defaulting toDEEPSEEK_API_KEY.- In the search plugin's schema, the default reference name is the same string.
- So "entering a key" is really "assigning a value to this name".
- The search plugin side stores only "which name I use", never the secret itself.
DSH plugin: Layer 2: three defaults add up to the same name
The search page, the search plugin, and the API-key model route share the same default reference name, so by default they naturally share one key.
- Search settings page: default reference
DEEPSEEK_API_KEY. - Search plugin schema: the same default.
- DeepSeek API-key model connection: also resolves this name by default.
- All three defaults point at one credential entry, and whoever writes it takes effect.
- So the key you entered on the search page is what the model route reads.
DeepSeek Harness: Layer 3: why it shows up as "chat using this key"
On an API-key route, the model request carries exactly this credential; search did not forward it, they were the same entry all along.
- Before a session calls the model, the adapter fetches the secret by reference name.
- What it gets is the entry you just filled in.
- So the chat call naturally uses this key.
- This has nothing to do with search results or search billing.
- The deciding factor is "the provider is an API-key route", not "search is enabled".
DSH Plugin: Layer 4: when this explanation fails
If the session uses the account-login route, the model does not read this reference name and the symptom needs another cause.
- Open that session's
request/headerand read the provider. - If it is account login (deepseek-account), the model does not use an API key.
- Then "shared key" does not apply, and you should check account quota or other configuration.
- Likewise, changing the reference name only matters on API-key routes.
- Confirming this one point saves half of the useless investigation.
DeepSeek Harness: Where the defaults collide
Put the three defaults side by side and the collision is obvious.
| Location | Default reference | Role |
|---|---|---|
| Search settings page | DEEPSEEK_API_KEY | writes the value into credential storage |
| Search plugin schema | DEEPSEEK_API_KEY | reads the same name |
| API-key model connection | DEEPSEEK_API_KEY | model requests read it too |
All three rows point at one name, so "fill it once, both sides take effect" is default behavior rather than an accident.
DSH plugin: Three common misconceptions
Remove these three and misdiagnosis mostly stops.
- "Search counted the chat tokens" — no. Search only references the secret and takes no part in chat metering.
- "The key is stored in the search plugin" — no. The key lives in the credential domain; the plugin remembers only the reference name.
- "Changing the search address separates them" — no. Address and credential are different dimensions, and
DEEPSEEK_SEARCH_BASE_URLonly controls where requests land.
How to separate them
Giving search its own reference name is the smallest reversible change.
- Open search settings and change the credential reference from
DEEPSEEK_API_KEYtoDEEPSEEK_SEARCH_API_KEY. - Enter the search key under that new name.
- Confirm the model route still uses
DEEPSEEK_API_KEYwith its value unchanged. - Send a message that triggers search and confirm search works.
- Send an ordinary chat message and confirm the model still uses the original key.
- If search has its own service address, set it with
DEEPSEEK_SEARCH_BASE_URLseparately, not mixed with the chat baseURL.
Cautions
Name and value are separate decisions; only the name is shared.
- Do not read "shared" as "search bills the chat". They are simply one key.
- Change the reference name in both places. Renaming without entering a key under the new name breaks search.
- This explanation does not apply to account-login routes. Check the provider first.
- Search address and chat address are two variables. Mixing them leads you to misdiagnose it as a credential issue.
- Verify both directions after the change. Search must run, and chat must use the original key.
On UI shortcuts such as "cmd+R force refresh", the community reply gives no built-in implementation; file a separate request and do not fold it into this credential issue.
One last reminder: if after renaming the reference, search someday starts using the chat key again, first check whether a reinstall or reset restored the default name.
If you do not actually need them separated, keeping the default is simpler — one key for both places, one less configuration.See DSH plugin web_search ignores your gateway: fix baseURL for the related case.
FAQ
Chat also uses that key because both share the same credential reference name in DeepSeek Harness. The search page only calls credentials.set(reference, value) with a default reference of DEEPSEEK_API_KEY, and the API-key model route resolves the same name by default, so entering it overwrites what the model reads.
No, the search plugin stores no key in DeepSeek Harness; it references a name in the credential domain, and the credential service handles actual storage. Understanding that is what makes changing the reference name meaningful.
To separate the keys in DeepSeek Harness, change the credential reference in search settings to another name, such as DEEPSEEK_SEARCH_API_KEY, and enter the search key under that new name. The model route keeps reading DEEPSEEK_API_KEY, so the two no longer interfere.
No, they are separate: in DeepSeek Harness search has its own endpoint variable, DEEPSEEK_SEARCH_BASE_URL, independent of the chat route's baseURL, and the two can point at different services.
The shared-key explanation does not apply when a DeepSeek Harness session uses the account-login route (deepseek-account), because the model does not read DEEPSEEK_API_KEY at all and the symptom needs another cause. Check the provider in that session's request/header.
Related Terms
- credential reference name
- A credential reference name is a pointer to an entry in credential storage, and plugins and model routes use it to fetch a secret. When several features use the same reference name, they share the same key.— https://github.com/deepseek-ai/deepseek-harness/discussions/11174
- DEEPSEEK_API_KEY
- DEEPSEEK_API_KEY is the default credential reference name for DeepSeek-related features. It is the default in both the search settings page and API-key model routes, so by default both share one key.— https://github.com/deepseek-ai/deepseek-harness/discussions/11174
- DEEPSEEK_SEARCH_BASE_URL
- DEEPSEEK_SEARCH_BASE_URL is the search feature's independent service address variable, configured separately from the chat route's baseURL. It affects only where search requests land, not model calls.— https://github.com/deepseek-ai/deepseek-harness/discussions/11174
- credentials.set
- The write interface is `credentials.set`, which stores a value under a reference name in the credential domain. The search settings page calls it on submit, so the write goes to credential storage rather than inside the search plugin.— https://github.com/deepseek-ai/deepseek-harness/discussions/11174
Sources
- #11174 — after entering a key in the new websearch, chat also spends that key· deepseek-ai (GitHub Discussions)
- deepseek-ai/deepseek-harness (source repository)· GitHub