@sparkelf/dsh-patch-responses-reasoning-status 0.1.0-rc.13 → 0.1.0-rc.22

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/README.i18n.yaml CHANGED
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write patches/npm/responses-reasoning-status/README.md
5
- README.md: cacb8ea2d93afd66d8376c1024b9dad84256a8f9
6
- README.zh.md: 2afd1613ae7a1850b58a4bb67d0ee4e31a4c61a5
5
+ README.md: 46c6d1795f11f5cc88248de2d80300a022cbc6b0
6
+ README.zh.md: c818f6e56e77363c2693fa45c6c4feb568f297b8
package/README.md CHANGED
@@ -6,4 +6,4 @@ This data-only package adds one explicit `llm-pi-ai` route option for OpenAI Res
6
6
 
7
7
  The official Models editor shows a localized **Gateway compatibility mode** checkbox only for pi-ai routes whose effective protocol is `openai-responses`. User-layer disablement deletes the leaf unless an inherited true requires an explicit false, and changing protocol removes or masks the incompatible setting without replacing sibling fields.
8
8
 
9
- The target is exact official source revision `0a53fb55bea101816fa226bb964ae2bed71c343b`. This package has no JavaScript entry, lifecycle script, Cordis plugin, fallback, or alternate variant. Retire it when official DSH ships equivalent pi-ai Responses input adjustment and Models editor behavior.
9
+ The target is exact official source revision `d347e703908d0406b7a7ef80e3a0e594d86b2215`. This package has no JavaScript entry, lifecycle script, Cordis plugin, fallback, or alternate variant. Retire it when official DSH ships equivalent pi-ai Responses input adjustment and Models editor behavior.
package/README.zh.md CHANGED
@@ -6,4 +6,4 @@
6
6
 
7
7
  official Models editor只在effective protocol为`openai-responses`的pi-ai routes中显示localized **中转站兼容模式** checkbox。user-layer关闭操作在没有inherited true时删除该leaf;存在inherited true时写入显式false。切换protocol会删除或遮蔽不兼容设置,而不会替换sibling fields。
8
8
 
9
- target是exact official source revision `0a53fb55bea101816fa226bb964ae2bed71c343b`。本package没有JavaScript entry、lifecycle script、Cordis plugin、fallback或alternate variant。official DSH提供等价pi-ai Responses input adjustment与Models editor behavior后,retire本package。
9
+ target是exact official source revision `d347e703908d0406b7a7ef80e3a0e594d86b2215`。本package没有JavaScript entry、lifecycle script、Cordis plugin、fallback或alternate variant。official DSH提供等价pi-ai Responses input adjustment与Models editor behavior后,retire本package。
package/package.json CHANGED
@@ -4,11 +4,11 @@
4
4
  "formatVersion": 1,
