@deepseek-ai/dsh-llm-deepseek-api-key 0.1.7-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.i18n.yaml +46 -0
- package/README.md +78 -0
- package/README.zh.md +78 -0
- package/lib/index.js +69 -0
- package/lib/types/config.d.ts +74 -0
- package/lib/types/index.d.ts +9 -0
- package/package.json +53 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DeepSeek
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.i18n.yaml
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Bilingual-pair consistency record for README.md (docs/i18n/README.md): per heading
|
|
2
|
+
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
|
|
3
|
+
# After editing either side, bring the other along and re-record with:
|
|
4
|
+
# pnpm run verify-translation-pairing --write packages/llm/llm-deepseek-api-key/README.md
|
|
5
|
+
/:
|
|
6
|
+
en: 3bc991d01c87c9c6
|
|
7
|
+
zh: ba63ebb46b72bc3e
|
|
8
|
+
/deepseek-ai-dsh-llm-deepseek-api-key:
|
|
9
|
+
en: b6871195e386cc64
|
|
10
|
+
zh: 742b05a3ca80883c
|
|
11
|
+
/deepseek-ai-dsh-llm-deepseek-api-key/summary:
|
|
12
|
+
en: ad5a00f16f233d42
|
|
13
|
+
zh: 743d55599144836b
|
|
14
|
+
/deepseek-ai-dsh-llm-deepseek-api-key/table-of-contents:
|
|
15
|
+
en: 23386452a66b2fbd
|
|
16
|
+
zh: 4cf93c4bf17b3da2
|
|
17
|
+
/deepseek-ai-dsh-llm-deepseek-api-key/use-this-package:
|
|
18
|
+
en: ab3d8cc5be370482
|
|
19
|
+
zh: 8a8b9871d5afe1df
|
|
20
|
+
/deepseek-ai-dsh-llm-deepseek-api-key/understand-the-implementation:
|
|
21
|
+
en: a2a213e5629a569f
|
|
22
|
+
zh: eb23478d0081270a
|
|
23
|
+
/deepseek-ai-dsh-llm-deepseek-api-key/further-exploration:
|
|
24
|
+
en: e8bf99d78aa7035f
|
|
25
|
+
zh: e4a74d2d48b6d271
|
|
26
|
+
/deepseek-ai-dsh-llm-deepseek-api-key/model-experience:
|
|
27
|
+
en: 215e7ba838619b7b
|
|
28
|
+
zh: a311da3843709f90
|
|
29
|
+
/deepseek-ai-dsh-llm-deepseek-api-key/model-experience/authenticated-model-requests:
|
|
30
|
+
en: 5cf024f0d3370159
|
|
31
|
+
zh: ed480db8f348a42f
|
|
32
|
+
/deepseek-ai-dsh-llm-deepseek-api-key/model-experience/authenticated-model-requests/what-the-model-sees:
|
|
33
|
+
en: e5624a2c7bb26e90
|
|
34
|
+
zh: 44da0286a548f24a
|
|
35
|
+
/deepseek-ai-dsh-llm-deepseek-api-key/model-experience/authenticated-model-requests/token-effect:
|
|
36
|
+
en: fecefb75b719c317
|
|
37
|
+
zh: f0c2322f657c5914
|
|
38
|
+
/deepseek-ai-dsh-llm-deepseek-api-key/model-experience/authenticated-model-requests/kv-cache-effect:
|
|
39
|
+
en: 2004df60d997da79
|
|
40
|
+
zh: a215a6586b44746b
|
|
41
|
+
/deepseek-ai-dsh-llm-deepseek-api-key/known-limitations-and-deferred-work:
|
|
42
|
+
en: d5880c883b1b678f
|
|
43
|
+
zh: bf7a4da24ba75280
|
|
44
|
+
/deepseek-ai-dsh-llm-deepseek-api-key/known-limitations-and-deferred-work/dev-note:
|
|
45
|
+
en: 0525041e573e96b6
|
|
46
|
+
zh: b05ed8d852498e6b
|
package/README.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "DeepSeek api-key authentication and model discovery."
|
|
3
|
+
kind: "package-reference"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# @deepseek-ai/dsh-llm-deepseek-api-key
|
|
7
|
+
|
|
8
|
+
English | [中文](README.zh.md)
|
|
9
|
+
|
|
10
|
+
## Summary
|
|
11
|
+
|
|
12
|
+
Register authentication and model discovery for `deepseek-official`. This plugin shares the [Messages transport](../llm-deepseek/README.md) and owns credential resolution and catalog availability.
|
|
13
|
+
|
|
14
|
+
Authentication resolution returns the validated API key in `x-api-key` for both Messages and Files requests.
|
|
15
|
+
|
|
16
|
+
## Table of Contents
|
|
17
|
+
|
|
18
|
+
- [Use this package](#use-this-package)
|
|
19
|
+
- [Understand the implementation](#understand-the-implementation)
|
|
20
|
+
- [Further Exploration](#further-exploration)
|
|
21
|
+
- [Model Experience](#model-experience)
|
|
22
|
+
- [Known Limitations and Deferred Work](#known-limitations-and-deferred-work)
|
|
23
|
+
- [Dev Note](#dev-note)
|
|
24
|
+
|
|
25
|
+
<a id="use-this-package"></a>
|
|
26
|
+
## Use this package
|
|
27
|
+
|
|
28
|
+
`apiKeyEnv` defaults to `DEEPSEEK_API_KEY` and resolves per request. When the credentials service exists, its precedence applies; only compositions without that service read the launch environment directly. Requests with missing credentials fail with `MISSING_CREDENTIAL`; malformed credentials fail with `INVALID_CREDENTIAL`. Model discovery returns the configured catalog regardless of credentials.
|
|
29
|
+
|
|
30
|
+
```yaml
|
|
31
|
+
- id: llm-deepseek
|
|
32
|
+
name: '@deepseek-ai/dsh-llm-deepseek-api-key'
|
|
33
|
+
config:
|
|
34
|
+
reasoningEffort: high
|
|
35
|
+
apiKeyEnv: DEEPSEEK_API_KEY
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The endpoint and credential reference come from one configuration resolution. In-flight requests retain that snapshot; subsequent updates affect subsequent calls. Account login state cannot change this route’s credential.
|
|
39
|
+
|
|
40
|
+
`models` is an independently configurable catalog for this provider; defaults and protocol capabilities come from the shared transport. Discovery does not probe inference endpoints. The settings namespace is the Cordis entry id, or the plugin name without an entry. Product profiles retain the official entry id `llm-deepseek` and use `llm-deepseek-account` for the account route.
|
|
41
|
+
|
|
42
|
+
<a id="understand-the-implementation"></a>
|
|
43
|
+
## Understand the implementation
|
|
44
|
+
|
|
45
|
+
Registrations and listeners dispose with the plugin. Shared Host wiring supplies attachments, request extensions, anonymous identity, and atomic retry-policy updates; this plugin registers only its own route. No invariant companion is published: discovery derives directly from configuration without an independent copy.
|
|
46
|
+
|
|
47
|
+
<a id="further-exploration"></a>
|
|
48
|
+
## Further Exploration
|
|
49
|
+
|
|
50
|
+
[LLM streaming](../../../docs/subsystems/llm-streaming.md) · [Messages](../llm-deepseek/README.md)
|
|
51
|
+
|
|
52
|
+
<a id="model-experience"></a>
|
|
53
|
+
## Model Experience
|
|
54
|
+
|
|
55
|
+
### Authenticated model requests
|
|
56
|
+
|
|
57
|
+
#### What the model sees
|
|
58
|
+
|
|
59
|
+
Requests on `deepseek-official` add no model-visible text from this plugin; the shared Messages transport serializes requests.
|
|
60
|
+
|
|
61
|
+
#### Token effect
|
|
62
|
+
|
|
63
|
+
Authentication and discovery add no input tokens; the selected model and request content determine actual usage.
|
|
64
|
+
|
|
65
|
+
#### KV Cache effect
|
|
66
|
+
|
|
67
|
+
Credentials and catalog availability do not enter model input; the protocol transport owns request-prefix serialization.
|
|
68
|
+
|
|
69
|
+
## Known Limitations and Deferred Work
|
|
70
|
+
|
|
71
|
+
<a id="known-limitations-and-deferred-work"></a>
|
|
72
|
+
|
|
73
|
+
- The catalog is configuration metadata, not remote validation that a model is accepted; actual calls can still fail.
|
|
74
|
+
|
|
75
|
+
<a id="dev-note"></a>
|
|
76
|
+
### Dev Note
|
|
77
|
+
|
|
78
|
+
Registration and authentication tests also cover the Loader composition in the shared transport package.
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "DeepSeek API key authentication and model discovery."
|
|
3
|
+
kind: "package-reference"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# @deepseek-ai/dsh-llm-deepseek-api-key
|
|
7
|
+
|
|
8
|
+
[English](README.md) | 中文
|
|
9
|
+
|
|
10
|
+
## 概述
|
|
11
|
+
|
|
12
|
+
为 `deepseek-official` 注册独立的鉴权和模型发现插件。通过 [llm-deepseek](../llm-deepseek/README.zh.md) 共用 Messages 请求实现;本包拥有凭据解析和目录可用性判断。
|
|
13
|
+
|
|
14
|
+
鉴权解析将验证后的 API key 放入 `x-api-key`,供 Messages 和 Files 请求共同使用。
|
|
15
|
+
|
|
16
|
+
## 目录
|
|
17
|
+
|
|
18
|
+
- [使用此包](#use-this-package)
|
|
19
|
+
- [理解实现](#understand-the-implementation)
|
|
20
|
+
- [进一步探索](#further-exploration)
|
|
21
|
+
- [模型体验](#model-experience)
|
|
22
|
+
- [已知限制与后续工作](#known-limitations-and-deferred-work)
|
|
23
|
+
- [开发备注](#dev-note)
|
|
24
|
+
|
|
25
|
+
<a id="use-this-package"></a>
|
|
26
|
+
## 使用此包
|
|
27
|
+
|
|
28
|
+
`apiKeyEnv` 默认为 `DEEPSEEK_API_KEY`,在每次请求时解析凭据。已组合 credentials 服务时,按其优先级解析;只有未组合该服务时才直接读取启动环境。请求时凭据缺失以 `MISSING_CREDENTIAL` 失败;格式错误以 `INVALID_CREDENTIAL` 失败。模型发现始终返回配置的目录,不依赖凭据。
|
|
29
|
+
|
|
30
|
+
```yaml
|
|
31
|
+
- id: llm-deepseek
|
|
32
|
+
name: '@deepseek-ai/dsh-llm-deepseek-api-key'
|
|
33
|
+
config:
|
|
34
|
+
reasoningEffort: high
|
|
35
|
+
apiKeyEnv: DEEPSEEK_API_KEY
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
端点和凭据引用来自同一次配置解析;进行中的请求保留该快照,后续配置更新仅影响后续请求。账号登录态不影响该路由使用的凭据。
|
|
39
|
+
|
|
40
|
+
`models` 是该 provider 独立的可配置目录;默认值和协议能力来自共享传输包。目录判断不探测推理端点。设置命名空间采用 Cordis entry id,没有 entry 时采用插件名。产品保留 official 的 `llm-deepseek` entry id,账号使用 `llm-deepseek-account`。
|
|
41
|
+
|
|
42
|
+
<a id="understand-the-implementation"></a>
|
|
43
|
+
## 理解实现
|
|
44
|
+
|
|
45
|
+
注册和监听随插件生命周期释放。共享 Host 绑定提供附件访问、请求扩展、匿名标识和重试策略的原子更新;本包只注册自己的路由。无需 invariant companion:目录直接由配置派生,不维护独立副本。
|
|
46
|
+
|
|
47
|
+
<a id="further-exploration"></a>
|
|
48
|
+
## 进一步探索
|
|
49
|
+
|
|
50
|
+
[LLM streaming](../../../docs/subsystems/llm-streaming.zh.md) · [Messages](../llm-deepseek/README.zh.md)
|
|
51
|
+
|
|
52
|
+
<a id="model-experience"></a>
|
|
53
|
+
## 模型体验
|
|
54
|
+
|
|
55
|
+
### 已鉴权的模型请求
|
|
56
|
+
|
|
57
|
+
#### What the model sees
|
|
58
|
+
|
|
59
|
+
`deepseek-official` 请求不包含本插件添加的模型可见文本;请求由共享 Messages 传输序列化。
|
|
60
|
+
|
|
61
|
+
#### Token effect
|
|
62
|
+
|
|
63
|
+
鉴权和目录过滤不增加输入 token;实际调用的 token 由所选模型与请求内容决定。
|
|
64
|
+
|
|
65
|
+
#### KV Cache effect
|
|
66
|
+
|
|
67
|
+
凭据与目录可用性不进入模型输入;协议传输拥有请求前缀的序列化。
|
|
68
|
+
|
|
69
|
+
## 已知限制与后续工作
|
|
70
|
+
|
|
71
|
+
<a id="known-limitations-and-deferred-work"></a>
|
|
72
|
+
|
|
73
|
+
- 目录是配置元数据,不验证远端是否接受模型;实际调用仍可能失败。
|
|
74
|
+
|
|
75
|
+
<a id="dev-note"></a>
|
|
76
|
+
### 开发备注
|
|
77
|
+
|
|
78
|
+
注册与鉴权的测试也覆盖共享传输包中的 Loader 组合场景。
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { LlmError, assertUsableApiKey } from "@deepseek-ai/dsh-llm";
|
|
2
|
+
import { launchEnvironmentOf } from "@deepseek-ai/dsh-launch-environment";
|
|
3
|
+
import { catalogModelInfo, deepSeekConfigFields, plainOptions as plainOptions$1, registerDeepSeekProvider, resolveAdapterOptions as resolveAdapterOptions$1 } from "@deepseek-ai/dsh-llm-deepseek";
|
|
4
|
+
import z from "@deepseek-ai/schemastery";
|
|
5
|
+
import { credentialRef } from "@deepseek-ai/dsh-credentials";
|
|
6
|
+
//#region lib/types/config.js
|
|
7
|
+
const Config = z.object({
|
|
8
|
+
...deepSeekConfigFields,
|
|
9
|
+
apiKeyEnv: z.string().role("credential-ref").default("DEEPSEEK_API_KEY").volatile()
|
|
10
|
+
});
|
|
11
|
+
/** Read one validated provider configuration.
|
|
12
|
+
* @param config - live plugin configuration.
|
|
13
|
+
* @returns detached resolver inputs.
|
|
14
|
+
*/
|
|
15
|
+
function plainOptions(config) {
|
|
16
|
+
return {
|
|
17
|
+
...plainOptions$1(config),
|
|
18
|
+
apiKeyEnv: config.apiKeyEnv.get()
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
/** Resolve API-key and protocol settings together.
|
|
22
|
+
* @param config - raw deployment settings.
|
|
23
|
+
* @param environment - application launch environment.
|
|
24
|
+
* @returns validated endpoint facts and the matching credential reference.
|
|
25
|
+
*/
|
|
26
|
+
function resolveAdapterOptions(config, environment) {
|
|
27
|
+
return {
|
|
28
|
+
...resolveAdapterOptions$1(config, environment),
|
|
29
|
+
apiKeyEnv: credentialRef(config.apiKeyEnv ?? "DEEPSEEK_API_KEY")
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region lib/types/index.js
|
|
34
|
+
const name = "llm-deepseek-api-key";
|
|
35
|
+
const inject = ["llm"];
|
|
36
|
+
const PROVIDER = "deepseek-official";
|
|
37
|
+
function apply(ctx, config) {
|
|
38
|
+
const options = () => resolveAdapterOptions(plainOptions(config), launchEnvironmentOf(ctx));
|
|
39
|
+
options();
|
|
40
|
+
const resolveApiKey = async (connection) => {
|
|
41
|
+
const ref = connection.apiKeyEnv;
|
|
42
|
+
const credentials = ctx.get("credentials");
|
|
43
|
+
if (credentials !== void 0) {
|
|
44
|
+
const hit = await credentials.resolve(ref);
|
|
45
|
+
if (hit !== void 0) return assertUsableApiKey(hit.value, "llm-deepseek", ref);
|
|
46
|
+
} else {
|
|
47
|
+
const ambient = launchEnvironmentOf(ctx).get(ref);
|
|
48
|
+
if (ambient !== void 0 && ambient.value.length > 0) return assertUsableApiKey(ambient.value, "llm-deepseek", ref);
|
|
49
|
+
}
|
|
50
|
+
throw new LlmError(`llm-deepseek: no API key for provider route "${PROVIDER}"; store ${ref} through the credentials service (the web Models page writes it), or export ${ref} in the launching environment`, "MISSING_CREDENTIAL");
|
|
51
|
+
};
|
|
52
|
+
ctx.llm.registerConfigurableProviders([{
|
|
53
|
+
provider: PROVIDER,
|
|
54
|
+
displayName: "DeepSeek",
|
|
55
|
+
settingsNs: ctx.fiber.entry?.options.id ?? "llm-deepseek-api-key",
|
|
56
|
+
settingsPath: []
|
|
57
|
+
}]);
|
|
58
|
+
registerDeepSeekProvider(ctx, PROVIDER, {
|
|
59
|
+
options,
|
|
60
|
+
providerName: "DeepSeek",
|
|
61
|
+
resolveAuth: async (connection) => ({ headers: { "x-api-key": await resolveApiKey(connection) } }),
|
|
62
|
+
discoverModels: (provider) => {
|
|
63
|
+
const connection = options();
|
|
64
|
+
return Promise.resolve(connection.models.map((model) => catalogModelInfo(provider, model)));
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
//#endregion
|
|
69
|
+
export { Config, apply, inject, name, plainOptions, resolveAdapterOptions };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/** API-key configuration resolved together with one Messages endpoint generation. */
|
|
2
|
+
import type { Volatile } from '@deepseek-ai/cordis';
|
|
3
|
+
import z from '@deepseek-ai/schemastery';
|
|
4
|
+
import { type CredentialRef } from '@deepseek-ai/dsh-credentials';
|
|
5
|
+
import type { LaunchEnvironmentSnapshot } from '@deepseek-ai/dsh-launch-environment';
|
|
6
|
+
import { type Config as ProtocolConfig } from '@deepseek-ai/dsh-llm-deepseek';
|
|
7
|
+
import type { Options as ProtocolOptions, DeepSeekConnectionOptions } from '@deepseek-ai/dsh-llm-deepseek';
|
|
8
|
+
/** Messages configuration with a per-request API-key reference. */
|
|
9
|
+
export interface Config extends ProtocolConfig {
|
|
10
|
+
/** Credential reference resolved per request; defaults to DEEPSEEK_API_KEY. */
|
|
11
|
+
apiKeyEnv: Volatile<string>;
|
|
12
|
+
}
|
|
13
|
+
export declare const Config: z<Schemastery.ObjectS<NoInfer<{
|
|
14
|
+
apiKeyEnv: z<string, string, "volatile-defined">;
|
|
15
|
+
baseURL: z<string, string, "volatile">;
|
|
16
|
+
thinking: z<"enabled" | "disabled", "enabled" | "disabled", "volatile">;
|
|
17
|
+
reasoningEffort: z<"low" | "off" | "high" | "max", "low" | "off" | "high" | "max", "volatile">;
|
|
18
|
+
maxTokens: z<number, number, "volatile-defined">;
|
|
19
|
+
defaultContextWindow: z<number, number, "volatile-defined">;
|
|
20
|
+
models: z<NoInfer<import("@deepseek-ai/dsh-llm-deepseek").DeepSeekCatalogModel[]>, NoInfer<import("@deepseek-ai/dsh-llm-deepseek").DeepSeekCatalogModel[]>, "volatile-defined">;
|
|
21
|
+
streamIdleTimeoutMs: z<number, number, "volatile-defined">;
|
|
22
|
+
maxRequestFilesBytes: z<number, number, "volatile-defined">;
|
|
23
|
+
maxInlineRequestImageBytes: z<number, number, "volatile-defined">;
|
|
24
|
+
maxImagesPerRequest: z<number, number, "volatile-defined">;
|
|
25
|
+
imageOffloadByteQuantum: z<number, number, "volatile-defined">;
|
|
26
|
+
inlineImageOffloadByteQuantum: z<number, number, "volatile-defined">;
|
|
27
|
+
imageOffloadCountQuantum: z<number, number, "volatile-defined">;
|
|
28
|
+
filesApiTimeoutMs: z<number, number, "volatile-defined">;
|
|
29
|
+
fileExpiresAfterSeconds: z<number, number, "volatile-defined">;
|
|
30
|
+
fileRefreshMarginSeconds: z<number, number, "volatile-defined">;
|
|
31
|
+
fileQuotaCleanupBatch: z<number, number, "volatile-defined">;
|
|
32
|
+
retryPolicy: z<NoInfer<import("@deepseek-ai/dsh-llm").RetryPolicyConfig>, NoInfer<import("@deepseek-ai/dsh-llm").RetryPolicyConfig>, "volatile">;
|
|
33
|
+
}>>, Schemastery.ObjectT<NoInfer<{
|
|
34
|
+
apiKeyEnv: z<string, string, "volatile-defined">;
|
|
35
|
+
baseURL: z<string, string, "volatile">;
|
|
36
|
+
thinking: z<"enabled" | "disabled", "enabled" | "disabled", "volatile">;
|
|
37
|
+
reasoningEffort: z<"low" | "off" | "high" | "max", "low" | "off" | "high" | "max", "volatile">;
|
|
38
|
+
maxTokens: z<number, number, "volatile-defined">;
|
|
39
|
+
defaultContextWindow: z<number, number, "volatile-defined">;
|
|
40
|
+
models: z<NoInfer<import("@deepseek-ai/dsh-llm-deepseek").DeepSeekCatalogModel[]>, NoInfer<import("@deepseek-ai/dsh-llm-deepseek").DeepSeekCatalogModel[]>, "volatile-defined">;
|
|
41
|
+
streamIdleTimeoutMs: z<number, number, "volatile-defined">;
|
|
42
|
+
maxRequestFilesBytes: z<number, number, "volatile-defined">;
|
|
43
|
+
maxInlineRequestImageBytes: z<number, number, "volatile-defined">;
|
|
44
|
+
maxImagesPerRequest: z<number, number, "volatile-defined">;
|
|
45
|
+
imageOffloadByteQuantum: z<number, number, "volatile-defined">;
|
|
46
|
+
inlineImageOffloadByteQuantum: z<number, number, "volatile-defined">;
|
|
47
|
+
imageOffloadCountQuantum: z<number, number, "volatile-defined">;
|
|
48
|
+
filesApiTimeoutMs: z<number, number, "volatile-defined">;
|
|
49
|
+
fileExpiresAfterSeconds: z<number, number, "volatile-defined">;
|
|
50
|
+
fileRefreshMarginSeconds: z<number, number, "volatile-defined">;
|
|
51
|
+
fileQuotaCleanupBatch: z<number, number, "volatile-defined">;
|
|
52
|
+
retryPolicy: z<NoInfer<import("@deepseek-ai/dsh-llm").RetryPolicyConfig>, NoInfer<import("@deepseek-ai/dsh-llm").RetryPolicyConfig>, "volatile">;
|
|
53
|
+
}>>, "plain">;
|
|
54
|
+
/** Plain deployment inputs for the API-key provider. */
|
|
55
|
+
export type Options = ProtocolOptions & {
|
|
56
|
+
apiKeyEnv?: string;
|
|
57
|
+
};
|
|
58
|
+
/** Endpoint and credential reference captured from the same configuration generation. */
|
|
59
|
+
export interface ResolvedDeepSeekOptions extends DeepSeekConnectionOptions {
|
|
60
|
+
/** Credential reference used only for this connection snapshot. */
|
|
61
|
+
apiKeyEnv: CredentialRef;
|
|
62
|
+
}
|
|
63
|
+
/** Read one validated provider configuration.
|
|
64
|
+
* @param config - live plugin configuration.
|
|
65
|
+
* @returns detached resolver inputs.
|
|
66
|
+
*/
|
|
67
|
+
export declare function plainOptions(config: Config): Options;
|
|
68
|
+
/** Resolve API-key and protocol settings together.
|
|
69
|
+
* @param config - raw deployment settings.
|
|
70
|
+
* @param environment - application launch environment.
|
|
71
|
+
* @returns validated endpoint facts and the matching credential reference.
|
|
72
|
+
*/
|
|
73
|
+
export declare function resolveAdapterOptions(config: Options, environment?: LaunchEnvironmentSnapshot): ResolvedDeepSeekOptions;
|
|
74
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** API-key authentication and discovery for the official DeepSeek route. */
|
|
2
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
3
|
+
import { Config } from './config.ts';
|
|
4
|
+
export { Config, plainOptions, resolveAdapterOptions } from './config.ts';
|
|
5
|
+
export type { Options, ResolvedDeepSeekOptions } from './config.ts';
|
|
6
|
+
export declare const name = "llm-deepseek-api-key";
|
|
7
|
+
export declare const inject: string[];
|
|
8
|
+
export declare function apply(ctx: Context, config: Config): void;
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@deepseek-ai/dsh-llm-deepseek-api-key",
|
|
3
|
+
"description": "DeepSeek api-key provider authentication and discovery",
|
|
4
|
+
"version": "0.1.7-rc.2",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/deepseek-ai/deepseek-harness.git",
|
|
11
|
+
"directory": "packages/llm/llm-deepseek-api-key"
|
|
12
|
+
},
|
|
13
|
+
"type": "module",
|
|
14
|
+
"main": "lib/index.js",
|
|
15
|
+
"types": "lib/types/index.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./lib/types/index.d.ts",
|
|
19
|
+
"default": "./lib/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./src/*": "./src/*",
|
|
22
|
+
"./package.json": "./package.json"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"lib/index.js",
|
|
26
|
+
"lib/types/**/*.d.ts"
|
|
27
|
+
],
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"@deepseek-ai/cordis": "~4.0.4",
|
|
31
|
+
"@deepseek-ai/dsh-llm": "0.1.7-rc.2",
|
|
32
|
+
"@deepseek-ai/dsh-llm-deepseek": "0.1.7-rc.2",
|
|
33
|
+
"@deepseek-ai/dsh-launch-environment": "0.1.7-rc.2",
|
|
34
|
+
"@deepseek-ai/dsh-credentials": "0.1.7-rc.2",
|
|
35
|
+
"@deepseek-ai/cordis-plugin-loader": "~1.0.5"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@deepseek-ai/cordis": "~4.0.4",
|
|
39
|
+
"@deepseek-ai/dsh-llm": "0.1.7-rc.2",
|
|
40
|
+
"@deepseek-ai/dsh-llm-deepseek": "0.1.7-rc.2",
|
|
41
|
+
"@deepseek-ai/dsh-launch-environment": "0.1.7-rc.2",
|
|
42
|
+
"@deepseek-ai/dsh-credentials": "0.1.7-rc.2",
|
|
43
|
+
"@deepseek-ai/cordis-plugin-loader": "~1.0.5"
|
|
44
|
+
},
|
|
45
|
+
"peerDependenciesMeta": {
|
|
46
|
+
"@deepseek-ai/cordis-plugin-loader": {
|
|
47
|
+
"optional": true
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@deepseek-ai/schemastery": "~3.18.4"
|
|
52
|
+
}
|
|
53
|
+
}
|