@eddyskywalker/dsh-chatgpt-subscription 0.2.9 → 0.2.10
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.10 - 2026-09-06
|
|
4
|
+
|
|
5
|
+
- 修复 Antigravity 模型元数据校验失败导致 Provider 整体消失的问题:在 `resolveModel` 中清洗并安全兜底 `defaultEffort`,确保透传给 DSH 内核的 `defaultEffort` 必定存在于当前模型的 `efforts` 清单内;解决 `gemini-3.1-pro` 等模型(仅支持 `low` / `high`)因默认回退 `medium` 触发 `@deepseek-ai/dsh-llm` 的 `INVALID_MODEL_REASONING` 校验异常导致 Provider 从模型选择列表中消失的问题(Issue #4)。
|
|
6
|
+
|
|
3
7
|
## 0.2.9 - 2026-09-06
|
|
4
8
|
|
|
5
9
|
- 修复在官方 DSH 0.1.2-rc.1 / dsh-llm 0.1.2-rc.1 上加载失败问题:移除 Antigravity 模块中对 `CallId` 的静态具名导入,统一采用 `toToolCallId` 兼容垫片,动态兼容 `ToolCallId` 与 `CallId`;解决启动(boot)阶段因缺失 `CallId` 导出抛出 SyntaxError 导致插件整树无法加载的问题(Issue #4)。
|
package/lib/index.js
CHANGED
|
@@ -203,6 +203,7 @@ function resolveCodexModel(model, preferences) {
|
|
|
203
203
|
const status = preferences?.status();
|
|
204
204
|
const configuredContextWindow = isConfigurableContextModelId(model) ? status?.contextWindowOverrides[model] : void 0;
|
|
205
205
|
const efforts = reasoningEffortsForModel(model);
|
|
206
|
+
const defaultEffort = efforts.includes(entry.defaultReasoningEffort) ? entry.defaultReasoningEffort : efforts[0];
|
|
206
207
|
return {
|
|
207
208
|
provider: PROVIDER_ID$1,
|
|
208
209
|
id: model,
|
|
@@ -215,7 +216,7 @@ function resolveCodexModel(model, preferences) {
|
|
|
215
216
|
id: ReasoningEffortId(effort),
|
|
216
217
|
name: effort
|
|
217
218
|
})),
|
|
218
|
-
defaultEffort: ReasoningEffortId(
|
|
219
|
+
...defaultEffort ? { defaultEffort: ReasoningEffortId(defaultEffort) } : {}
|
|
219
220
|
}
|
|
220
221
|
};
|
|
221
222
|
}
|
|
@@ -5248,6 +5249,12 @@ function closeStream(state) {
|
|
|
5248
5249
|
}
|
|
5249
5250
|
//#endregion
|
|
5250
5251
|
//#region src/host/antigravity/adapter.ts
|
|
5252
|
+
function resolveDefaultReasoningEffort(efforts, configuredEffort) {
|
|
5253
|
+
if (configuredEffort && efforts.includes(configuredEffort)) return ReasoningEffortId(configuredEffort);
|
|
5254
|
+
if (efforts.includes("medium")) return ReasoningEffortId("medium");
|
|
5255
|
+
if (efforts.includes("low")) return ReasoningEffortId("low");
|
|
5256
|
+
if (efforts.length > 0) return ReasoningEffortId(efforts[0]);
|
|
5257
|
+
}
|
|
5251
5258
|
var AntigravityAdapter = class extends LlmAdapter {
|
|
5252
5259
|
store;
|
|
5253
5260
|
modelSettings;
|
|
@@ -5266,6 +5273,8 @@ var AntigravityAdapter = class extends LlmAdapter {
|
|
|
5266
5273
|
name: PROVIDER_NAME
|
|
5267
5274
|
};
|
|
5268
5275
|
}
|
|
5276
|
+
providerRetryPolicy() {}
|
|
5277
|
+
imageRequestPricing(_provider, _model) {}
|
|
5269
5278
|
async listModels(provider) {
|
|
5270
5279
|
const prov = provider || "antigravity";
|
|
5271
5280
|
const settings = this.preferences ? this.preferences.status() : await this.modelSettings.read();
|
|
@@ -5298,7 +5307,7 @@ var AntigravityAdapter = class extends LlmAdapter {
|
|
|
5298
5307
|
"medium",
|
|
5299
5308
|
"high"
|
|
5300
5309
|
];
|
|
5301
|
-
const
|
|
5310
|
+
const defaultEffortId = resolveDefaultReasoningEffort(efforts, settings.defaultReasoningEffort);
|
|
5302
5311
|
return {
|
|
5303
5312
|
provider,
|
|
5304
5313
|
id: model.id,
|
|
@@ -5311,7 +5320,7 @@ var AntigravityAdapter = class extends LlmAdapter {
|
|
|
5311
5320
|
id: ReasoningEffortId(effort),
|
|
5312
5321
|
name: effort
|
|
5313
5322
|
})),
|
|
5314
|
-
defaultEffort:
|
|
5323
|
+
...defaultEffortId ? { defaultEffort: defaultEffortId } : {}
|
|
5315
5324
|
} } : {}
|
|
5316
5325
|
};
|
|
5317
5326
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { LlmAdapter, type GenerateOptions, type LlmModelInfo, type LlmProviderInfo, type LlmResolvedModelInfo, type PreparedAdapterCall, type StreamChunk } from '@deepseek-ai/dsh-llm';
|
|
1
|
+
import { LlmAdapter, ReasoningEffortId, type GenerateOptions, type LlmModelInfo, type LlmProviderInfo, type LlmResolvedModelInfo, type PreparedAdapterCall, type StreamChunk } from '@deepseek-ai/dsh-llm';
|
|
2
2
|
import { FileCredentialStore, FileModelSettingsStore, type AntigravityPreferenceStore } from './token-store.ts';
|
|
3
|
+
export declare function resolveDefaultReasoningEffort(efforts: readonly string[], configuredEffort?: string | null): ReasoningEffortId | undefined;
|
|
3
4
|
export declare class AntigravityAdapter extends LlmAdapter {
|
|
4
5
|
private readonly store;
|
|
5
6
|
private readonly modelSettings;
|
|
@@ -9,6 +10,8 @@ export declare class AntigravityAdapter extends LlmAdapter {
|
|
|
9
10
|
fetchFn?: typeof fetch;
|
|
10
11
|
});
|
|
11
12
|
providerInfo(provider: string): LlmProviderInfo;
|
|
13
|
+
providerRetryPolicy(): undefined;
|
|
14
|
+
imageRequestPricing(_provider?: string, _model?: string): undefined;
|
|
12
15
|
listModels(provider?: string): Promise<readonly LlmModelInfo[]>;
|
|
13
16
|
resolveModel(provider: string, modelId: string, signal?: AbortSignal): Promise<LlmResolvedModelInfo>;
|
|
14
17
|
prepareCall(provider: string, model: string, signal?: AbortSignal): Promise<PreparedAdapterCall>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/host/antigravity/adapter.ts"],"names":[],"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oBAAoB,CAAC;IAqCpG,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAO/F,MAAM,CAAC,OAAO,EAAE,eAAe,GAAG,aAAa,CAAC,WAAW,CAAC;YAwBpD,aAAa;CAwG7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-catalog.d.ts","sourceRoot":"","sources":["../../../src/host/model-catalog.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAG9E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAA;AAEnE,eAAO,MAAM,WAAW,iBAA4B,CAAA;AACpD,eAAO,MAAM,aAAa,EAAG,uCAA4B,CAAA;AAEzD,wBAAgB,eAAe,CAAC,WAAW,CAAC,EAAE,2BAA2B,GAAG,YAAY,EAAE,CAQzF;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,2BAA2B,GAAG,oBAAoB,
|
|
1
|
+
{"version":3,"file":"model-catalog.d.ts","sourceRoot":"","sources":["../../../src/host/model-catalog.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAG9E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAA;AAEnE,eAAO,MAAM,WAAW,iBAA4B,CAAA;AACpD,eAAO,MAAM,aAAa,EAAG,uCAA4B,CAAA;AAEzD,wBAAgB,eAAe,CAAC,WAAW,CAAC,EAAE,2BAA2B,GAAG,YAAY,EAAE,CAQzF;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,2BAA2B,GAAG,oBAAoB,CAyBhH"}
|