@sparkelf/dsh-patch-responses-reasoning-status 0.1.0-rc.9 → 0.2.0-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/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: 62853688c4437f309232ceec35e6aea88e0521db
6
- README.zh.md: e96fec15936e56573dde03480be7307a7dfd4077
5
+ README.md: 998c4b0933733ea6d01565c30647510ccb5cb5c5
6
+ README.zh.md: c6f95488b6525e74875490b56d655818bdbce6dc
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 `cd5ef8148158c3a752a658978873241fdf8e2bbc`. 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 `fb2c4b9e698e30edb738bca4cf0618587db7d203`. 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 `cd5ef8148158c3a752a658978873241fdf8e2bbc`。本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 `fb2c4b9e698e30edb738bca4cf0618587db7d203`。本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
@@ -1,36 +1,36 @@
1
1
  {
2
- "name": "@sparkelf/dsh-patch-responses-reasoning-status",
3
- "version": "0.1.0-rc.9",
4
2
  "description": "Data-only exact official-source patch for OpenAI Responses gateways that reject replayed reasoning status metadata",
5
- "publishConfig": {
6
- "access": "public"
7
- },
8
- "repository": {
9
- "type": "git",
10
- "url": "git+https://github.com/SparkElf/deepseek-harness-plus.git",
11
- "directory": "patches/npm/responses-reasoning-status"
12
- },
13
- "type": "module",
14
- "files": [
15
- "patches/*.patch"
16
- ],
17
- "license": "MIT",
18
3
  "dshPatch": {
19
4
  "formatVersion": 1,
20
5
  "variants": [
21
6
  {
7
+ "dsh": ">=0.1.6-alpha.1",
8
+ "file": "./patches/responses-reasoning-status.patch",
22
9
  "id": "responses-omit-reasoning-input-status",
23
- "dsh": ">=0.1.2-alpha.1",
24
10
  "target": {
11
+ "baseRevision": "0a15e36e7f82b6ed45af6fa9759f29b40dcd965d",
25
12
  "kind": "dsh-source",
26
- "baseRevision": "cd5ef8148158c3a752a658978873241fdf8e2bbc",
27
13
  "paths": [
28
14
  "packages/llm/llm-pi-ai/",
29
15
  "packages/client/ui-settings-models/"
30
16
  ]
31
- },
32
- "file": "./patches/responses-reasoning-status.patch"
17
+ }
33
18
  }
34
19
  ]
35
- }
36
- }
20
+ },
21
+ "files": [
22
+ "patches/*.patch"
23
+ ],
24
+ "license": "MIT",
25
+ "name": "@sparkelf/dsh-patch-responses-reasoning-status",
26
+ "publishConfig": {
27
+ "access": "public"
28
+ },
29
+ "repository": {
30
+ "directory": "patches/npm/responses-reasoning-status",
31
+ "type": "git",
32
+ "url": "git+https://github.com/SparkElf/deepseek-harness-plus.git"
33
+ },
34
+ "type": "module",
35
+ "version": "0.2.0-rc.2"
36
+ }
@@ -1,46 +1,8 @@
1
- diff --git a/packages/client/ui-settings-models/README.i18n.yaml b/packages/client/ui-settings-models/README.i18n.yaml
2
- index 8b69e152a0..2f8226726f 100644
3
- --- a/packages/client/ui-settings-models/README.i18n.yaml
4
- +++ b/packages/client/ui-settings-models/README.i18n.yaml
5
- @@ -2,5 +2,5 @@
6
- # side as of the last confirmed-consistent state. Both languages carry equal authority;
7
- # after editing either side, bring the other along and re-record with:
8
- # pnpm run verify-translation-pairing --write packages/client/ui-settings-models/README.md
9
- -README.md: 75efb18daf3e4a96fea637f36633f216046ebccd
10
- -README.zh.md: f3c7099e242e379be5143352d4045208a8209dc6
11
- +README.md: 18be58b5a85cb1fcf10710c57d7aea8211c104d8
12
- +README.zh.md: 073b581bf425bea07bbc52b5e35207c2a4a34514
13
- diff --git a/packages/client/ui-settings-models/README.md b/packages/client/ui-settings-models/README.md
14
- index 75efb18daf..18be58b5a8 100644
15
- --- a/packages/client/ui-settings-models/README.md
16
- +++ b/packages/client/ui-settings-models/README.md
17
- @@ -33,7 +33,7 @@ The primary field on an editor card is a single **API key** input — the page n
18
-
19
- ### Editing a provider
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.
23
-
24
- ### Adding and deleting providers
25
-
26
- diff --git a/packages/client/ui-settings-models/README.zh.md b/packages/client/ui-settings-models/README.zh.md
27
- index f3c7099e24..073b581bf4 100644
28
- --- a/packages/client/ui-settings-models/README.zh.md
29
- +++ b/packages/client/ui-settings-models/README.zh.md
30
- @@ -33,7 +33,7 @@ kind: "package-reference"
31
-
32
- ### 编辑提供方
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`;该精选集之外的现有字段在编辑后仍会保留。
36
-
37
- ### 新增与删除提供方
38
-
39
1
  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
2
+ index 2dc72373ea..f0a9ab95fb 100644
41
3
  --- a/packages/client/ui-settings-models/src/client/ModelsSection.module.css
42
4
  +++ b/packages/client/ui-settings-models/src/client/ModelsSection.module.css
43
- @@ -396,6 +396,31 @@
5
+ @@ -397,6 +397,31 @@
44
6
  padding-top: 12px;
45
7
  }
46
8
 
@@ -73,10 +35,10 @@ index fe2fe87d3a..a0e3103270 100644
73
35
  written once above the rows, so a row is one line of fields plus its
74
36
  delete control; each field still carries the indexed `aria-label` that
75
37
  diff --git a/packages/client/ui-settings-models/src/client/ProviderEditor.tsx b/packages/client/ui-settings-models/src/client/ProviderEditor.tsx
76
- index 675c852125..cb16012c56 100644
38
+ index ffa8c2e1fe..3c3e7729b4 100644
77
39
  --- a/packages/client/ui-settings-models/src/client/ProviderEditor.tsx
78
40
  +++ b/packages/client/ui-settings-models/src/client/ProviderEditor.tsx
79
- @@ -44,6 +44,9 @@ type EditorLayout = 'deepseek' | 'pi-ai' | 'unknown'
41
+ @@ -45,6 +45,9 @@ type EditorLayout = 'deepseek' | 'pi-ai' | 'unknown'
80
42
  /** The public DeepSeek endpoint shown as the deepseek base-URL placeholder. */
81
43
  const DEEPSEEK_PUBLIC_BASE_URL = 'https://api.deepseek.com'
82
44
 
@@ -86,7 +48,7 @@ index 675c852125..cb16012c56 100644
86
48
  /** Props of {@link ProviderEditor}. */
87
49
  export interface ProviderEditorProps {
88
50
  /** Provider route id. */
89
- @@ -171,6 +174,10 @@ export function ProviderEditor(props: ProviderEditorProps): ReactNode {
51
+ @@ -172,6 +175,10 @@ export function ProviderEditor(props: ProviderEditorProps): ReactNode {
90
52
  const root = useMemo(() => schema.rehydrate(namespace.schema), [namespace.schema, schema])
91
53
  const node = useMemo(() => schema.nodeAtPath(root, settingsPath), [root, schema, settingsPath])
92
54
  const fallback = schema.getPath(namespace.value, settingsPath)
@@ -97,7 +59,7 @@ index 675c852125..cb16012c56 100644
97
59
  const disabled = props.readOnly || busy
98
60
  const layout = layoutOf(namespace.ns)
99
61
  const keyRef = refFor(schema, namespace, settingsPath, props.provider)
100
- @@ -204,6 +211,11 @@ export function ProviderEditor(props: ProviderEditorProps): ReactNode {
62
+ @@ -200,6 +207,11 @@ export function ProviderEditor(props: ProviderEditorProps): ReactNode {
101
63
  const value = schema.getPath(source, [key])
102
64
  return typeof value === 'string' && value.trim().length > 0 ? value : undefined
103
65
  }
@@ -109,7 +71,7 @@ index 675c852125..cb16012c56 100644
109
71
  const setField = (key: string, next: string | undefined): void => {
110
72
  // A value of nothing but whitespace is cleared, not stored: `stringAt`
111
73
  // already reports it as absent, so the field would otherwise render empty
112
- @@ -232,6 +244,9 @@ export function ProviderEditor(props: ProviderEditorProps): ReactNode {
74
+ @@ -228,6 +240,9 @@ export function ProviderEditor(props: ProviderEditorProps): ReactNode {
113
75
  // What the form currently shows, which is what an interrogation must ask:
114
76
  // an edited-but-unsaved endpoint, and a key typed but not yet stored.
115
77
  const probeApi = stringAt(draft, 'api') ?? stringAt(fallback, 'api')
@@ -119,7 +81,7 @@ index 675c852125..cb16012c56 100644
119
81
  const probeBaseURL = stringAt(draft, 'baseURL') ?? stringAt(fallback, 'baseURL')
120
82
  const probe = {
121
83
  settingsNs: namespace.ns,
122
- @@ -447,7 +462,15 @@ export function ProviderEditor(props: ProviderEditorProps): ReactNode {
84
+ @@ -434,7 +449,15 @@ export function ProviderEditor(props: ProviderEditorProps): ReactNode {
123
85
  value={probeApi ?? ''}
124
86
  aria-label={t('customApi')}
125
87
  disabled={disabled}
@@ -136,7 +98,7 @@ index 675c852125..cb16012c56 100644
136
98
  >
137
99
  {/* A profile naming no protocol — hand-written into
138
100
  settings.yaml with no model to need one — selects
139
- @@ -461,6 +484,24 @@ export function ProviderEditor(props: ProviderEditorProps): ReactNode {
101
+ @@ -448,6 +471,24 @@ export function ProviderEditor(props: ProviderEditorProps): ReactNode {
140
102
  </div>
141
103
  )
142
104
  : null}
@@ -162,81 +124,27 @@ index 675c852125..cb16012c56 100644
162
124
  the extras differ — DeepSeek's inherited capacities, pi-ai's
163
125
  endpoint interrogation. */}
164
126
  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
127
+ index 3a3190416f..49aac02f68 100644
166
128
  --- a/packages/client/ui-settings-models/src/client/locales.ts
167
129
  +++ b/packages/client/ui-settings-models/src/client/locales.ts
168
- @@ -83,6 +83,7 @@ export const en = {
130
+ @@ -85,6 +85,7 @@ export const en = {
169
131
  customDisplayName: 'Display name',
170
132
  customApi: 'API protocol',
171
133
  customApiUnset: 'Not selected',
172
134
  + omitReasoningInputStatus: 'Gateway compatibility mode',
173
135
  customNeedsBaseUrl: 'A custom provider needs a base URL.',
136
+ customBaseUrlInvalid: 'Enter a valid HTTP or HTTPS URL.',
174
137
  customNeedsModels: 'A custom provider needs at least one model.',
175
- customBaseUrlPlaceholder: 'https://gateway.example/v1',
176
- @@ -187,6 +188,7 @@ export const zh: { [Key in keyof typeof en]: string } = {
138
+ @@ -192,6 +193,7 @@ export const zh: { [Key in keyof typeof en]: string } = {
177
139
  customDisplayName: '显示名称',
178
140
  customApi: 'API 协议',
179
141
  customApiUnset: '未选择',
180
142
  + omitReasoningInputStatus: '中转站兼容模式',
181
143
  customNeedsBaseUrl: '自定义提供方需要填写 API 地址。',
144
+ customBaseUrlInvalid: '请输入有效的 HTTP 或 HTTPS 地址。',
182
145
  customNeedsModels: '自定义提供方至少需要一个模型。',
183
- customBaseUrlPlaceholder: 'https://gateway.example/v1',
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
186
- --- a/packages/llm/llm-pi-ai/README.i18n.yaml
187
- +++ b/packages/llm/llm-pi-ai/README.i18n.yaml
188
- @@ -2,5 +2,5 @@
189
- # side as of the last confirmed-consistent state. Both languages carry equal authority;
190
- # after editing either side, bring the other along and re-record with:
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
196
- diff --git a/packages/llm/llm-pi-ai/README.md b/packages/llm/llm-pi-ai/README.md
197
- index dcafde78e1..5db7b2fecd 100644
198
- --- a/packages/llm/llm-pi-ai/README.md
199
- +++ b/packages/llm/llm-pi-ai/README.md
200
- @@ -79,6 +79,7 @@ Each profile may set a `retryPolicy`; omission uses normal mode with five retrie
201
- | `models` | installed catalog | Replaces the route's catalog wholesale; each entry defaults from the installed model |
202
- | `modelOverrides` | none | Reshapes individual installed-catalog models without replacing the rest |
203
- | `compat` | catalog detection | Wire-compatibility switches for unrecognized endpoints |
204
- +| `responsesCompatibility` | absent | OpenAI Responses input-item adjustments for compatible gateways |
205
- | `defaultContextWindow` | `262,144` | Capacity fallback for undescribed models |
206
- | `defaultMaxTokens` | `32,768` | Output-cap fallback for undescribed models |
207
- | `requestImagePixelBudget` | `4,194,304` | Total-pixel budget for each deterministic request image |
208
- @@ -98,7 +99,7 @@ A profile's `models` list replaces the route's installed catalog rather than ext
209
-
210
- ### Run with reasoning and wire compatibility
211
-
212
- -`reasoningEfforts` declares a model's selectable thinking levels: each key is a level selectors offer, its value the spelling dispatch sends on the wire, so `max: ultra` renames a level for a gateway with its own vocabulary. Omitting the field keeps the installed catalog entry's capability; `false` declares a non-reasoning model. `compat` switches reshape the request for endpoints pi-ai cannot recognize — which role carries the system prompt, which field caps output, how a thinking level travels — configurable per route and per model. A model neither the entry nor the installed catalog sizes takes the route's `defaultContextWindow` and `defaultMaxTokens` fallbacks.
213
- +`reasoningEfforts` declares a model's selectable thinking levels: each key is a level selectors offer, its value the spelling dispatch sends on the wire, so `max: ultra` renames a level for a gateway with its own vocabulary. Omitting the field keeps the installed catalog entry's capability; `false` declares a non-reasoning model. `compat` switches reshape the request for endpoints pi-ai cannot recognize — which role carries the system prompt, which field caps output, how a thinking level travels — configurable per route and per model. An explicit `openai-responses` route may set `responsesCompatibility.omitReasoningInputStatus: true` when its gateway accepts replayed reasoning items but rejects their response-only `status` field; the adapter removes only that field from top-level reasoning input items after pi-ai serializes the request, and every other protocol refuses the option. A model neither the entry nor the installed catalog sizes takes the route's `defaultContextWindow` and `defaultMaxTokens` fallbacks.
214
-
215
- ### Change configuration at runtime
216
-
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
219
- --- a/packages/llm/llm-pi-ai/README.zh.md
220
- +++ b/packages/llm/llm-pi-ai/README.zh.md
221
- @@ -79,6 +79,7 @@ kind: "package-reference"
222
- | `models` | 已安装目录 | 整体替换路由目录;每个条目从已安装模型取默认值 |
223
- | `modelOverrides` | 无 | 重塑个别已安装目录模型,而不替换其余模型 |
224
- | `compat` | 目录检测 | 无法识别端点的协议兼容开关 |
225
- +| `responsesCompatibility` | 无 | 兼容网关的 OpenAI Responses 输入项调整 |
226
- | `defaultContextWindow` | `262,144` | 未描述模型的容量回退 |
227
- | `defaultMaxTokens` | `32,768` | 未描述模型的输出上限回退 |
228
- | `requestImagePixelBudget` | `4,194,304` | 每张确定性请求图片的总像素预算 |
229
- @@ -98,7 +99,7 @@ profile 的 `models` 列表会替换而非扩展路由的已安装目录;每
230
-
231
- ### 带推理与协议兼容运行
232
-
233
- -`reasoningEfforts` 声明模型可选择的 thinking 等级:每个键都是选择器提供的等级,其值是该等级过线的拼写,因此 `max: ultra` 可以为拥有自有词汇的网关重命名等级。省略该字段时保留已安装目录条目的能力;`false` 声明非推理模型。对于 pi-ai 无法识别的端点,`compat` 开关重塑请求——哪个角色携带系统提示词、哪个字段限制输出、thinking 等级如何传递——可逐路由、逐模型配置。条目与已安装目录都没有尺寸的模型,会采用路由的 `defaultContextWindow` 与 `defaultMaxTokens` 回退值。
234
- +`reasoningEfforts` 声明模型可选择的 thinking 等级:每个键都是选择器提供的等级,其值是该等级过线的拼写,因此 `max: ultra` 可以为拥有自有词汇的网关重命名等级。省略该字段时保留已安装目录条目的能力;`false` 声明非推理模型。对于 pi-ai 无法识别的端点,`compat` 开关重塑请求——哪个角色携带系统提示词、哪个字段限制输出、thinking 等级如何传递——可逐路由、逐模型配置。显式使用 `openai-responses` 的路由可在网关接受历史 reasoning 项、但拒绝其中响应侧专用 `status` 字段时设置 `responsesCompatibility.omitReasoningInputStatus: true`;适配器在 pi-ai 序列化请求后,仅从顶层 reasoning 输入项删除该字段,其他协议会拒绝此选项。条目与已安装目录都没有尺寸的模型,会采用路由的 `defaultContextWindow` 与 `defaultMaxTokens` 回退值。
235
-
236
- ### 运行时更改配置
237
-
238
146
  diff --git a/packages/llm/llm-pi-ai/src/adapter.ts b/packages/llm/llm-pi-ai/src/adapter.ts
239
- index e20b8e0072..d392ab7c72 100644
147
+ index 8dba978c31..5bd80331c5 100644
240
148
  --- a/packages/llm/llm-pi-ai/src/adapter.ts
241
149
  +++ b/packages/llm/llm-pi-ai/src/adapter.ts
242
150
  @@ -111,6 +111,24 @@ export interface PiAiAuthInjection {
@@ -273,10 +181,10 @@ index e20b8e0072..d392ab7c72 100644
273
181
  maxRetries: 0,
274
182
  }
275
183
  diff --git a/packages/llm/llm-pi-ai/src/config.ts b/packages/llm/llm-pi-ai/src/config.ts
276
- index e5a7e608b9..ce8192bf28 100644
184
+ index 2f9e563008..7eda300bad 100644
277
185
  --- a/packages/llm/llm-pi-ai/src/config.ts
278
186
  +++ b/packages/llm/llm-pi-ai/src/config.ts
279
- @@ -84,6 +84,12 @@ export type {
187
+ @@ -87,6 +87,12 @@ export type {
280
188
  PiAiThinkingFormat,
281
189
  } from './catalog.ts'
282
190
 
@@ -289,7 +197,7 @@ index e5a7e608b9..ce8192bf28 100644
289
197
  /** Configuration for one pi-ai provider route; the `providers` dict key IS the route. */
290
198
  export interface PiAiProviderProfile {
291
199
  /** Credential reference (environment-variable name) resolved per request through `ctx.credentials`. */
292
- @@ -121,6 +127,8 @@ export interface PiAiProviderProfile {
200
+ @@ -124,6 +130,8 @@ export interface PiAiProviderProfile {
293
201
  * refused rather than left looking applied.
294
202
  */
295
203
  compat?: PiAiCompatProfile
@@ -298,7 +206,7 @@ index e5a7e608b9..ce8192bf28 100644
298
206
  /**
299
207
  * Context capacity for a model this route lists that neither the entry nor
300
208
  * the installed catalog sizes (default 262,144). A guess by construction, so
301
- @@ -311,6 +319,10 @@ const modelProfile: z<PiAiModelProfile> = z.object({
209
+ @@ -319,6 +327,10 @@ const modelProfile: z<PiAiModelProfile> = z.object({
302
210
  /** A {@link modelProfile} whose id lives in the `modelOverrides` dict key. */
303
211
  const modelOverride: z<PiAiModelOverride> = z.object(modelFields)
304
212
 
@@ -309,7 +217,7 @@ index e5a7e608b9..ce8192bf28 100644
309
217
  const profile = z.object({
310
218
  apiKeyEnv: z.string().role('credential-ref'),
311
219
  displayName: z.string(),
312
- @@ -319,6 +331,7 @@ const profile = z.object({
220
+ @@ -327,6 +339,7 @@ const profile = z.object({
313
221
  models: z.array(modelProfile),
314
222
  modelOverrides: z.dict(modelOverride),
315
223
  compat: compatProfile,
@@ -317,10 +225,10 @@ index e5a7e608b9..ce8192bf28 100644
317
225
  defaultContextWindow: z.number().step(1).min(1).default(DEFAULT_CONTEXT_WINDOW),
318
226
  defaultMaxTokens: z.number().step(1).min(1).default(DEFAULT_MAX_TOKENS),
319
227
  defaultInput: z.array(z.union(MODALITIES)).default([...DEFAULT_INPUT]),
320
- @@ -400,6 +413,11 @@ export function resolveProfiles(
321
- if (source.displayName !== undefined && source.displayName.length === 0) {
228
+ @@ -422,6 +435,11 @@ export function resolveProfiles(
322
229
  throw new Error(`llm-pi-ai: provider "${provider}" has an empty displayName`)
323
230
  }
231
+ assertValidHeaders(provider, source.headers)
324
232
  + if (source.responsesCompatibility?.omitReasoningInputStatus === true && source.api !== 'openai-responses') {
325
233
  + throw new Error(
326
234
  + `llm-pi-ai: provider "${provider}" responsesCompatibility.omitReasoningInputStatus requires api "openai-responses"`,