refactor(llm): take the DeepSeek routes' credentials from ctx.deepseekAuth

The two DeepSeek route plugins read their own credential and published it through `ctx.llm.providerCredential()` for the web providers. Those providers now ask `ctx.deepseekAuth`, so nothing reads the publication. Each route asks the same service for the credential of its own requests: the API-key route for its key in `x-api-key`, the account route for the account sign-in, both for destinations under the origin of the route's base URL.

`LlmAdapter.providerCredential()`, `LlmRuntime.providerCredential()`, `ProviderCredential`, `ProviderCredentialGrant`, and `LlmCredentialKind` are removed from `dsh-llm`, and the `credential` option and `DeepSeekProviderCredentialOptions` from the DeepSeek transport. `DeepSeekRequestAuth` keeps the headers, the withdrawal signal, and the failure callback; its bare `value` and `reject` served only the publication.

The API-key route reports an unusable key as `INVALID_CREDENTIAL` with the text it had. Tests of the publication are replaced by tests of the deployment each route connects.
This commit is contained in:
LegGasai committed 2026-11-15 16:53:29 +08:00
1 parent 0afb961659
commit 6eb3805bf3
30 files changed
+105 -625

No files matched your search

-1
View File
@@ -494,7 +494,6 @@ export const LINK_MAP: Readonly<Record<string, string>> = {
LlmResolvedModelInfo: 'llm-streaming.md',
LlmFailure: 'llm-streaming.md',
LlmImageRequestPricing: 'llm-streaming.md',
ProviderCredential: 'llm-streaming.md',
LlmModelInfo: 'llm-streaming.md',
LlmProviderInfo: 'llm-streaming.md',
LlmConfigurableProvider: 'llm-streaming.md',
-10
View File
@@ -1842,16 +1842,6 @@
"symbol": "LlmNativeAuth",
"source": "packages/llm/llm/src/types.ts"
},
{
"doc": "docs/subsystems/llm-streaming.md",
"symbol": "ProviderCredentialGrant",
"source": "packages/llm/llm/src/types.ts"
},
{
"doc": "docs/subsystems/llm-streaming.md",
"symbol": "ProviderCredential",
"source": "packages/llm/llm/src/types.ts"
},
{
"doc": "docs/subsystems/permission-presets.md",
"symbol": "Config",