5
5
  "variants": [
6
6
  {
7
- "dsh": ">=0.1.2-alpha.2",
7
+ "dsh": ">=0.1.3-alpha.1",
8
8
  "file": "./patches/responses-reasoning-status.patch",
9
9
  "id": "responses-omit-reasoning-input-status",
10
10
  "target": {
11
- "baseRevision": "0a53fb55bea101816fa226bb964ae2bed71c343b",
11
+ "baseRevision": "d347e703908d0406b7a7ef80e3a0e594d86b2215",
12
12
  "kind": "dsh-source",
13
13
  "paths": [
14
14
  "packages/llm/llm-pi-ai/",
@@ -32,5 +32,5 @@
32
32
  "url": "git+https://github.com/SparkElf/deepseek-harness-plus.git"
33
33
  },
34
34
  "type": "module",
35
- "version": "0.1.0-rc.13"
35
+ "version": "0.1.0-rc.22"
36
36
  }
@@ -1,46 +1,46 @@
1
1
  diff --git a/packages/client/ui-settings-models/README.i18n.yaml b/packages/client/ui-settings-models/README.i18n.yaml
2
- index 1977fc9620..0822ab8417 100644
2
+ index 2d8accc664..47754f1f60 100644
3
3
  --- a/packages/client/ui-settings-models/README.i18n.yaml
4
4
  +++ b/packages/client/ui-settings-models/README.i18n.yaml
5
5
  @@ -2,5 +2,5 @@
6
6
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
7
7
  # after editing either side, bring the other along and re-record with:
8
8
  # pnpm run verify-translation-pairing --write packages/client/ui-settings-models/README.md
9
- -README.md: 920780b2193d6165a10967cc49afcb5b7e193105
10
- -README.zh.md: 4ec9ae43eef9a13ffde22e2a3de0e44d3b6cb51d
11
- +README.md: c68a0defc3ad882f66f81afbe61cfad4c912a4fa
12
- +README.zh.md: e161a26112080d24455c5c541e501fe1fd0b7cf1
9
+ -README.md: cac2785886346a0c1e81009404fdb0da238bbe40
10
+ -README.zh.md: 7df96a9a1b9474b5e88d8f9814f353f92eb1a31d
11
+ +README.md: f4564af49361439a74abdf6cc7e08c7f700904fd
12
+ +README.zh.md: ad303968d99880b64c63bf5d3e6ccca9de019f1b
13
13
  diff --git a/packages/client/ui-settings-models/README.md b/packages/client/ui-settings-models/README.md
14
- index 920780b219..c68a0defc3 100644
14
+ index cac2785886..f4564af493 100644
15
15
  --- a/packages/client/ui-settings-models/README.md
16
16
  +++ b/packages/client/ui-settings-models/README.md
17
17
  @@ -33,7 +33,7 @@ The primary field on an editor card is a single **API key** input — the page n
18
18
 
19
19
  ### Editing a provider
20
20
 
21
- -The collapsed 自定义设置 fold carries the curated extras: `baseURL` for both families (the deepseek placeholder shows the public endpoint), each adapter's model catalog, and the **display name** and **API protocol** of a pi-ai route the adapter does not ship. The Provider ID stays fixed: it is the settings key, the name every other namespace and every logged session references, and the stem of a credential reference the page cannot read back to move. Reasoning effort is deliberately not among the editable fields: it is a per-model capability, so a provider-scoped control could only be set to a value some models reject. Each DeepSeek row edits `id`, optional display `name`, and optional `contextWindow`/`maxTokens`; existing fields outside that curated set survive edits.
22
- +The collapsed 自定义设置 fold carries the curated extras: `baseURL` for both families (the deepseek placeholder shows the public endpoint), each adapter's model catalog, and the **display name** and **API protocol** of a pi-ai route the adapter does not ship. A pi-ai route whose effective protocol is `openai-responses` also shows **Gateway compatibility mode**, which writes `responsesCompatibility.omitReasoningInputStatus`; disabling it deletes the user leaf unless an inherited true requires an explicit false, and changing protocol removes or masks the incompatible setting while preserving sibling fields. The Provider ID stays fixed: it is the settings key, the name every other namespace and every logged session references, and the stem of a credential reference the page cannot read back to move. Reasoning effort is deliberately not among the editable fields: it is a per-model capability, so a provider-scoped control could only be set to a value some models reject. Each DeepSeek row edits `id`, optional display `name`, and optional `contextWindow`/`maxTokens`; existing fields outside that curated set survive edits.
21
+ -The collapsed 自定义设置 fold carries the curated extras: `baseURL` for both families (the deepseek placeholder shows the public endpoint), each adapter's model catalog, and the **display name** and **API protocol** of a pi-ai route the adapter does not ship. Profile `headers` remain deployment configuration in `settings.yaml` or Cordis config and have no Models-page editor. The Provider ID stays fixed: it is the settings key, the name every other namespace and every logged session references, and the stem of a credential reference the page cannot read back to move. Reasoning effort is deliberately not among the editable fields: it is a per-model capability, so a provider-scoped control could only be set to a value some models reject. Each DeepSeek row edits `id`, optional display `name`, and optional `contextWindow`/`maxTokens`; existing fields outside that curated set survive edits.
22
+ +The collapsed 自定义设置 fold carries the curated extras: `baseURL` for both families (the deepseek placeholder shows the public endpoint), each adapter's model catalog, and the **display name** and **API protocol** of a pi-ai route the adapter does not ship. A pi-ai route whose effective protocol is `openai-responses` also shows **Gateway compatibility mode**, which writes `responsesCompatibility.omitReasoningInputStatus`; disabling it deletes the user leaf unless an inherited true requires an explicit false, and changing protocol removes or masks the incompatible setting while preserving sibling fields. Profile `headers` remain deployment configuration in `settings.yaml` or Cordis config and have no Models-page editor. The Provider ID stays fixed: it is the settings key, the name every other namespace and every logged session references, and the stem of a credential reference the page cannot read back to move. Reasoning effort is deliberately not among the editable fields: it is a per-model capability, so a provider-scoped control could only be set to a value some models reject. Each DeepSeek row edits `id`, optional display `name`, and optional `contextWindow`/`maxTokens`; existing fields outside that curated set survive edits.
23
23
 
24
24
  ### Adding and deleting providers
25
25
 
26
26
  diff --git a/packages/client/ui-settings-models/README.zh.md b/packages/client/ui-settings-models/README.zh.md
27
- index 4ec9ae43ee..e161a26112 100644
27
+ index 7df96a9a1b..ad303968d9 100644
28
28
  --- a/packages/client/ui-settings-models/README.zh.md
29
29
  +++ b/packages/client/ui-settings-models/README.zh.md
30
30
  @@ -33,7 +33,7 @@ kind: "package-reference"
31
31
 
32
32
  ### 编辑提供方
33
33
 
34
- -收起的「自定义设置」折叠区承载精选的额外字段:两个家族都有 `baseURL`(deepseek 的占位符显示公共端点)、各适配器自己的模型目录,以及适配器未提供的 pi-ai 路由的**显示名称**与 **API 协议**。Provider ID 保持固定:它是 settings 的键、其他每个 namespace 与每一条已记录会话引用的名字,也是页面读不回、因而搬不走的凭据引用词干。推理等级刻意不在可编辑字段之列:它是按模型的能力,提供方级的控件只可能被设成某些模型会拒绝的值。每个 DeepSeek 行编辑 `id`、可选显示 `name` 与可选 `contextWindow`/`maxTokens`;该精选集之外的现有字段在编辑后仍会保留。
35
- +收起的「自定义设置」折叠区承载精选的额外字段:两个家族都有 `baseURL`(deepseek 的占位符显示公共端点)、各适配器自己的模型目录,以及适配器未提供的 pi-ai 路由的**显示名称**与 **API 协议**。effective protocol为 `openai-responses` 的pi-ai路由还会显示**中转站兼容模式**,写入 `responsesCompatibility.omitReasoningInputStatus`;关闭时,若没有继承的true则删除user leaf,否则写入显式false,切换协议也会删除或遮蔽不兼容设置,并保留sibling fields。Provider ID 保持固定:它是 settings 的键、其他每个 namespace 与每一条已记录会话引用的名字,也是页面读不回、因而搬不走的凭据引用词干。推理等级刻意不在可编辑字段之列:它是按模型的能力,提供方级的控件只可能被设成某些模型会拒绝的值。每个 DeepSeek 行编辑 `id`、可选显示 `name` 与可选 `contextWindow`/`maxTokens`;该精选集之外的现有字段在编辑后仍会保留。
34
+ -收起的「自定义设置」折叠区承载精选的额外字段:两个家族都有 `baseURL`(deepseek 的占位符显示公共端点)、各适配器自己的模型目录,以及适配器未提供的 pi-ai 路由的**显示名称**与 **API 协议**。Profile `headers` 仍是 `settings.yaml` 或 Cordis 配置中的部署配置,Models 页面不提供编辑器。Provider ID 保持固定:它是 settings 的键、其他每个 namespace 与每一条已记录会话引用的名字,也是页面读不回、因而搬不走的凭据引用词干。推理等级刻意不在可编辑字段之列:它是按模型的能力,提供方级的控件只可能被设成某些模型会拒绝的值。每个 DeepSeek 行编辑 `id`、可选显示 `name` 与可选 `contextWindow`/`maxTokens`;该精选集之外的现有字段在编辑后仍会保留。
35
+ +收起的「自定义设置」折叠区承载精选的额外字段:两个家族都有 `baseURL`(deepseek 的占位符显示公共端点)、各适配器自己的模型目录,以及适配器未提供的 pi-ai 路由的**显示名称**与 **API 协议**。effective protocol为 `openai-responses` 的pi-ai路由还会显示**中转站兼容模式**,写入 `responsesCompatibility.omitReasoningInputStatus`;关闭时,若没有继承的true则删除user leaf,否则写入显式false,切换协议也会删除或遮蔽不兼容设置,并保留sibling fields。Profile `headers` 仍是 `settings.yaml` 或 Cordis 配置中的部署配置,Models 页面不提供编辑器。Provider ID 保持固定:它是 settings 的键、其他每个 namespace 与每一条已记录会话引用的名字,也是页面读不回、因而搬不走的凭据引用词干。推理等级刻意不在可编辑字段之列:它是按模型的能力,提供方级的控件只可能被设成某些模型会拒绝的值。每个 DeepSeek 行编辑 `id`、可选显示 `name` 与可选 `contextWindow`/`maxTokens`;该精选集之外的现有字段在编辑后仍会保留。
36
36
 
37
37
  ### 新增与删除提供方
38
38
 
39
39
  diff --git a/packages/client/ui-settings-models/src/client/ModelsSection.module.css b/packages/client/ui-settings-models/src/client/ModelsSection.module.css
40
- index fe2fe87d3a..a0e3103270 100644
40
+ index 2dc72373ea..f0a9ab95fb 100644
41
41
  --- a/packages/client/ui-settings-models/src/client/ModelsSection.module.css
42
42
  +++ b/packages/client/ui-settings-models/src/client/ModelsSection.module.css
43
- @@ -396,6 +396,31 @@
43
+ @@ -397,6 +397,31 @@
44
44
  padding-top: 12px;
45
45
  }
46
46
 
@@ -162,10 +162,10 @@ index ffa8c2e1fe..3c3e7729b4 100644
162
162
  the extras differ — DeepSeek's inherited capacities, pi-ai's
163
163
  endpoint interrogation. */}
