@eddyskywalker/dsh-chatgpt-subscription 0.66.1 → 0.66.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/CHANGELOG.md +9 -0
- package/lib/client.js.map +1 -1
- package/lib/index.js +72 -21
- package/lib/types/compat.d.ts +1 -1
- package/lib/types/host/common/request-images.d.ts +13 -1
- package/lib/types/host/common/request-images.d.ts.map +1 -1
- package/lib/types/host/kimi-code/adapter.d.ts.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -809,7 +809,7 @@ const ROUTE_PREFIX$5 = "/api/dsh-chatgpt-subscription";
|
|
|
809
809
|
* `test/responses-client.test.ts` asserts the two agree, so a release that
|
|
810
810
|
* forgets this constant fails the suite instead of shipping quietly.
|
|
811
811
|
*/
|
|
812
|
-
const PLUGIN_VERSION = "0.66.
|
|
812
|
+
const PLUGIN_VERSION = "0.66.2";
|
|
813
813
|
const CODEX_CHATGPT_PROVIDER_ID = "codex-chatgpt";
|
|
814
814
|
const CODEX_API_BASE = "https://chatgpt.com/backend-api/codex";
|
|
815
815
|
const CODEX_RESPONSES_URL = `${CODEX_API_BASE}/responses`;
|
|
@@ -9528,6 +9528,22 @@ function collectImageOccurrences(options, images) {
|
|
|
9528
9528
|
return occurrences;
|
|
9529
9529
|
}
|
|
9530
9530
|
/**
|
|
9531
|
+
* Inline base64 bytes one request actually carries.
|
|
9532
|
+
*
|
|
9533
|
+
* `inlineExcludedKeys` names occurrences serialized as hosted references on
|
|
9534
|
+
* this build. Their original resolution still supplies the identity, but the
|
|
9535
|
+
* reference—not the base64 payload—is what goes on the wire, so those bytes
|
|
9536
|
+
* must not be reported as request image usage.
|
|
9537
|
+
*/
|
|
9538
|
+
function requestInlineImageBytes(options, images, inlineExcludedKeys) {
|
|
9539
|
+
let total = 0;
|
|
9540
|
+
for (const occurrence of collectImageOccurrences(options, images)) {
|
|
9541
|
+
if (inlineExcludedKeys?.has(occurrence.key)) continue;
|
|
9542
|
+
total += occurrence.bytes;
|
|
9543
|
+
}
|
|
9544
|
+
return total;
|
|
9545
|
+
}
|
|
9546
|
+
/**
|
|
9531
9547
|
* The identities of the images one request still carries, each once.
|
|
9532
9548
|
*
|
|
9533
9549
|
* The caller compares two of these to learn what a later build gave back: the
|
|
@@ -9632,13 +9648,17 @@ function replaceDroppedRequestImages(options, droppedKeys, images) {
|
|
|
9632
9648
|
* @param lowBytes - low-water mark; the trimming stops once the request is back under it.
|
|
9633
9649
|
* @param images - the resolution the request will be sent with.
|
|
9634
9650
|
* @param priorDroppedKeys - identities dropped by earlier turns.
|
|
9651
|
+
* @param inlineExcludedKeys - identities whose actual wire form is a hosted
|
|
9652
|
+
* reference rather than inline bytes. They stay in request order with a zero
|
|
9653
|
+
* byte weight; only genuinely inline images consume this budget.
|
|
9635
9654
|
*/
|
|
9636
|
-
function offloadRequestImagesWithStickyBudget(options, maxBytes = MAX_REQUEST_IMAGE_BYTES$2, lowBytes = Math.max(1, Math.floor(maxBytes / 2)), images, priorDroppedKeys) {
|
|
9655
|
+
function offloadRequestImagesWithStickyBudget(options, maxBytes = MAX_REQUEST_IMAGE_BYTES$2, lowBytes = Math.max(1, Math.floor(maxBytes / 2)), images, priorDroppedKeys, inlineExcludedKeys) {
|
|
9637
9656
|
const allDroppedKeys = new Set(priorDroppedKeys ?? []);
|
|
9638
9657
|
const pending = /* @__PURE__ */ new Map();
|
|
9639
9658
|
for (const occurrence of collectImageOccurrences(options, images)) {
|
|
9640
9659
|
if (allDroppedKeys.has(occurrence.key)) continue;
|
|
9641
|
-
|
|
9660
|
+
const bytes = inlineExcludedKeys?.has(occurrence.key) ? 0 : occurrence.bytes;
|
|
9661
|
+
pending.set(occurrence.key, (pending.get(occurrence.key) ?? 0) + bytes);
|
|
9642
9662
|
}
|
|
9643
9663
|
let total = 0;
|
|
9644
9664
|
for (const bytes of pending.values()) total += bytes;
|
|
@@ -39281,8 +39301,28 @@ var KimiCodeAdapter = class extends LlmAdapter {
|
|
|
39281
39301
|
requestDiagnostic.wire = wire;
|
|
39282
39302
|
const entry = catalog.find((model) => model.id === options.model);
|
|
39283
39303
|
const images = await resolveRequestImages$2(normalized, this.options.attachments, signal, KIMI_CODE_REQUEST_IMAGE_MAX_EDGE);
|
|
39304
|
+
const settings = await this.settings();
|
|
39305
|
+
const modalities = inputModalitiesForEntry(options.model, catalog);
|
|
39306
|
+
/**
|
|
39307
|
+
* Which readable image occurrences the reference path would cover.
|
|
39308
|
+
*
|
|
39309
|
+
* Planned BEFORE the image budget: a durable image this OpenAI request will
|
|
39310
|
+
* cite as `ms://` carries no inline base64 bytes, exactly as in Kimi's own
|
|
39311
|
+
* media resolver. Nothing is uploaded here; the actual references are still
|
|
39312
|
+
* checked after upload so a failed upload cannot escape the inline budget.
|
|
39313
|
+
* Videos stay out of this early plan: their own oldest-first pass runs
|
|
39314
|
+
* before their bytes are read, just as it did before this change.
|
|
39315
|
+
*/
|
|
39316
|
+
const plannedImages = planMediaReferences({
|
|
39317
|
+
wire,
|
|
39318
|
+
imageAccepted: modalities.includes("image"),
|
|
39319
|
+
videoAccepted: false,
|
|
39320
|
+
images,
|
|
39321
|
+
videos: /* @__PURE__ */ new Map()
|
|
39322
|
+
});
|
|
39323
|
+
const plannedInlineImageKeys = new Set(plannedImages.map((item) => `attachment:${item.attachmentId}`));
|
|
39284
39324
|
const priorDroppedKeys = getSessionDroppedImageKeys(options.sessionId, options.sessionId === void 0 ? void 0 : sessionCacheState.read(options.sessionId)?.budgetDropped);
|
|
39285
|
-
const stickyOffload = offloadRequestImagesWithStickyBudget(normalized, maxRequestImageBytes$1(), lowRequestImageBytes(), images, priorDroppedKeys);
|
|
39325
|
+
const stickyOffload = offloadRequestImagesWithStickyBudget(normalized, maxRequestImageBytes$1(), lowRequestImageBytes(), images, priorDroppedKeys, plannedInlineImageKeys);
|
|
39286
39326
|
const imageTrimmed = stickyOffload.options;
|
|
39287
39327
|
if (!sideChannel) markPendingImageOffload(options.sessionId, stickyOffload.newlyDroppedKeys.length);
|
|
39288
39328
|
const gatedEffort = coerceThinkingEffort(options.model, mapReasoningEffort(options.reasoningEffort === void 0 || options.reasoningEffort === null ? void 0 : String(options.reasoningEffort)));
|
|
@@ -39298,8 +39338,6 @@ var KimiCodeAdapter = class extends LlmAdapter {
|
|
|
39298
39338
|
reasoningEffort: ReasoningEffortId(gatedEffort.effort)
|
|
39299
39339
|
};
|
|
39300
39340
|
const videos = await resolveRequestVideos(requestOptions, this.options.videos, signal);
|
|
39301
|
-
const settings = await this.settings();
|
|
39302
|
-
const modalities = inputModalitiesForEntry(options.model, catalog);
|
|
39303
39341
|
/**
|
|
39304
39342
|
* Everything every attempt shares: the media reads and the capability gates.
|
|
39305
39343
|
*
|
|
@@ -39319,13 +39357,14 @@ var KimiCodeAdapter = class extends LlmAdapter {
|
|
|
39319
39357
|
* be sent; nothing is uploaded, and no network is touched, until that guard
|
|
39320
39358
|
* has accepted the request (see the rotation loop).
|
|
39321
39359
|
*/
|
|
39322
|
-
const
|
|
39360
|
+
const plannedVideos = planMediaReferences({
|
|
39323
39361
|
wire,
|
|
39324
|
-
imageAccepted:
|
|
39362
|
+
imageAccepted: false,
|
|
39325
39363
|
videoAccepted: baseMedia.videoAccepted === true,
|
|
39326
|
-
images,
|
|
39364
|
+
images: /* @__PURE__ */ new Map(),
|
|
39327
39365
|
videos
|
|
39328
39366
|
});
|
|
39367
|
+
const planned = [...plannedImages, ...plannedVideos];
|
|
39329
39368
|
const contextWindow = this.contextWindowFor(options.model, entry, settings.contextWindowOverrides);
|
|
39330
39369
|
const requestedMax = options.maxTokens ?? maxOutputTokensFor$4(options.model, contextWindow);
|
|
39331
39370
|
const inputCap = maxInputTokensForEntry(options.model, catalog);
|
|
@@ -39344,13 +39383,15 @@ var KimiCodeAdapter = class extends LlmAdapter {
|
|
|
39344
39383
|
* references), the real reference build after the upload, and the all-inline
|
|
39345
39384
|
* rebuild the missing-resource fallback re-sends.
|
|
39346
39385
|
*
|
|
39347
|
-
*
|
|
39348
|
-
*
|
|
39349
|
-
*
|
|
39350
|
-
*
|
|
39386
|
+
* Calls normally restart from `boundedOptions`; the post-upload pass may
|
|
39387
|
+
* supply the same options after budgeting the images that really stayed
|
|
39388
|
+
* inline. Re-fitting from that baseline is load bearing: the inline fallback
|
|
39389
|
+
* must not inherit an omission made for a different, much smaller body, and
|
|
39390
|
+
* its positional drop loop must not mistake non-contiguous budget omissions
|
|
39391
|
+
* for the oldest remaining images.
|
|
39351
39392
|
*/
|
|
39352
|
-
const buildBodyWithinLimit = (media) => {
|
|
39353
|
-
let buildOptions =
|
|
39393
|
+
const buildBodyWithinLimit = (media, baseline = boundedOptions) => {
|
|
39394
|
+
let buildOptions = baseline;
|
|
39354
39395
|
for (let attempt = 0;; attempt++) {
|
|
39355
39396
|
const built = buildRequest(buildOptions, wire, images, void 0, media);
|
|
39356
39397
|
const body = JSON.stringify(built);
|
|
@@ -39360,7 +39401,7 @@ var KimiCodeAdapter = class extends LlmAdapter {
|
|
|
39360
39401
|
options: buildOptions
|
|
39361
39402
|
};
|
|
39362
39403
|
const context = () => ({
|
|
39363
|
-
droppedImages: countOmitted(buildOptions,
|
|
39404
|
+
droppedImages: countOmitted(buildOptions, baseline, images),
|
|
39364
39405
|
sendableImagesRemaining: requestImagePayloadLengths(buildOptions, images).length,
|
|
39365
39406
|
excessBytes: bytes - bodyLimit
|
|
39366
39407
|
});
|
|
@@ -39368,7 +39409,7 @@ var KimiCodeAdapter = class extends LlmAdapter {
|
|
|
39368
39409
|
assertRequestBodyFits$1(built, carriesVideo, context(), bodyLimit);
|
|
39369
39410
|
throw new Error("unreachable: assertRequestBodyFits returns or throws");
|
|
39370
39411
|
}
|
|
39371
|
-
const drop = dropOldestImagesUntilFits(buildOptions, images, bytes - bodyLimit,
|
|
39412
|
+
const drop = dropOldestImagesUntilFits(buildOptions, images, bytes - bodyLimit, baseline);
|
|
39372
39413
|
if (drop.dropped === 0) {
|
|
39373
39414
|
assertRequestBodyFits$1(built, carriesVideo, context(), bodyLimit);
|
|
39374
39415
|
throw new Error("unreachable: assertRequestBodyFits returns or throws");
|
|
@@ -39388,6 +39429,7 @@ var KimiCodeAdapter = class extends LlmAdapter {
|
|
|
39388
39429
|
*/
|
|
39389
39430
|
let measured;
|
|
39390
39431
|
let sentBuild;
|
|
39432
|
+
let sentImageReferenceKeys;
|
|
39391
39433
|
const pool = this.accountPool;
|
|
39392
39434
|
const tried = /* @__PURE__ */ new Set();
|
|
39393
39435
|
const cacheAffinity = sideChannel ? void 0 : await this.cacheAffinityHint(pool, requestOptions);
|
|
@@ -39449,12 +39491,18 @@ var KimiCodeAdapter = class extends LlmAdapter {
|
|
|
39449
39491
|
accountScope,
|
|
39450
39492
|
signal
|
|
39451
39493
|
});
|
|
39452
|
-
|
|
39494
|
+
const imageReferenceKeys = /* @__PURE__ */ new Set();
|
|
39495
|
+
if (uploads !== void 0) for (const id of uploads.imageReferences.keys()) imageReferenceKeys.add(`attachment:${id}`);
|
|
39496
|
+
const postUploadOffload = offloadRequestImagesWithStickyBudget(boundedOptions, maxRequestImageBytes$1(), lowRequestImageBytes(), images, stickyOffload.allDroppedKeys, imageReferenceKeys);
|
|
39497
|
+
const finalBaseline = postUploadOffload.options;
|
|
39498
|
+
if (!sideChannel) markPendingImageOffload(options.sessionId, stickyOffload.newlyDroppedKeys.length + postUploadOffload.newlyDroppedKeys.length);
|
|
39499
|
+
let finalBuild = uploads === void 0 ? planned.length === 0 ? measured : buildBodyWithinLimit(baseMedia, finalBaseline) : buildBodyWithinLimit({
|
|
39453
39500
|
...baseMedia,
|
|
39454
39501
|
imageReferences: uploads.imageReferences,
|
|
39455
39502
|
videoReferences: uploads.videoReferences
|
|
39456
|
-
});
|
|
39503
|
+
}, finalBaseline);
|
|
39457
39504
|
sentBuild = finalBuild;
|
|
39505
|
+
sentImageReferenceKeys = uploads === void 0 ? void 0 : imageReferenceKeys;
|
|
39458
39506
|
let body = finalBuild.body;
|
|
39459
39507
|
const post = async (payload) => {
|
|
39460
39508
|
try {
|
|
@@ -39504,14 +39552,17 @@ var KimiCodeAdapter = class extends LlmAdapter {
|
|
|
39504
39552
|
data: item.data
|
|
39505
39553
|
});
|
|
39506
39554
|
let inlineBuild;
|
|
39555
|
+
const inlineOffload = offloadRequestImagesWithStickyBudget(boundedOptions, maxRequestImageBytes$1(), lowRequestImageBytes(), images, stickyOffload.allDroppedKeys);
|
|
39556
|
+
if (!sideChannel) markPendingImageOffload(options.sessionId, stickyOffload.newlyDroppedKeys.length + inlineOffload.newlyDroppedKeys.length);
|
|
39507
39557
|
try {
|
|
39508
|
-
inlineBuild = buildBodyWithinLimit(baseMedia);
|
|
39558
|
+
inlineBuild = buildBodyWithinLimit(baseMedia, inlineOffload.options);
|
|
39509
39559
|
} catch {
|
|
39510
39560
|
inlineBuild = void 0;
|
|
39511
39561
|
}
|
|
39512
39562
|
if (inlineBuild !== void 0) {
|
|
39513
39563
|
finalBuild = inlineBuild;
|
|
39514
39564
|
sentBuild = inlineBuild;
|
|
39565
|
+
sentImageReferenceKeys = void 0;
|
|
39515
39566
|
body = inlineBuild.body;
|
|
39516
39567
|
response = await post(body);
|
|
39517
39568
|
detail = response.ok ? "" : (await response.text().catch(() => "")).slice(0, 2e3);
|
|
@@ -39549,7 +39600,7 @@ var KimiCodeAdapter = class extends LlmAdapter {
|
|
|
39549
39600
|
});
|
|
39550
39601
|
}
|
|
39551
39602
|
if (sentBuild !== void 0 && !sideChannel) {
|
|
39552
|
-
const requestImageBytes =
|
|
39603
|
+
const requestImageBytes = requestInlineImageBytes(sentBuild.options, images, sentImageReferenceKeys);
|
|
39553
39604
|
const trimmedKeys = new Set(collectRemainingImageKeys(imageTrimmed, images));
|
|
39554
39605
|
const sentKeys = new Set(collectRemainingImageKeys(sentBuild.options, images));
|
|
39555
39606
|
const bodyFitDroppedKeys = [...trimmedKeys].filter((key) => !sentKeys.has(key));
|
package/lib/types/compat.d.ts
CHANGED
|
@@ -76,7 +76,7 @@ export declare const ROUTE_PREFIX: "/api/dsh-chatgpt-subscription";
|
|
|
76
76
|
* `test/responses-client.test.ts` asserts the two agree, so a release that
|
|
77
77
|
* forgets this constant fails the suite instead of shipping quietly.
|
|
78
78
|
*/
|
|
79
|
-
export declare const PLUGIN_VERSION: "0.66.
|
|
79
|
+
export declare const PLUGIN_VERSION: "0.66.2";
|
|
80
80
|
export declare const CODEX_CHATGPT_PROVIDER_ID: "codex-chatgpt";
|
|
81
81
|
export { MINIMAX_CODE_PROVIDER_ID, MINIMAX_CODE_ROUTE_PREFIX } from './shared/minimax-code-contracts.ts';
|
|
82
82
|
export declare const CODEX_API_BASE: "https://chatgpt.com/backend-api/codex";
|
|
@@ -141,6 +141,15 @@ export declare function offloadOldestRequestImages(options: GenerateOptions, max
|
|
|
141
141
|
* is not an image on the wire and has nothing to remember.
|
|
142
142
|
*/
|
|
143
143
|
export declare function requestImageKey(block: Record<string, unknown>, images?: ResolvedRequestImages): string | undefined;
|
|
144
|
+
/**
|
|
145
|
+
* Inline base64 bytes one request actually carries.
|
|
146
|
+
*
|
|
147
|
+
* `inlineExcludedKeys` names occurrences serialized as hosted references on
|
|
148
|
+
* this build. Their original resolution still supplies the identity, but the
|
|
149
|
+
* reference—not the base64 payload—is what goes on the wire, so those bytes
|
|
150
|
+
* must not be reported as request image usage.
|
|
151
|
+
*/
|
|
152
|
+
export declare function requestInlineImageBytes(options: GenerateOptions, images?: ResolvedRequestImages, inlineExcludedKeys?: ReadonlySet<string>): number;
|
|
144
153
|
/**
|
|
145
154
|
* The identities of the images one request still carries, each once.
|
|
146
155
|
*
|
|
@@ -192,8 +201,11 @@ export interface StickyImageOffloadResult {
|
|
|
192
201
|
* @param lowBytes - low-water mark; the trimming stops once the request is back under it.
|
|
193
202
|
* @param images - the resolution the request will be sent with.
|
|
194
203
|
* @param priorDroppedKeys - identities dropped by earlier turns.
|
|
204
|
+
* @param inlineExcludedKeys - identities whose actual wire form is a hosted
|
|
205
|
+
* reference rather than inline bytes. They stay in request order with a zero
|
|
206
|
+
* byte weight; only genuinely inline images consume this budget.
|
|
195
207
|
*/
|
|
196
|
-
export declare function offloadRequestImagesWithStickyBudget(options: GenerateOptions, maxBytes?: number, lowBytes?: number, images?: ResolvedRequestImages, priorDroppedKeys?: ReadonlySet<string>): StickyImageOffloadResult;
|
|
208
|
+
export declare function offloadRequestImagesWithStickyBudget(options: GenerateOptions, maxBytes?: number, lowBytes?: number, images?: ResolvedRequestImages, priorDroppedKeys?: ReadonlySet<string>, inlineExcludedKeys?: ReadonlySet<string>): StickyImageOffloadResult;
|
|
197
209
|
/**
|
|
198
210
|
* Whether a request still carries at least one image the mapper can send.
|
|
199
211
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-images.d.ts","sourceRoot":"","sources":["../../../../src/host/common/request-images.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAgB,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAuBtF;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,eAAe,EAAE,WAAW,GAAG,kBAAkB,CAAC,CAAA;AAE3F,sFAAsF;AACtF,MAAM,MAAM,oBAAoB,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC9E;IAAE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAA;CAAE,CAAA;AAEpC,qFAAqF;AACrF,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAA;AAE7E,eAAO,MAAM,kBAAkB,EAAE,qBAAiC,CAAA;AAElE;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,UAAY,CAAA;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