@warlock.js/ai-deepseek 4.6.0

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.
@@ -0,0 +1,62 @@
1
+ //#region ../@warlock.js/ai-deepseek/src/known-models.d.ts
2
+ /**
3
+ * Capability inference for DeepSeek chat model ids.
4
+ *
5
+ * DeepSeek's API is OpenAI-compatible on the wire (`@warlock.js/ai-deepseek`
6
+ * wraps {@link OpenAISDK}), but its model **names** are not OpenAI names —
7
+ * so OpenAI's own prefix lists (`gpt-4o`, `o3`, …) never match them. This
8
+ * module supplies DeepSeek's OWN name-based inference, which the
9
+ * {@link DeepSeekSDK} injects as explicit capability booleans into the
10
+ * wrapped `openai.model(...)` call (explicit config wins over OpenAI's
11
+ * inference inside `OpenAIModel`).
12
+ *
13
+ * Verified against the official DeepSeek API docs (api-docs.deepseek.com,
14
+ * mid-2026): base URL `https://api.deepseek.com`, OpenAI-compatible Chat
15
+ * Completions. Two reasoning-capable surfaces exist — the legacy
16
+ * `deepseek-reasoner` (thinking mode) and the `*-pro` tier — while
17
+ * `deepseek-chat` is the non-thinking surface. No DeepSeek chat model
18
+ * documents image (vision) input, so vision inference is conservatively
19
+ * `false` for every id.
20
+ */
21
+ /**
22
+ * Default DeepSeek chat model ids, surfaced for discovery and docs.
23
+ *
24
+ * - `deepseek-chat` — the non-thinking surface (V3 lineage). Fast, cheap,
25
+ * broad production coverage. Not reasoning-capable.
26
+ * - `deepseek-reasoner` — the thinking surface (R1 lineage). Emits a
27
+ * reasoning channel and accepts the reasoning-effort knob.
28
+ *
29
+ * Both legacy names are scheduled for retirement (2026/07/24 per DeepSeek's
30
+ * deprecation notice) in favor of the `deepseek-v4-*` family
31
+ * (`deepseek-v4-flash`, `deepseek-v4-pro`), which this inference also
32
+ * understands. The list is informational only — `deepseek.model({ name })`
33
+ * accepts any id the upstream serves.
34
+ */
35
+ declare const DEEPSEEK_CHAT_MODELS: readonly ["deepseek-chat", "deepseek-reasoner", "deepseek-v4-flash", "deepseek-v4-pro"];
36
+ /**
37
+ * Infer whether a DeepSeek model id is reasoning-capable based on the
38
+ * known substrings. Unknown ids default to `false` so the adapter never
39
+ * forwards an unsupported reasoning param to a non-thinking model.
40
+ *
41
+ * @example
42
+ * inferReasoningCapability("deepseek-reasoner"); // → true
43
+ * inferReasoningCapability("deepseek-v4-pro"); // → true
44
+ * inferReasoningCapability("deepseek-chat"); // → false
45
+ * inferReasoningCapability("deepseek-v4-flash"); // → false
46
+ */
47
+ declare function inferReasoningCapability(modelId: string): boolean;
48
+ /**
49
+ * Infer whether a DeepSeek model id supports vision based on the known
50
+ * substrings. Today this is always `false` (see
51
+ * {@link VISION_CAPABLE_SUBSTRINGS}); kept as a function so the
52
+ * {@link DeepSeekSDK} call site and the override semantics stay identical
53
+ * to the other adapters, ready for a future multimodal id.
54
+ *
55
+ * @example
56
+ * inferVisionCapability("deepseek-chat"); // → false
57
+ * inferVisionCapability("deepseek-reasoner"); // → false
58
+ */
59
+ declare function inferVisionCapability(modelId: string): boolean;
60
+ //#endregion
61
+ export { DEEPSEEK_CHAT_MODELS, inferReasoningCapability, inferVisionCapability };
62
+ //# sourceMappingURL=known-models.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"known-models.d.mts","names":[],"sources":["../../../../../../@warlock.js/ai-deepseek/src/known-models.ts"],"mappings":";;AAkCA;;;;AAKU;AA4BV;;;;AAAwD;AA+BxD;;;;AAAqD;;;;;;;;;;;;;;;;;;cAhExC,oBAAA;;;;;;;;;;;;iBAiCG,wBAAA,CAAyB,OAAe;;;;;;;;;;;;iBA+BxC,qBAAA,CAAsB,OAAe"}
@@ -0,0 +1,101 @@
1
+ //#region ../@warlock.js/ai-deepseek/src/known-models.ts
2
+ /**
3
+ * Capability inference for DeepSeek chat model ids.
4
+ *
5
+ * DeepSeek's API is OpenAI-compatible on the wire (`@warlock.js/ai-deepseek`
6
+ * wraps {@link OpenAISDK}), but its model **names** are not OpenAI names —
7
+ * so OpenAI's own prefix lists (`gpt-4o`, `o3`, …) never match them. This
8
+ * module supplies DeepSeek's OWN name-based inference, which the
9
+ * {@link DeepSeekSDK} injects as explicit capability booleans into the
10
+ * wrapped `openai.model(...)` call (explicit config wins over OpenAI's
11
+ * inference inside `OpenAIModel`).
12
+ *
13
+ * Verified against the official DeepSeek API docs (api-docs.deepseek.com,
14
+ * mid-2026): base URL `https://api.deepseek.com`, OpenAI-compatible Chat
15
+ * Completions. Two reasoning-capable surfaces exist — the legacy
16
+ * `deepseek-reasoner` (thinking mode) and the `*-pro` tier — while
17
+ * `deepseek-chat` is the non-thinking surface. No DeepSeek chat model
18
+ * documents image (vision) input, so vision inference is conservatively
19
+ * `false` for every id.
20
+ */
21
+ /**
22
+ * Default DeepSeek chat model ids, surfaced for discovery and docs.
23
+ *
24
+ * - `deepseek-chat` — the non-thinking surface (V3 lineage). Fast, cheap,
25
+ * broad production coverage. Not reasoning-capable.
26
+ * - `deepseek-reasoner` — the thinking surface (R1 lineage). Emits a
27
+ * reasoning channel and accepts the reasoning-effort knob.
28
+ *
29
+ * Both legacy names are scheduled for retirement (2026/07/24 per DeepSeek's
30
+ * deprecation notice) in favor of the `deepseek-v4-*` family
31
+ * (`deepseek-v4-flash`, `deepseek-v4-pro`), which this inference also
32
+ * understands. The list is informational only — `deepseek.model({ name })`
33
+ * accepts any id the upstream serves.
34
+ */
35
+ const DEEPSEEK_CHAT_MODELS = [
36
+ "deepseek-chat",
37
+ "deepseek-reasoner",
38
+ "deepseek-v4-flash",
39
+ "deepseek-v4-pro"
40
+ ];
41
+ /**
42
+ * Substrings identifying DeepSeek model ids that expose a reasoning /
43
+ * thinking channel and accept the reasoning-effort knob.
44
+ *
45
+ * - `deepseek-reasoner` — the dedicated thinking surface (R1 lineage).
46
+ * - `-pro` — the V4 quality tier (`deepseek-v4-pro`), which thinks by
47
+ * default per DeepSeek's docs.
48
+ *
49
+ * `deepseek-chat` (the V3 non-thinking surface) and `deepseek-v4-flash`
50
+ * stay `false`. A substring match tolerates date/preview suffixes the
51
+ * provider may append. Override per-model via
52
+ * `deepseek.model({ name, reasoning: true | false })`.
53
+ */
54
+ const REASONING_CAPABLE_SUBSTRINGS = ["deepseek-reasoner", "-pro"];
55
+ /**
56
+ * Infer whether a DeepSeek model id is reasoning-capable based on the
57
+ * known substrings. Unknown ids default to `false` so the adapter never
58
+ * forwards an unsupported reasoning param to a non-thinking model.
59
+ *
60
+ * @example
61
+ * inferReasoningCapability("deepseek-reasoner"); // → true
62
+ * inferReasoningCapability("deepseek-v4-pro"); // → true
63
+ * inferReasoningCapability("deepseek-chat"); // → false
64
+ * inferReasoningCapability("deepseek-v4-flash"); // → false
65
+ */
66
+ function inferReasoningCapability(modelId) {
67
+ const normalized = modelId.toLowerCase();
68
+ return REASONING_CAPABLE_SUBSTRINGS.some((fragment) => normalized.includes(fragment));
69
+ }
70
+ /**
71
+ * Substrings identifying DeepSeek model ids that accept image (vision)
72
+ * input.
73
+ *
74
+ * Currently **empty**: as of mid-2026, no DeepSeek chat model documents
75
+ * vision input on the OpenAI-compatible Chat Completions endpoint, so
76
+ * inference returns `false` for every id and passing an image attachment
77
+ * surfaces a clear, agent-side capability error instead of an opaque 400.
78
+ * Append a fragment here (and a paired spec case) the day DeepSeek ships a
79
+ * multimodal chat model. Devs can always opt in per-model via
80
+ * `deepseek.model({ name, vision: true })`.
81
+ */
82
+ const VISION_CAPABLE_SUBSTRINGS = [];
83
+ /**
84
+ * Infer whether a DeepSeek model id supports vision based on the known
85
+ * substrings. Today this is always `false` (see
86
+ * {@link VISION_CAPABLE_SUBSTRINGS}); kept as a function so the
87
+ * {@link DeepSeekSDK} call site and the override semantics stay identical
88
+ * to the other adapters, ready for a future multimodal id.
89
+ *
90
+ * @example
91
+ * inferVisionCapability("deepseek-chat"); // → false
92
+ * inferVisionCapability("deepseek-reasoner"); // → false
93
+ */
94
+ function inferVisionCapability(modelId) {
95
+ const normalized = modelId.toLowerCase();
96
+ return VISION_CAPABLE_SUBSTRINGS.some((fragment) => normalized.includes(fragment));
97
+ }
98
+
99
+ //#endregion
100
+ export { DEEPSEEK_CHAT_MODELS, inferReasoningCapability, inferVisionCapability };
101
+ //# sourceMappingURL=known-models.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"known-models.mjs","names":[],"sources":["../../../../../../@warlock.js/ai-deepseek/src/known-models.ts"],"sourcesContent":["/**\n * Capability inference for DeepSeek chat model ids.\n *\n * DeepSeek's API is OpenAI-compatible on the wire (`@warlock.js/ai-deepseek`\n * wraps {@link OpenAISDK}), but its model **names** are not OpenAI names —\n * so OpenAI's own prefix lists (`gpt-4o`, `o3`, …) never match them. This\n * module supplies DeepSeek's OWN name-based inference, which the\n * {@link DeepSeekSDK} injects as explicit capability booleans into the\n * wrapped `openai.model(...)` call (explicit config wins over OpenAI's\n * inference inside `OpenAIModel`).\n *\n * Verified against the official DeepSeek API docs (api-docs.deepseek.com,\n * mid-2026): base URL `https://api.deepseek.com`, OpenAI-compatible Chat\n * Completions. Two reasoning-capable surfaces exist — the legacy\n * `deepseek-reasoner` (thinking mode) and the `*-pro` tier — while\n * `deepseek-chat` is the non-thinking surface. No DeepSeek chat model\n * documents image (vision) input, so vision inference is conservatively\n * `false` for every id.\n */\n\n/**\n * Default DeepSeek chat model ids, surfaced for discovery and docs.\n *\n * - `deepseek-chat` — the non-thinking surface (V3 lineage). Fast, cheap,\n * broad production coverage. Not reasoning-capable.\n * - `deepseek-reasoner` — the thinking surface (R1 lineage). Emits a\n * reasoning channel and accepts the reasoning-effort knob.\n *\n * Both legacy names are scheduled for retirement (2026/07/24 per DeepSeek's\n * deprecation notice) in favor of the `deepseek-v4-*` family\n * (`deepseek-v4-flash`, `deepseek-v4-pro`), which this inference also\n * understands. The list is informational only — `deepseek.model({ name })`\n * accepts any id the upstream serves.\n */\nexport const DEEPSEEK_CHAT_MODELS = [\n \"deepseek-chat\",\n \"deepseek-reasoner\",\n \"deepseek-v4-flash\",\n \"deepseek-v4-pro\",\n] as const;\n\n/**\n * Substrings identifying DeepSeek model ids that expose a reasoning /\n * thinking channel and accept the reasoning-effort knob.\n *\n * - `deepseek-reasoner` — the dedicated thinking surface (R1 lineage).\n * - `-pro` — the V4 quality tier (`deepseek-v4-pro`), which thinks by\n * default per DeepSeek's docs.\n *\n * `deepseek-chat` (the V3 non-thinking surface) and `deepseek-v4-flash`\n * stay `false`. A substring match tolerates date/preview suffixes the\n * provider may append. Override per-model via\n * `deepseek.model({ name, reasoning: true | false })`.\n */\nconst REASONING_CAPABLE_SUBSTRINGS = [\"deepseek-reasoner\", \"-pro\"];\n\n/**\n * Infer whether a DeepSeek model id is reasoning-capable based on the\n * known substrings. Unknown ids default to `false` so the adapter never\n * forwards an unsupported reasoning param to a non-thinking model.\n *\n * @example\n * inferReasoningCapability(\"deepseek-reasoner\"); // → true\n * inferReasoningCapability(\"deepseek-v4-pro\"); // → true\n * inferReasoningCapability(\"deepseek-chat\"); // → false\n * inferReasoningCapability(\"deepseek-v4-flash\"); // → false\n */\nexport function inferReasoningCapability(modelId: string): boolean {\n const normalized = modelId.toLowerCase();\n\n return REASONING_CAPABLE_SUBSTRINGS.some((fragment) => normalized.includes(fragment));\n}\n\n/**\n * Substrings identifying DeepSeek model ids that accept image (vision)\n * input.\n *\n * Currently **empty**: as of mid-2026, no DeepSeek chat model documents\n * vision input on the OpenAI-compatible Chat Completions endpoint, so\n * inference returns `false` for every id and passing an image attachment\n * surfaces a clear, agent-side capability error instead of an opaque 400.\n * Append a fragment here (and a paired spec case) the day DeepSeek ships a\n * multimodal chat model. Devs can always opt in per-model via\n * `deepseek.model({ name, vision: true })`.\n */\nconst VISION_CAPABLE_SUBSTRINGS: readonly string[] = [];\n\n/**\n * Infer whether a DeepSeek model id supports vision based on the known\n * substrings. Today this is always `false` (see\n * {@link VISION_CAPABLE_SUBSTRINGS}); kept as a function so the\n * {@link DeepSeekSDK} call site and the override semantics stay identical\n * to the other adapters, ready for a future multimodal id.\n *\n * @example\n * inferVisionCapability(\"deepseek-chat\"); // → false\n * inferVisionCapability(\"deepseek-reasoner\"); // → false\n */\nexport function inferVisionCapability(modelId: string): boolean {\n const normalized = modelId.toLowerCase();\n\n return VISION_CAPABLE_SUBSTRINGS.some((fragment) => normalized.includes(fragment));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,MAAa,uBAAuB;CAClC;CACA;CACA;CACA;AACF;;;;;;;;;;;;;;AAeA,MAAM,+BAA+B,CAAC,qBAAqB,MAAM;;;;;;;;;;;;AAajE,SAAgB,yBAAyB,SAA0B;CACjE,MAAM,aAAa,QAAQ,YAAY;CAEvC,OAAO,6BAA6B,MAAM,aAAa,WAAW,SAAS,QAAQ,CAAC;AACtF;;;;;;;;;;;;;AAcA,MAAM,4BAA+C,CAAC;;;;;;;;;;;;AAatD,SAAgB,sBAAsB,SAA0B;CAC9D,MAAM,aAAa,QAAQ,YAAY;CAEvC,OAAO,0BAA0B,MAAM,aAAa,WAAW,SAAS,QAAQ,CAAC;AACnF"}
package/esm/sdk.d.mts ADDED
@@ -0,0 +1,94 @@
1
+ import { DeepSeekEmbedderConfig, DeepSeekImageConfig, DeepSeekModelConfig, DeepSeekSDKConfig } from "./config.type.mjs";
2
+ import { EmbedderContract, ImageModelContract, ModelContract, SDKAdapterContract } from "@warlock.js/ai";
3
+
4
+ //#region ../@warlock.js/ai-deepseek/src/sdk.d.ts
5
+ /**
6
+ * DeepSeek-backed implementation of `SDKAdapterContract`.
7
+ *
8
+ * **Role.** The package entry point for DeepSeek models. DeepSeek's API is
9
+ * OpenAI-compatible on the wire, so rather than reimplementing the
10
+ * battle-tested Chat Completions translation, this is a **thin wrapper**
11
+ * over {@link OpenAISDK} from `@warlock.js/ai-openai`: it constructs one
12
+ * internal `OpenAISDK` pinned to DeepSeek's `baseURL` and the `"deepseek"`
13
+ * provider label, and delegates `model()` / `embedder()` / `image()` /
14
+ * `count()` straight to it. Construct one `DeepSeekSDK` per account and
15
+ * reuse it everywhere.
16
+ *
17
+ * **What the wrapper adds over a bare `OpenAISDK`.** DeepSeek's model
18
+ * **names** are not OpenAI names, so OpenAI's own vision/reasoning prefix
19
+ * lists never match them. This wrapper injects DeepSeek's OWN capability
20
+ * inference (see `known-models.ts`) and built-in DeepSeek pricing defaults
21
+ * as explicit values on every `model()` call — so `deepseek-reasoner` is
22
+ * correctly flagged reasoning-capable and `deepseek-chat` is not, even
23
+ * though neither matches an OpenAI prefix. An explicit `vision` /
24
+ * `reasoning` / `pricing` you pass per model always wins over these
25
+ * injected defaults.
26
+ *
27
+ * **Responsibility.**
28
+ * - Owns: one long-lived internal `OpenAISDK` (auth, DeepSeek base URL)
29
+ * and DeepSeek's capability + pricing defaults.
30
+ * - Does NOT own: the wire protocol, streaming loop, message/tool
31
+ * translation, or error wrapping — all inherited unchanged from
32
+ * `OpenAISDK` / `OpenAIModel`.
33
+ *
34
+ * @example
35
+ * const deepseek = new DeepSeekSDK({ apiKey: process.env.DEEPSEEK_API_KEY! });
36
+ * const chat = deepseek.model({ name: "deepseek-chat" }); // reasoning=false
37
+ * const reasoner = deepseek.model({ name: "deepseek-reasoner" }); // reasoning=true
38
+ *
39
+ * @example
40
+ * // Compose into an `ai.deepseek` namespace for ergonomic agent wiring
41
+ * const ai = { agent, tool, deepseek: new DeepSeekSDK({ apiKey }) };
42
+ * const myAgent = ai.agent({ model: ai.deepseek.model({ name: "deepseek-reasoner" }) });
43
+ */
44
+ declare class DeepSeekSDK implements SDKAdapterContract {
45
+ /** The wrapped OpenAI-compatible client, pinned to DeepSeek. */
46
+ private readonly openai;
47
+ private readonly provider;
48
+ private readonly pricing;
49
+ constructor(config: DeepSeekSDKConfig);
50
+ /**
51
+ * Build a `ModelContract` for a DeepSeek model. Delegates to the wrapped
52
+ * `OpenAISDK.model()`, but first injects this provider's defaults:
53
+ * - `vision` / `reasoning` inferred from DeepSeek's model-name lists
54
+ * (`known-models.ts`) — so the right capabilities are set even though
55
+ * the names aren't OpenAI names.
56
+ * - `pricing` resolved from the built-in DeepSeek table merged with any
57
+ * caller-supplied SDK registry.
58
+ *
59
+ * An explicit `vision` / `reasoning` / `pricing` on `config` always wins
60
+ * over the injected default. Everything else (sampling, structured
61
+ * output, streaming, error wrapping) is inherited unchanged from
62
+ * `OpenAIModel`.
63
+ */
64
+ model(config: DeepSeekModelConfig): ModelContract;
65
+ /**
66
+ * Rough offline token-count estimate. Delegated to the wrapped
67
+ * `OpenAISDK.count()` (the core character-heuristic) — good for
68
+ * budgeting/quota guards, not billing.
69
+ */
70
+ count(text: string, model?: string): Promise<number>;
71
+ /**
72
+ * Build an `EmbedderContract`. Delegated verbatim to
73
+ * `OpenAISDK.embedder()`.
74
+ *
75
+ * NOTE: DeepSeek does not officially document an OpenAI-compatible
76
+ * embeddings endpoint (mid-2026); this delegate works against a
77
+ * compatible gateway you point `baseURL` at, but may fail against the
78
+ * stock DeepSeek endpoint. Prefer a dedicated embeddings provider for
79
+ * RAG.
80
+ */
81
+ embedder(config: DeepSeekEmbedderConfig): EmbedderContract;
82
+ /**
83
+ * Build an `ImageModelContract`. Delegated verbatim to
84
+ * `OpenAISDK.image()`.
85
+ *
86
+ * NOTE: DeepSeek does not document an image-generation endpoint
87
+ * (mid-2026); provided for adapter parity. A non-image model id is
88
+ * rejected at construction by the wrapped OpenAI image model.
89
+ */
90
+ image(config: DeepSeekImageConfig): ImageModelContract;
91
+ }
92
+ //#endregion
93
+ export { DeepSeekSDK };
94
+ //# sourceMappingURL=sdk.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sdk.d.mts","names":[],"sources":["../../../../../../@warlock.js/ai-deepseek/src/sdk.ts"],"mappings":";;;;;;AA8EA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAa,WAAA,YAAuB,kBAAA;EA+E2B;EAAA,iBA7E5C,MAAA;EAAA,iBACA,QAAA;EAAA,iBACA,OAAA;cAEE,MAAA,EAAQ,iBAAA;;;;;;;;;;;;;;;EA+BpB,KAAA,CAAM,MAAA,EAAQ,mBAAA,GAAsB,aAAA;;;;;;EAgB9B,KAAA,CAAM,IAAA,UAAc,KAAA,YAAiB,OAAA;;;;;;;;;;;EAc3C,QAAA,CAAS,MAAA,EAAQ,sBAAA,GAAyB,gBAAA;;;;;;;;;EAY1C,KAAA,CAAM,MAAA,EAAQ,mBAAA,GAAsB,kBAAA;AAAA"}
package/esm/sdk.mjs ADDED
@@ -0,0 +1,153 @@
1
+ import { inferReasoningCapability, inferVisionCapability } from "./known-models.mjs";
2
+ import { OpenAISDK } from "@warlock.js/ai-openai";
3
+
4
+ //#region ../@warlock.js/ai-deepseek/src/sdk.ts
5
+ /**
6
+ * DeepSeek's OpenAI-compatible Chat Completions endpoint. Verified against
7
+ * the official API docs (api-docs.deepseek.com, mid-2026).
8
+ */
9
+ const DEEPSEEK_BASE_URL = "https://api.deepseek.com";
10
+ /** Default upstream label for models produced by this SDK. */
11
+ const DEEPSEEK_PROVIDER = "deepseek";
12
+ /**
13
+ * Built-in DeepSeek pricing defaults, in USD per 1,000,000 tokens, keyed
14
+ * by model name. Sourced from DeepSeek's official pricing table
15
+ * (mid-2026); `cachedInput` is the cache-hit input rate. A caller-supplied
16
+ * SDK `pricing` registry, or a per-model `pricing`, overrides any entry
17
+ * here. Update when DeepSeek revises its published rates.
18
+ */
19
+ const DEEPSEEK_DEFAULT_PRICING = {
20
+ "deepseek-chat": {
21
+ input: .14,
22
+ output: .28,
23
+ cachedInput: .0028
24
+ },
25
+ "deepseek-reasoner": {
26
+ input: .14,
27
+ output: .28,
28
+ cachedInput: .0028
29
+ },
30
+ "deepseek-v4-flash": {
31
+ input: .14,
32
+ output: .28,
33
+ cachedInput: .0028
34
+ },
35
+ "deepseek-v4-pro": {
36
+ input: .435,
37
+ output: .87,
38
+ cachedInput: .003625
39
+ }
40
+ };
41
+ /**
42
+ * DeepSeek-backed implementation of `SDKAdapterContract`.
43
+ *
44
+ * **Role.** The package entry point for DeepSeek models. DeepSeek's API is
45
+ * OpenAI-compatible on the wire, so rather than reimplementing the
46
+ * battle-tested Chat Completions translation, this is a **thin wrapper**
47
+ * over {@link OpenAISDK} from `@warlock.js/ai-openai`: it constructs one
48
+ * internal `OpenAISDK` pinned to DeepSeek's `baseURL` and the `"deepseek"`
49
+ * provider label, and delegates `model()` / `embedder()` / `image()` /
50
+ * `count()` straight to it. Construct one `DeepSeekSDK` per account and
51
+ * reuse it everywhere.
52
+ *
53
+ * **What the wrapper adds over a bare `OpenAISDK`.** DeepSeek's model
54
+ * **names** are not OpenAI names, so OpenAI's own vision/reasoning prefix
55
+ * lists never match them. This wrapper injects DeepSeek's OWN capability
56
+ * inference (see `known-models.ts`) and built-in DeepSeek pricing defaults
57
+ * as explicit values on every `model()` call — so `deepseek-reasoner` is
58
+ * correctly flagged reasoning-capable and `deepseek-chat` is not, even
59
+ * though neither matches an OpenAI prefix. An explicit `vision` /
60
+ * `reasoning` / `pricing` you pass per model always wins over these
61
+ * injected defaults.
62
+ *
63
+ * **Responsibility.**
64
+ * - Owns: one long-lived internal `OpenAISDK` (auth, DeepSeek base URL)
65
+ * and DeepSeek's capability + pricing defaults.
66
+ * - Does NOT own: the wire protocol, streaming loop, message/tool
67
+ * translation, or error wrapping — all inherited unchanged from
68
+ * `OpenAISDK` / `OpenAIModel`.
69
+ *
70
+ * @example
71
+ * const deepseek = new DeepSeekSDK({ apiKey: process.env.DEEPSEEK_API_KEY! });
72
+ * const chat = deepseek.model({ name: "deepseek-chat" }); // reasoning=false
73
+ * const reasoner = deepseek.model({ name: "deepseek-reasoner" }); // reasoning=true
74
+ *
75
+ * @example
76
+ * // Compose into an `ai.deepseek` namespace for ergonomic agent wiring
77
+ * const ai = { agent, tool, deepseek: new DeepSeekSDK({ apiKey }) };
78
+ * const myAgent = ai.agent({ model: ai.deepseek.model({ name: "deepseek-reasoner" }) });
79
+ */
80
+ var DeepSeekSDK = class {
81
+ constructor(config) {
82
+ const { provider, pricing, baseURL, ...clientOptions } = config;
83
+ this.provider = provider ?? DEEPSEEK_PROVIDER;
84
+ this.pricing = {
85
+ ...DEEPSEEK_DEFAULT_PRICING,
86
+ ...pricing
87
+ };
88
+ this.openai = new OpenAISDK({
89
+ ...clientOptions,
90
+ baseURL: baseURL ?? DEEPSEEK_BASE_URL,
91
+ provider: this.provider
92
+ });
93
+ }
94
+ /**
95
+ * Build a `ModelContract` for a DeepSeek model. Delegates to the wrapped
96
+ * `OpenAISDK.model()`, but first injects this provider's defaults:
97
+ * - `vision` / `reasoning` inferred from DeepSeek's model-name lists
98
+ * (`known-models.ts`) — so the right capabilities are set even though
99
+ * the names aren't OpenAI names.
100
+ * - `pricing` resolved from the built-in DeepSeek table merged with any
101
+ * caller-supplied SDK registry.
102
+ *
103
+ * An explicit `vision` / `reasoning` / `pricing` on `config` always wins
104
+ * over the injected default. Everything else (sampling, structured
105
+ * output, streaming, error wrapping) is inherited unchanged from
106
+ * `OpenAIModel`.
107
+ */
108
+ model(config) {
109
+ const resolved = {
110
+ ...config,
111
+ vision: config.vision ?? inferVisionCapability(config.name),
112
+ reasoning: config.reasoning ?? inferReasoningCapability(config.name),
113
+ pricing: config.pricing ?? this.pricing[config.name]
114
+ };
115
+ return this.openai.model(resolved);
116
+ }
117
+ /**
118
+ * Rough offline token-count estimate. Delegated to the wrapped
119
+ * `OpenAISDK.count()` (the core character-heuristic) — good for
120
+ * budgeting/quota guards, not billing.
121
+ */
122
+ async count(text, model) {
123
+ return this.openai.count(text, model);
124
+ }
125
+ /**
126
+ * Build an `EmbedderContract`. Delegated verbatim to
127
+ * `OpenAISDK.embedder()`.
128
+ *
129
+ * NOTE: DeepSeek does not officially document an OpenAI-compatible
130
+ * embeddings endpoint (mid-2026); this delegate works against a
131
+ * compatible gateway you point `baseURL` at, but may fail against the
132
+ * stock DeepSeek endpoint. Prefer a dedicated embeddings provider for
133
+ * RAG.
134
+ */
135
+ embedder(config) {
136
+ return this.openai.embedder(config);
137
+ }
138
+ /**
139
+ * Build an `ImageModelContract`. Delegated verbatim to
140
+ * `OpenAISDK.image()`.
141
+ *
142
+ * NOTE: DeepSeek does not document an image-generation endpoint
143
+ * (mid-2026); provided for adapter parity. A non-image model id is
144
+ * rejected at construction by the wrapped OpenAI image model.
145
+ */
146
+ image(config) {
147
+ return this.openai.image(config);
148
+ }
149
+ };
150
+
151
+ //#endregion
152
+ export { DeepSeekSDK };
153
+ //# sourceMappingURL=sdk.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sdk.mjs","names":[],"sources":["../../../../../../@warlock.js/ai-deepseek/src/sdk.ts"],"sourcesContent":["import type {\n EmbedderContract,\n ImageModelContract,\n ModelContract,\n ModelPricing,\n SDKAdapterContract,\n} from \"@warlock.js/ai\";\nimport { OpenAISDK } from \"@warlock.js/ai-openai\";\nimport type {\n DeepSeekEmbedderConfig,\n DeepSeekImageConfig,\n DeepSeekModelConfig,\n DeepSeekSDKConfig,\n} from \"./config.type\";\nimport { inferReasoningCapability, inferVisionCapability } from \"./known-models\";\n\n/**\n * DeepSeek's OpenAI-compatible Chat Completions endpoint. Verified against\n * the official API docs (api-docs.deepseek.com, mid-2026).\n */\nconst DEEPSEEK_BASE_URL = \"https://api.deepseek.com\";\n\n/** Default upstream label for models produced by this SDK. */\nconst DEEPSEEK_PROVIDER = \"deepseek\";\n\n/**\n * Built-in DeepSeek pricing defaults, in USD per 1,000,000 tokens, keyed\n * by model name. Sourced from DeepSeek's official pricing table\n * (mid-2026); `cachedInput` is the cache-hit input rate. A caller-supplied\n * SDK `pricing` registry, or a per-model `pricing`, overrides any entry\n * here. Update when DeepSeek revises its published rates.\n */\nconst DEEPSEEK_DEFAULT_PRICING: Record<string, ModelPricing> = {\n \"deepseek-chat\": { input: 0.14, output: 0.28, cachedInput: 0.0028 },\n \"deepseek-reasoner\": { input: 0.14, output: 0.28, cachedInput: 0.0028 },\n \"deepseek-v4-flash\": { input: 0.14, output: 0.28, cachedInput: 0.0028 },\n \"deepseek-v4-pro\": { input: 0.435, output: 0.87, cachedInput: 0.003625 },\n};\n\n/**\n * DeepSeek-backed implementation of `SDKAdapterContract`.\n *\n * **Role.** The package entry point for DeepSeek models. DeepSeek's API is\n * OpenAI-compatible on the wire, so rather than reimplementing the\n * battle-tested Chat Completions translation, this is a **thin wrapper**\n * over {@link OpenAISDK} from `@warlock.js/ai-openai`: it constructs one\n * internal `OpenAISDK` pinned to DeepSeek's `baseURL` and the `\"deepseek\"`\n * provider label, and delegates `model()` / `embedder()` / `image()` /\n * `count()` straight to it. Construct one `DeepSeekSDK` per account and\n * reuse it everywhere.\n *\n * **What the wrapper adds over a bare `OpenAISDK`.** DeepSeek's model\n * **names** are not OpenAI names, so OpenAI's own vision/reasoning prefix\n * lists never match them. This wrapper injects DeepSeek's OWN capability\n * inference (see `known-models.ts`) and built-in DeepSeek pricing defaults\n * as explicit values on every `model()` call — so `deepseek-reasoner` is\n * correctly flagged reasoning-capable and `deepseek-chat` is not, even\n * though neither matches an OpenAI prefix. An explicit `vision` /\n * `reasoning` / `pricing` you pass per model always wins over these\n * injected defaults.\n *\n * **Responsibility.**\n * - Owns: one long-lived internal `OpenAISDK` (auth, DeepSeek base URL)\n * and DeepSeek's capability + pricing defaults.\n * - Does NOT own: the wire protocol, streaming loop, message/tool\n * translation, or error wrapping — all inherited unchanged from\n * `OpenAISDK` / `OpenAIModel`.\n *\n * @example\n * const deepseek = new DeepSeekSDK({ apiKey: process.env.DEEPSEEK_API_KEY! });\n * const chat = deepseek.model({ name: \"deepseek-chat\" }); // reasoning=false\n * const reasoner = deepseek.model({ name: \"deepseek-reasoner\" }); // reasoning=true\n *\n * @example\n * // Compose into an `ai.deepseek` namespace for ergonomic agent wiring\n * const ai = { agent, tool, deepseek: new DeepSeekSDK({ apiKey }) };\n * const myAgent = ai.agent({ model: ai.deepseek.model({ name: \"deepseek-reasoner\" }) });\n */\nexport class DeepSeekSDK implements SDKAdapterContract {\n /** The wrapped OpenAI-compatible client, pinned to DeepSeek. */\n private readonly openai: OpenAISDK;\n private readonly provider: string;\n private readonly pricing: Record<string, ModelPricing>;\n\n public constructor(config: DeepSeekSDKConfig) {\n const { provider, pricing, baseURL, ...clientOptions } = config;\n\n this.provider = provider ?? DEEPSEEK_PROVIDER;\n // Caller pricing overrides the built-in DeepSeek defaults entry-by-entry.\n this.pricing = { ...DEEPSEEK_DEFAULT_PRICING, ...pricing };\n\n // The internal OpenAISDK carries the DeepSeek base URL + provider label;\n // pricing stays on THIS wrapper so it can be merged with the built-in\n // defaults before each per-model resolution below.\n this.openai = new OpenAISDK({\n ...clientOptions,\n baseURL: baseURL ?? DEEPSEEK_BASE_URL,\n provider: this.provider,\n });\n }\n\n /**\n * Build a `ModelContract` for a DeepSeek model. Delegates to the wrapped\n * `OpenAISDK.model()`, but first injects this provider's defaults:\n * - `vision` / `reasoning` inferred from DeepSeek's model-name lists\n * (`known-models.ts`) — so the right capabilities are set even though\n * the names aren't OpenAI names.\n * - `pricing` resolved from the built-in DeepSeek table merged with any\n * caller-supplied SDK registry.\n *\n * An explicit `vision` / `reasoning` / `pricing` on `config` always wins\n * over the injected default. Everything else (sampling, structured\n * output, streaming, error wrapping) is inherited unchanged from\n * `OpenAIModel`.\n */\n public model(config: DeepSeekModelConfig): ModelContract {\n const resolved: DeepSeekModelConfig = {\n ...config,\n vision: config.vision ?? inferVisionCapability(config.name),\n reasoning: config.reasoning ?? inferReasoningCapability(config.name),\n pricing: config.pricing ?? this.pricing[config.name],\n };\n\n return this.openai.model(resolved);\n }\n\n /**\n * Rough offline token-count estimate. Delegated to the wrapped\n * `OpenAISDK.count()` (the core character-heuristic) — good for\n * budgeting/quota guards, not billing.\n */\n public async count(text: string, model?: string): Promise<number> {\n return this.openai.count(text, model);\n }\n\n /**\n * Build an `EmbedderContract`. Delegated verbatim to\n * `OpenAISDK.embedder()`.\n *\n * NOTE: DeepSeek does not officially document an OpenAI-compatible\n * embeddings endpoint (mid-2026); this delegate works against a\n * compatible gateway you point `baseURL` at, but may fail against the\n * stock DeepSeek endpoint. Prefer a dedicated embeddings provider for\n * RAG.\n */\n public embedder(config: DeepSeekEmbedderConfig): EmbedderContract {\n return this.openai.embedder(config);\n }\n\n /**\n * Build an `ImageModelContract`. Delegated verbatim to\n * `OpenAISDK.image()`.\n *\n * NOTE: DeepSeek does not document an image-generation endpoint\n * (mid-2026); provided for adapter parity. A non-image model id is\n * rejected at construction by the wrapped OpenAI image model.\n */\n public image(config: DeepSeekImageConfig): ImageModelContract {\n return this.openai.image(config);\n }\n}\n"],"mappings":";;;;;;;;AAoBA,MAAM,oBAAoB;;AAG1B,MAAM,oBAAoB;;;;;;;;AAS1B,MAAM,2BAAyD;CAC7D,iBAAiB;EAAE,OAAO;EAAM,QAAQ;EAAM,aAAa;CAAO;CAClE,qBAAqB;EAAE,OAAO;EAAM,QAAQ;EAAM,aAAa;CAAO;CACtE,qBAAqB;EAAE,OAAO;EAAM,QAAQ;EAAM,aAAa;CAAO;CACtE,mBAAmB;EAAE,OAAO;EAAO,QAAQ;EAAM,aAAa;CAAS;AACzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,IAAa,cAAb,MAAuD;CAMrD,AAAO,YAAY,QAA2B;EAC5C,MAAM,EAAE,UAAU,SAAS,SAAS,GAAG,kBAAkB;EAEzD,KAAK,WAAW,YAAY;EAE5B,KAAK,UAAU;GAAE,GAAG;GAA0B,GAAG;EAAQ;EAKzD,KAAK,SAAS,IAAI,UAAU;GAC1B,GAAG;GACH,SAAS,WAAW;GACpB,UAAU,KAAK;EACjB,CAAC;CACH;;;;;;;;;;;;;;;CAgBA,AAAO,MAAM,QAA4C;EACvD,MAAM,WAAgC;GACpC,GAAG;GACH,QAAQ,OAAO,UAAU,sBAAsB,OAAO,IAAI;GAC1D,WAAW,OAAO,aAAa,yBAAyB,OAAO,IAAI;GACnE,SAAS,OAAO,WAAW,KAAK,QAAQ,OAAO;EACjD;EAEA,OAAO,KAAK,OAAO,MAAM,QAAQ;CACnC;;;;;;CAOA,MAAa,MAAM,MAAc,OAAiC;EAChE,OAAO,KAAK,OAAO,MAAM,MAAM,KAAK;CACtC;;;;;;;;;;;CAYA,AAAO,SAAS,QAAkD;EAChE,OAAO,KAAK,OAAO,SAAS,MAAM;CACpC;;;;;;;;;CAUA,AAAO,MAAM,QAAiD;EAC5D,OAAO,KAAK,OAAO,MAAM,MAAM;CACjC;AACF"}
package/llms-full.txt ADDED
@@ -0,0 +1,116 @@
1
+ # Warlock AI Deepseek — full skills
2
+
3
+ > Package: `@warlock.js/ai-deepseek`
4
+
5
+ > Generated artifact. Concatenates every SKILL.md and reference file under `@warlock.js/ai-deepseek/skills/`. Re-run `node scripts/generate-llms.mjs` after any change.
6
+
7
+ ## setup-deepseek `@warlock.js/ai-deepseek/setup-deepseek/SKILL.md`
8
+
9
+ ---
10
+ name: setup-deepseek
11
+ description: 'Wire @warlock.js/ai-deepseek — new DeepSeekSDK({apiKey, baseURL?, provider?, pricing?}) for DeepSeek''s OpenAI-compatible API, .model({name, reasoning?, vision?, structuredOutput?, responseFormat?}) for ModelContract. Thin wrapper over @warlock.js/ai-openai''s OpenAISDK pinned to https://api.deepseek.com with provider "deepseek"; injects DeepSeek-specific reasoning/vision inference + built-in pricing. Models: deepseek-chat (non-thinking), deepseek-reasoner (thinking/reasoning), deepseek-v4-flash, deepseek-v4-pro. Triggers: `DeepSeekSDK`, `deepseek-chat`, `deepseek-reasoner`, `deepseek-v4`, `api.deepseek.com`, `DEEPSEEK_API_KEY`, reasoning effort on deepseek; "wire deepseek into a warlock agent", "use deepseek-reasoner", "configure deepseek-chat", "route a warlock agent through deepseek". Skip: OpenAI/Azure/OpenRouter — `@warlock.js/ai-openai`; agent wiring — `@warlock.js/ai/run-ai-agent/SKILL.md`; adapter comparison — `@warlock.js/ai/pick-ai-provider/SKILL.md`; raw deepseek HTTP / the `openai` SDK directly. Typical import `import { DeepSeekSDK } from "@warlock.js/ai-deepseek"`.'
12
+ ---
13
+
14
+ # `@warlock.js/ai-deepseek`
15
+
16
+ Provider adapter for DeepSeek. DeepSeek's API is **OpenAI-compatible**, so this package is a **thin wrapper** over [`@warlock.js/ai-openai`](@warlock.js/ai-openai/skills/setup-openai/SKILL.md)'s `OpenAISDK`: it constructs an internal `OpenAISDK` pinned to `https://api.deepseek.com` with `provider: "deepseek"` and delegates `model()` / `embedder()` / `image()` / `count()` to it — while injecting DeepSeek's own capability inference and pricing so the right flags are set even though the model names aren't OpenAI names. Pair with `@warlock.js/ai` for the agent / tool / system-prompt surface.
17
+
18
+ ## Construction
19
+
20
+ ```ts
21
+ import { DeepSeekSDK } from "@warlock.js/ai-deepseek";
22
+
23
+ const deepseek = new DeepSeekSDK({ apiKey: process.env.DEEPSEEK_API_KEY! });
24
+ ```
25
+
26
+ `apiKey` is the only required field — `baseURL` defaults to `https://api.deepseek.com` (DeepSeek's OpenAI-compatible endpoint) and `provider` defaults to `"deepseek"`. Override `baseURL` only for a proxy/gateway, or `provider` to relabel the upstream:
27
+
28
+ ```ts
29
+ new DeepSeekSDK({ apiKey, baseURL: "https://my-gateway/deepseek", provider: "deepseek-proxy" });
30
+ ```
31
+
32
+ `DeepSeekSDK` is a class (like `OpenAISDK`) holding one long-lived wrapped client — construct once per account and reuse.
33
+
34
+ ## Producing a model
35
+
36
+ ```ts
37
+ deepseek.model({ name: "deepseek-chat" }) // V3 lineage, non-thinking
38
+ deepseek.model({ name: "deepseek-reasoner" }) // R1 lineage, reasoning-capable
39
+ deepseek.model({ name: "deepseek-chat", temperature: 0.2 })
40
+ ```
41
+
42
+ Returns a `ModelContract` you pass straight into `ai.agent({ model })`.
43
+
44
+ ## Models
45
+
46
+ | Model | Notes |
47
+ | --- | --- |
48
+ | `deepseek-chat` | Non-thinking surface (V3 lineage). Fast, cheap, broad coverage. Reasoning **off**. |
49
+ | `deepseek-reasoner` | Thinking surface (R1 lineage). Emits a reasoning channel. Reasoning **on**. |
50
+ | `deepseek-v4-flash` | Newer flash tier. Reasoning **off** by default. |
51
+ | `deepseek-v4-pro` | Newer quality tier. Reasoning **on** by default. |
52
+
53
+ DeepSeek announced the legacy `deepseek-chat` / `deepseek-reasoner` names retire 2026/07/24 in favor of the `deepseek-v4-*` family; both name sets are understood by the capability inference. `deepseek.model({ name })` accepts any id the upstream serves.
54
+
55
+ ## Capabilities — what's auto-set
56
+
57
+ | Flag | Default |
58
+ | --- | --- |
59
+ | `reasoning` | Inferred from the DeepSeek model name. `true` for `deepseek-reasoner` and the `*-pro` tier; `false` for `deepseek-chat` / `*-flash`. Drives whether the reasoning-effort knob is forwarded. |
60
+ | `vision` | `false` for every DeepSeek model — no DeepSeek chat model documents image input (mid-2026). |
61
+ | `structuredOutput` | `true` (inherited from the wrapped OpenAI model), unless `responseFormat` is set to a loose mode. |
62
+ | `promptCaching` | `true` (inherited). DeepSeek reports cache hits via `usage.cachedTokens`, the same shape as OpenAI. |
63
+
64
+ **Override any flag explicitly** via `.model({ name, reasoning?, vision?, structuredOutput? })` — an explicit value always wins over the injected inference.
65
+
66
+ ```ts
67
+ deepseek.model({ name: "deepseek-chat", reasoning: true }) // force thinking flag
68
+ deepseek.model({ name: "deepseek-reasoner", reasoning: false }) // suppress it
69
+ ```
70
+
71
+ ## Uses the OpenAI-compatible endpoint
72
+
73
+ Everything on the wire — Chat Completions request/response shape, streaming loop, tool-call accumulation, structured-output `response_format`, multipart message mapping, and error wrapping — is inherited **unchanged** from `OpenAIModel`. See [`setup-openai`](@warlock.js/ai-openai/skills/setup-openai/SKILL.md) for the wire-level detail; it all applies here against `https://api.deepseek.com`.
74
+
75
+ Structured output, reasoning effort, and streaming therefore behave exactly as documented for the OpenAI adapter:
76
+
77
+ ```ts
78
+ const model = deepseek.model({ name: "deepseek-reasoner" }); // reasoning auto-true
79
+ await model.complete(messages, { reasoning: { effort: "high" } }); // → reasoning_effort: "high"
80
+ ```
81
+
82
+ ## Embeddings & images
83
+
84
+ `deepseek.embedder({...})` and `deepseek.image({...})` delegate to the wrapped `OpenAISDK`. **DeepSeek does not officially document an OpenAI-compatible embeddings endpoint or an image-generation endpoint (mid-2026)** — these delegates exist for adapter parity and work against a compatible gateway you point `baseURL` at, but may fail against the stock DeepSeek endpoint. Use a dedicated embeddings provider (e.g. `@warlock.js/ai-openai` / `@warlock.js/ai-google`) for RAG.
85
+
86
+ ## Pricing
87
+
88
+ The adapter ships **built-in DeepSeek pricing defaults** (USD per 1M tokens, from DeepSeek's published table), so `usage.cost` is computed out of the box:
89
+
90
+ ```ts
91
+ const deepseek = new DeepSeekSDK({ apiKey }); // deepseek-chat → { input: 0.14, output: 0.28, cachedInput: 0.0028 }
92
+ ```
93
+
94
+ Override per model or per SDK exactly like the OpenAI adapter. Resolution at `model()` time: per-model `pricing` > SDK `pricing` registry > built-in DeepSeek default > `undefined`.
95
+
96
+ ```ts
97
+ new DeepSeekSDK({ apiKey, pricing: { "deepseek-reasoner": { input: 0.55, output: 2.19 } } });
98
+ ```
99
+
100
+ ## Errors
101
+
102
+ Raw errors surface through the wrapped OpenAI adapter's wrapper into the typed `@warlock.js/ai` `AIError` hierarchy — see [`@warlock.js/ai/handle-ai-errors/SKILL.md`](@warlock.js/ai/handle-ai-errors/SKILL.md).
103
+
104
+ ## When NOT to use this skill
105
+
106
+ - OpenAI / Azure OpenAI / OpenRouter / local OpenAI-compatible gateways — use `@warlock.js/ai-openai`.
107
+ - Anthropic — `@warlock.js/ai-anthropic`. Gemini — `@warlock.js/ai-google`. Ollama — `@warlock.js/ai-ollama`.
108
+ - Calling the DeepSeek HTTP API or the raw `openai` SDK directly without going through `@warlock.js/ai` agents.
109
+
110
+ ## See also
111
+
112
+ - [`@warlock.js/ai-openai/skills/setup-openai/SKILL.md`](@warlock.js/ai-openai/skills/setup-openai/SKILL.md) — the wrapped adapter; all wire-level behavior.
113
+ - [`@warlock.js/ai/run-ai-agent/SKILL.md`](@warlock.js/ai/run-ai-agent/SKILL.md) — passing the model into `ai.agent({...})`.
114
+ - [`@warlock.js/ai/pick-ai-provider/SKILL.md`](@warlock.js/ai/pick-ai-provider/SKILL.md) — adapter comparison.
115
+
116
+
package/llms.txt ADDED
@@ -0,0 +1,9 @@
1
+ # Warlock AI Deepseek
2
+
3
+ > Package: `@warlock.js/ai-deepseek`
4
+
5
+ > DeepSeek adapter for @warlock.js/ai
6
+
7
+ ## Skills
8
+
9
+ - [setup-deepseek](@warlock.js/ai-deepseek/setup-deepseek/SKILL.md): Wire @warlock.js/ai-deepseek — new DeepSeekSDK({apiKey, baseURL?, provider?, pricing?}) for DeepSeek's OpenAI-compatible API, .model({name, reasoning?, vision?, structuredOutput?, responseFormat?}) for ModelContract. Thin wrapper over @warlock.js/ai-openai's OpenAISDK pinned to https://api.deepseek.com with provider "deepseek"; injects DeepSeek-specific reasoning/vision inference + built-in pricing. Models: deepseek-chat (non-thinking), deepseek-reasoner (thinking/reasoning), deepseek-v4-flash, deepseek-v4-pro. Triggers: `DeepSeekSDK`, `deepseek-chat`, `deepseek-reasoner`, `deepseek-v4`, `api.deepseek.com`, `DEEPSEEK_API_KEY`, reasoning effort on deepseek; "wire deepseek into a warlock agent", "use deepseek-reasoner", "configure deepseek-chat", "route a warlock agent through deepseek". Skip: OpenAI/Azure/OpenRouter — `@warlock.js/ai-openai`; agent wiring — `@warlock.js/ai/run-ai-agent/SKILL.md`; adapter comparison — `@warlock.js/ai/pick-ai-provider/SKILL.md`; raw deepseek HTTP / the `openai` SDK directly. Typical import `import { DeepSeekSDK } from "@warlock.js/ai-deepseek"`.
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@warlock.js/ai-deepseek",
3
+ "description": "DeepSeek adapter for @warlock.js/ai",
4
+ "keywords": [
5
+ "warlock",
6
+ "ai",
7
+ "deepseek"
8
+ ],
9
+ "author": "Hasan Zohdy",
10
+ "license": "MIT",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/warlockjs/ai-deepseek"
14
+ },
15
+ "dependencies": {
16
+ "@warlock.js/ai-openai": "4.6.0",
17
+ "@warlock.js/logger": "4.6.0"
18
+ },
19
+ "peerDependencies": {
20
+ "@warlock.js/ai": "4.6.0"
21
+ },
22
+ "version": "4.6.0",
23
+ "main": "./cjs/index.cjs",
24
+ "module": "./esm/index.mjs",
25
+ "types": "./esm/index.d.mts",
26
+ "exports": {
27
+ ".": {
28
+ "import": {
29
+ "types": "./esm/index.d.mts",
30
+ "default": "./esm/index.mjs"
31
+ },
32
+ "require": {
33
+ "types": "./esm/index.d.mts",
34
+ "default": "./cjs/index.cjs"
35
+ }
36
+ }
37
+ }
38
+ }