164
164
  diff --git a/packages/client/ui-settings-models/src/client/locales.ts b/packages/client/ui-settings-models/src/client/locales.ts
165
- index f1b0718ba5..7d664492a5 100644
165
+ index 6c71b3b6d6..d1deeab5dd 100644
166
166
  --- a/packages/client/ui-settings-models/src/client/locales.ts
167
167
  +++ b/packages/client/ui-settings-models/src/client/locales.ts
168
- @@ -83,6 +83,7 @@ export const en = {
168
+ @@ -85,6 +85,7 @@ export const en = {
169
169
  customDisplayName: 'Display name',
170
170
  customApi: 'API protocol',
171
171
  customApiUnset: 'Not selected',
@@ -173,7 +173,7 @@ index f1b0718ba5..7d664492a5 100644
173
173
  customNeedsBaseUrl: 'A custom provider needs a base URL.',
174
174
  customNeedsModels: 'A custom provider needs at least one model.',
175
175
  customBaseUrlPlaceholder: 'https://gateway.example/v1',
176
- @@ -187,6 +188,7 @@ export const zh: { [Key in keyof typeof en]: string } = {
176
+ @@ -191,6 +192,7 @@ export const zh: { [Key in keyof typeof en]: string } = {
177
177
  customDisplayName: '显示名称',
178
178
  customApi: 'API 协议',
179
179
  customApiUnset: '未选择',
@@ -182,19 +182,19 @@ index f1b0718ba5..7d664492a5 100644
182
182
  customNeedsModels: '自定义提供方至少需要一个模型。',
183
183
  customBaseUrlPlaceholder: 'https://gateway.example/v1',
184
184
  diff --git a/packages/llm/llm-pi-ai/README.i18n.yaml b/packages/llm/llm-pi-ai/README.i18n.yaml
185
- index 38b01bcd52..43d8e199ba 100644
185
+ index 656439bf24..7078d9bc6d 100644
186
186
  --- a/packages/llm/llm-pi-ai/README.i18n.yaml
187
187
  +++ b/packages/llm/llm-pi-ai/README.i18n.yaml
188
188
  @@ -2,5 +2,5 @@
189
189
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
190
190
  # after editing either side, bring the other along and re-record with:
191
191
  # pnpm run verify-translation-pairing --write packages/llm/llm-pi-ai/README.md
192
- -README.md: dcafde78e176bd0acd142145d651d6d5b5539626
193
- -README.zh.md: a7292638b8449d7192d3e003f0377967d11ef94d
194
- +README.md: 5db7b2fecd77bcdc27f55851fcbaa32401326adf
195
- +README.zh.md: 319059c93916e87f127bf56ba5d1b9c6f81c006c
192
+ -README.md: c0aacbe3e0b727cd7b6b163814dc96859b954b9c
193
+ -README.zh.md: 7b8cef7db2ba5cebe3e42345b308716ae0099c03
194
+ +README.md: 9ce3f4af2078753d1416155d4b84e14095297491
195
+ +README.zh.md: 4cad5156153b3eee5488b45cc4c69935c3d3a9cb
196
196
  diff --git a/packages/llm/llm-pi-ai/README.md b/packages/llm/llm-pi-ai/README.md
197
- index dcafde78e1..5db7b2fecd 100644
197
+ index c0aacbe3e0..9ce3f4af20 100644
198
198
  --- a/packages/llm/llm-pi-ai/README.md
199
199
  +++ b/packages/llm/llm-pi-ai/README.md
200
200
  @@ -79,6 +79,7 @@ Each profile may set a `retryPolicy`; omission uses normal mode with five retrie
@@ -215,7 +215,7 @@ index dcafde78e1..5db7b2fecd 100644
215
215
  ### Change configuration at runtime
216
216
 
217
217
  diff --git a/packages/llm/llm-pi-ai/README.zh.md b/packages/llm/llm-pi-ai/README.zh.md
218
- index a7292638b8..319059c939 100644
218
+ index 7b8cef7db2..4cad515615 100644
219
219
  --- a/packages/llm/llm-pi-ai/README.zh.md
220
220
  +++ b/packages/llm/llm-pi-ai/README.zh.md
221
221
  @@ -79,6 +79,7 @@ kind: "package-reference"
@@ -236,22 +236,10 @@ index a7292638b8..319059c939 100644
236
236
  ### 运行时更改配置
237
237
 
238
238
  diff --git a/packages/llm/llm-pi-ai/src/adapter.ts b/packages/llm/llm-pi-ai/src/adapter.ts
239
- index e20b8e0072..058e8f2824 100644
239
+ index e20b8e0072..d392ab7c72 100644
240
240
  --- a/packages/llm/llm-pi-ai/src/adapter.ts
241
241
  +++ b/packages/llm/llm-pi-ai/src/adapter.ts
242
- @@ -40,9 +40,11 @@ import type {
243
- } from '@earendil-works/pi-ai'
244
- import {
245
- attributionHeaders,
246
- + contentHasDocument,
247
- contentHasImage,
248
- LlmAdapter,
249
- LlmError,
250
- + projectRequestDocumentsWithAttachments,
251
- ReasoningEffortId,
252
- } from '@deepseek-ai/dsh-llm'
253
- import type {
254
- @@ -111,6 +113,24 @@ export interface PiAiAuthInjection {
242
+ @@ -111,6 +111,24 @@ export interface PiAiAuthInjection {
255
243
  authContext: AuthContext
256
244
  }
257
245
 
@@ -276,7 +264,7 @@ index e20b8e0072..058e8f2824 100644
276
264
  /** Copy profile stream knobs into pi-ai's common option vocabulary. */
277
265
  function profileOptions(
278
266
  profile: ResolvedPiAiProviderProfile,
279
- @@ -126,6 +146,7 @@ function profileOptions(
267
+ @@ -126,6 +144,7 @@ function profileOptions(
280
268
  ...profile.transport === undefined ? {} : { transport: profile.transport },
281
269
  ...profile.timeoutMs === undefined ? {} : { timeoutMs: profile.timeoutMs },
282
270
  ...profile.websocketConnectTimeoutMs === undefined ? {} : { websocketConnectTimeoutMs: profile.websocketConnectTimeoutMs },
@@ -284,38 +272,8 @@ index e20b8e0072..058e8f2824 100644
284
272
  // The agent recovery layer owns visible attempts; one adapter call is one SDK attempt.
285
273
  maxRetries: 0,
286
274
  }
287
- @@ -350,20 +371,24 @@ export class PiAiAdapter extends LlmAdapter {
288
- using watchdog = idleWatchdog(upstream, streamIdleTimeoutMs, 'LLM_STREAM_IDLE_TIMEOUT')
289
-
290
- try {
291
- + const containsDocument = options.messages.some(message => contentHasDocument(message.content))
292
- const containsImage = options.messages.some(message => contentHasImage(message.content))
293
- if (containsImage && !model.input.includes('image')) {
294
- throw new LlmError(`pi-ai model "${model.id}" does not support image input`, 'UNSUPPORTED_CONTENT')
295
- }
296
- - const attachments = containsImage ? this.config.resolveAttachments?.() : undefined
297
- - if (containsImage && attachments === undefined) {
298
- - throw new LlmError('pi-ai image input requires the durable attachment service', 'UNSUPPORTED_CONTENT')
299
- + const attachments = containsDocument || containsImage ? this.config.resolveAttachments?.() : undefined
300
- + if ((containsDocument || containsImage) && attachments === undefined) {
301
- + throw new LlmError('pi-ai document and image input requires the durable attachment service', 'UNSUPPORTED_CONTENT')
302
- }
303
- + const requestOptions = containsDocument
304
- + ? { ...options, messages: await projectRequestDocumentsWithAttachments(options.messages, attachments as AttachmentStore, watchdog.signal) }
305
- + : options
306
- const onReplayDegrade = (reason: string): void => {
307
- this.config.onReplayDegrade?.({ provider: options.provider, model: options.model, reason })
308
- }
309
- const context = attachments === undefined
310
- - ? toPiContext(options, undefined, onReplayDegrade)
311
- - : await toPiContext({ ...options, signal: watchdog.signal }, {
312
- + ? toPiContext(requestOptions, undefined, onReplayDegrade)
313
- + : await toPiContext({ ...requestOptions, signal: watchdog.signal }, {
314
- attachments,
315
- resolveImageAccess: ref => this.config.resolveImageAccess?.(attachments, ref),
316
- maxRequestImageBytes: profile.maxRequestImageBytes,
317
275
  diff --git a/packages/llm/llm-pi-ai/src/config.ts b/packages/llm/llm-pi-ai/src/config.ts
318
- index e5a7e608b9..ce8192bf28 100644
276
+ index 8da589cc39..2031e973f3 100644
319
277
  --- a/packages/llm/llm-pi-ai/src/config.ts
320
278
  +++ b/packages/llm/llm-pi-ai/src/config.ts
321
279
  @@ -84,6 +84,12 @@ export type {
@@ -359,10 +317,10 @@ index e5a7e608b9..ce8192bf28 100644
359
317
  defaultContextWindow: z.number().step(1).min(1).default(DEFAULT_CONTEXT_WINDOW),
360
318
  defaultMaxTokens: z.number().step(1).min(1).default(DEFAULT_MAX_TOKENS),
361
319
  defaultInput: z.array(z.union(MODALITIES)).default([...DEFAULT_INPUT]),
362
- @@ -400,6 +413,11 @@ export function resolveProfiles(
363
- if (source.displayName !== undefined && source.displayName.length === 0) {
320
+ @@ -415,6 +428,11 @@ export function resolveProfiles(
364
321
  throw new Error(`llm-pi-ai: provider "${provider}" has an empty displayName`)
365
322
  }
323
+ assertValidHeaders(provider, source.headers)
366
324
  + if (source.responsesCompatibility?.omitReasoningInputStatus === true && source.api !== 'openai-responses') {
367
325
  + throw new Error(
368
326
  + `llm-pi-ai: provider "${provider}" responsesCompatibility.omitReasoningInputStatus requires api "openai-responses"`,