@sparkelf/dsh-patch-responses-reasoning-status 0.2.0-rc.2 → 0.2.0-rc.21
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/package.json
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
"formatVersion": 1,
|
|
5
5
|
"variants": [
|
|
6
6
|
{
|
|
7
|
-
"dsh": ">=0.1.
|
|
7
|
+
"dsh": ">=0.1.7-alpha.2",
|
|
8
8
|
"file": "./patches/responses-reasoning-status.patch",
|
|
9
9
|
"id": "responses-omit-reasoning-input-status",
|
|
10
10
|
"target": {
|
|
11
|
-
"baseRevision": "
|
|
11
|
+
"baseRevision": "00102833dfaee1da9f48a3a8eae9d34005a75218",
|
|
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.2.0-rc.
|
|
35
|
+
"version": "0.2.0-rc.21"
|
|
36
36
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
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
|
|
2
|
-
index
|
|
2
|
+
index a21446f6ff..721a18a7e1 100644
|
|
3
3
|
--- a/packages/client/ui-settings-models/src/client/ModelsSection.module.css
|
|
4
4
|
+++ b/packages/client/ui-settings-models/src/client/ModelsSection.module.css
|
|
5
|
-
@@ -
|
|
5
|
+
@@ -415,6 +415,32 @@
|
|
6
6
|
padding-top: 12px;
|
|
7
7
|
}
|
|
8
8
|
|
|
@@ -31,16 +31,17 @@ index 2dc72373ea..f0a9ab95fb 100644
|
|
|
31
31
|
+ cursor: not-allowed;
|
|
32
32
|
+}
|
|
33
33
|
+
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
+
|
|
35
|
+
.modelCatalog {
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
37
38
|
diff --git a/packages/client/ui-settings-models/src/client/ProviderEditor.tsx b/packages/client/ui-settings-models/src/client/ProviderEditor.tsx
|
|
38
|
-
index
|
|
39
|
+
index b4df6a7124..74b9f6aa55 100644
|
|
39
40
|
--- a/packages/client/ui-settings-models/src/client/ProviderEditor.tsx
|
|
40
41
|
+++ b/packages/client/ui-settings-models/src/client/ProviderEditor.tsx
|
|
41
42
|
@@ -45,6 +45,9 @@ type EditorLayout = 'deepseek' | 'pi-ai' | 'unknown'
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
|
|
44
|
+
|
|
44
45
|
|
|
45
46
|
+/** Leaf path of the curated OpenAI Responses compatibility setting. */
|
|
46
47
|
+const OMIT_REASONING_INPUT_STATUS_PATH = ['responsesCompatibility', 'omitReasoningInputStatus'] as const
|
|
@@ -48,7 +49,7 @@ index ffa8c2e1fe..3c3e7729b4 100644
|
|
|
48
49
|
/** Props of {@link ProviderEditor}. */
|
|
49
50
|
export interface ProviderEditorProps {
|
|
50
51
|
/** Provider route id. */
|
|
51
|
-
@@ -
|
|
52
|
+
@@ -181,6 +184,10 @@ export function ProviderEditor(props: ProviderEditorProps): ReactNode {
|
|
52
53
|
const root = useMemo(() => schema.rehydrate(namespace.schema), [namespace.schema, schema])
|
|
53
54
|
const node = useMemo(() => schema.nodeAtPath(root, settingsPath), [root, schema, settingsPath])
|
|
54
55
|
const fallback = schema.getPath(namespace.value, settingsPath)
|
|
@@ -59,7 +60,7 @@ index ffa8c2e1fe..3c3e7729b4 100644
|
|
|
59
60
|
const disabled = props.readOnly || busy
|
|
60
61
|
const layout = layoutOf(namespace.ns)
|
|
61
62
|
const keyRef = refFor(schema, namespace, settingsPath, props.provider)
|
|
62
|
-
@@ -
|
|
63
|
+
@@ -209,6 +216,11 @@ export function ProviderEditor(props: ProviderEditorProps): ReactNode {
|
|
63
64
|
const value = schema.getPath(source, [key])
|
|
64
65
|
return typeof value === 'string' && value.trim().length > 0 ? value : undefined
|
|
65
66
|
}
|
|
@@ -71,7 +72,7 @@ index ffa8c2e1fe..3c3e7729b4 100644
|
|
|
71
72
|
const setField = (key: string, next: string | undefined): void => {
|
|
72
73
|
// A value of nothing but whitespace is cleared, not stored: `stringAt`
|
|
73
74
|
// already reports it as absent, so the field would otherwise render empty
|
|
74
|
-
@@ -
|
|
75
|
+
@@ -237,6 +249,9 @@ export function ProviderEditor(props: ProviderEditorProps): ReactNode {
|
|
75
76
|
// What the form currently shows, which is what an interrogation must ask:
|
|
76
77
|
// an edited-but-unsaved endpoint, and a key typed but not yet stored.
|
|
77
78
|
const probeApi = stringAt(draft, 'api') ?? stringAt(fallback, 'api')
|
|
@@ -81,7 +82,7 @@ index ffa8c2e1fe..3c3e7729b4 100644
|
|
|
81
82
|
const probeBaseURL = stringAt(draft, 'baseURL') ?? stringAt(fallback, 'baseURL')
|
|
82
83
|
const probe = {
|
|
83
84
|
settingsNs: namespace.ns,
|
|
84
|
-
@@ -
|
|
85
|
+
@@ -446,7 +461,15 @@ export function ProviderEditor(props: ProviderEditorProps): ReactNode {
|
|
85
86
|
value={probeApi ?? ''}
|
|
86
87
|
aria-label={t('customApi')}
|
|
87
88
|
disabled={disabled}
|
|
@@ -97,8 +98,8 @@ index ffa8c2e1fe..3c3e7729b4 100644
|
|
|
97
98
|
+ }}
|
|
98
99
|
>
|
|
99
100
|
{/* A profile naming no protocol — hand-written into
|
|
100
|
-
|
|
101
|
-
@@ -
|
|
101
|
+
cordis.patch.yml with no model to need one — selects
|
|
102
|
+
@@ -460,6 +483,24 @@ export function ProviderEditor(props: ProviderEditorProps): ReactNode {
|
|
102
103
|
</div>
|
|
103
104
|
)
|
|
104
105
|
: null}
|
|
@@ -124,27 +125,29 @@ index ffa8c2e1fe..3c3e7729b4 100644
|
|
|
124
125
|
the extras differ — DeepSeek's inherited capacities, pi-ai's
|
|
125
126
|
endpoint interrogation. */}
|
|
126
127
|
diff --git a/packages/client/ui-settings-models/src/client/locales.ts b/packages/client/ui-settings-models/src/client/locales.ts
|
|
127
|
-
index
|
|
128
|
+
index 9c8a44d9e0..ad9a8c9aca 100644
|
|
128
129
|
--- a/packages/client/ui-settings-models/src/client/locales.ts
|
|
129
130
|
+++ b/packages/client/ui-settings-models/src/client/locales.ts
|
|
130
|
-
@@ -
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
131
|
+
@@ -96,6 +96,7 @@ export const en = {
|
|
132
|
+
protocolOpenAiCompletions: 'OpenAI Chat Completions',
|
|
133
|
+
protocolOpenAiResponses: 'OpenAI Responses',
|
|
134
|
+
protocolAnthropicMessages: 'Anthropic Messages',
|
|
134
135
|
+ omitReasoningInputStatus: 'Gateway compatibility mode',
|
|
135
136
|
customNeedsBaseUrl: 'A custom provider needs a base URL.',
|
|
136
137
|
customBaseUrlInvalid: 'Enter a valid HTTP or HTTPS URL.',
|
|
137
138
|
customNeedsModels: 'A custom provider needs at least one model.',
|
|
138
|
-
@@ -
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
139
|
+
@@ -215,7 +216,8 @@ export const zh: { [Key in keyof typeof en]: string } = {
|
|
140
|
+
protocolOpenAiCompletions: 'OpenAI Chat Completions',
|
|
141
|
+
protocolOpenAiResponses: 'OpenAI Responses',
|
|
142
|
+
protocolAnthropicMessages: 'Anthropic Messages',
|
|
143
|
+
- customNeedsBaseUrl: '自定义模型 API 需要填写 API 地址。',
|
|
142
144
|
+ omitReasoningInputStatus: '中转站兼容模式',
|
|
143
|
-
|
|
145
|
+
+ customNeedsBaseUrl: '自定义提供方需要填写 API 地址。',
|
|
144
146
|
customBaseUrlInvalid: '请输入有效的 HTTP 或 HTTPS 地址。',
|
|
145
|
-
customNeedsModels: '
|
|
147
|
+
customNeedsModels: '自定义模型 API 至少需要一个模型。',
|
|
148
|
+
customBaseUrlPlaceholder: 'https://gateway.example/v1',
|
|
146
149
|
diff --git a/packages/llm/llm-pi-ai/src/adapter.ts b/packages/llm/llm-pi-ai/src/adapter.ts
|
|
147
|
-
index
|
|
150
|
+
index de9f3e0e42..404b66d173 100644
|
|
148
151
|
--- a/packages/llm/llm-pi-ai/src/adapter.ts
|
|
149
152
|
+++ b/packages/llm/llm-pi-ai/src/adapter.ts
|
|
150
153
|
@@ -111,6 +111,24 @@ export interface PiAiAuthInjection {
|
|
@@ -181,10 +184,10 @@ index 8dba978c31..5bd80331c5 100644
|
|
|
181
184
|
maxRetries: 0,
|
|
182
185
|
}
|
|
183
186
|
diff --git a/packages/llm/llm-pi-ai/src/config.ts b/packages/llm/llm-pi-ai/src/config.ts
|
|
184
|
-
index
|
|
187
|
+
index b07cd57bfb..0907f511c9 100644
|
|
185
188
|
--- a/packages/llm/llm-pi-ai/src/config.ts
|
|
186
189
|
+++ b/packages/llm/llm-pi-ai/src/config.ts
|
|
187
|
-
@@ -
|
|
190
|
+
@@ -88,6 +88,12 @@ export type {
|
|
188
191
|
PiAiThinkingFormat,
|
|
189
192
|
} from './catalog.ts'
|
|
190
193
|
|
|
@@ -197,7 +200,7 @@ index 2f9e563008..7eda300bad 100644
|
|
|
197
200
|
/** Configuration for one pi-ai provider route; the `providers` dict key IS the route. */
|
|
198
201
|
export interface PiAiProviderProfile {
|
|
199
202
|
/** Credential reference (environment-variable name) resolved per request through `ctx.credentials`. */
|
|
200
|
-
@@ -
|
|
203
|
+
@@ -125,6 +131,8 @@ export interface PiAiProviderProfile {
|
|
201
204
|
* refused rather than left looking applied.
|
|
202
205
|
*/
|
|
203
206
|
compat?: PiAiCompatProfile
|
|
@@ -206,7 +209,7 @@ index 2f9e563008..7eda300bad 100644
|
|
|
206
209
|
/**
|
|
207
210
|
* Context capacity for a model this route lists that neither the entry nor
|
|
208
211
|
* the installed catalog sizes (default 262,144). A guess by construction, so
|
|
209
|
-
@@ -
|
|
212
|
+
@@ -323,6 +331,10 @@ const modelProfile: z<PiAiModelProfile> = z.object({
|
|
210
213
|
/** A {@link modelProfile} whose id lives in the `modelOverrides` dict key. */
|
|
211
214
|
const modelOverride: z<PiAiModelOverride> = z.object(modelFields)
|
|
212
215
|
|
|
@@ -217,7 +220,7 @@ index 2f9e563008..7eda300bad 100644
|
|
|
217
220
|
const profile = z.object({
|
|
218
221
|
apiKeyEnv: z.string().role('credential-ref'),
|
|
219
222
|
displayName: z.string(),
|
|
220
|
-
@@ -
|
|
223
|
+
@@ -331,6 +343,7 @@ const profile = z.object({
|
|
221
224
|
models: z.array(modelProfile),
|
|
222
225
|
modelOverrides: z.dict(modelOverride),
|
|
223
226
|
compat: compatProfile,
|
|
@@ -225,7 +228,7 @@ index 2f9e563008..7eda300bad 100644
|
|
|
225
228
|
defaultContextWindow: z.number().step(1).min(1).default(DEFAULT_CONTEXT_WINDOW),
|
|
226
229
|
defaultMaxTokens: z.number().step(1).min(1).default(DEFAULT_MAX_TOKENS),
|
|
227
230
|
defaultInput: z.array(z.union(MODALITIES)).default([...DEFAULT_INPUT]),
|
|
228
|
-
@@ -
|
|
231
|
+
@@ -426,6 +439,11 @@ export function resolveProfiles(
|
|
229
232
|
throw new Error(`llm-pi-ai: provider "${provider}" has an empty displayName`)
|
|
230
233
|
}
|
|
231
234
|
assertValidHeaders(provider, source.headers)
|