@eddyskywalker/dsh-chatgpt-subscription 0.13.0 → 0.13.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 +21 -0
- package/README.md +5 -0
- package/lib/index.js +337 -58
- package/lib/types/client/antigravity/locales.d.ts +2 -2
- package/lib/types/client/claude/locales.d.ts +2 -2
- package/lib/types/client/command-code/locales.d.ts +2 -2
- package/lib/types/client/kimi-code/locales.d.ts +2 -2
- package/lib/types/client/locales.d.ts +1 -1
- package/lib/types/client/minimax-code/locales.d.ts +2 -2
- package/lib/types/host/common/request-images.d.ts +22 -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/lib/types/host/kimi-code/mapper.d.ts +22 -0
- package/lib/types/host/kimi-code/mapper.d.ts.map +1 -1
- package/lib/types/host/responses-client.d.ts.map +1 -1
- package/lib/types/host/responses-mapper.d.ts +55 -0
- package/lib/types/host/responses-mapper.d.ts.map +1 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.13.2 - 2026-10-08
|
|
6
|
+
|
|
7
|
+
- **[Kimi Code] 读图请求按「实际发送体积」计量,超限时回收而非直接拒绝**
|
|
8
|
+
- **报错 `Kimi Code rejected the request before sending: the serialized body is N bytes, above the 2097152-byte limit` 的根因是三处计量缺陷叠加,2 MB 网关上限本身没有问题**(那是 Kimi 文档里的真实限制,见其错误参考 `total message size N exceeds limit 2097152`)。
|
|
9
|
+
- **图片按「存储原始字节」计量,但发出去的是「缩放后的请求版本」。** `resolveRequestImages` 会把长边超过 1024px 的图缩到 `REQUEST_IMAGE_VERSION_MAX_BYTES`(256 KiB,与官方 CLI 的 `read_byte_budget` 同量级)后再内联,而预算是拿 `attachment.bytes` 算的。一张 5 MB 截图因此被记成 ~6.7 MB base64,判定超预算 5 MB 被丢弃——可它真正上线时只有 ~350 KB,四张都装得下。官方 CLI 的做法是「送达模型前自动降采样并重新编码,避免供应商因图片过大而报错」,语义相同:**量的必须是送出去的那个版本**。现在先解析、再按解析后的真实 base64 长度计量。
|
|
10
|
+
- **工具结果里的图片从未被计入预算。** `collectRequestImageBytes` 只遍历顶层 block,不递归 `tool-result`,而 `toolResultBlocks` 是会发送那里的图的。重度使用 `read_image` 的会话——也就是这个报错的典型场景——恰好系统性地少算了自己最占地方的图片。计数器现在与 `collectImageRefs` 一致地递归。
|
|
11
|
+
- **超限时只会拒绝,不会回收。** `assertRequestBodyFits` 量完超限就抛 `PROVIDER_ERROR`,而此时再丢一张图很可能就装得下了。现在改为:量真实请求体 → 按需丢最旧的图 → 重新构造 → 直到塞进上限,一张不多丢。已经装得下的请求只序列化一次,字节级不变。丢无可丢时才报错,文本与工具 schema 不会被静默丢弃。
|
|
12
|
+
- **报错区分「图太多」和「文本太多」。** 旧文案一律让用户去压缩会话,于是图片占主导的用户会被引向错误的 remedy。现在报出构成(`images N bytes, tool schemas N bytes, conversation text and system prompt N bytes`),并按主导项给处方:图主导提示少带图,文本主导才提示压缩会话。
|
|
13
|
+
- 测试:新增 `test/kimi-code-body-fit.test.ts`(8 例),逐条锁住上述行为。
|
|
14
|
+
- 验证:`tsc -b --pretty false` 与 `tsc -p test/tsconfig.json` 均 0 错误;全量 `vitest run` 2784 passed / 7 skipped。
|
|
15
|
+
- **未一并处理的**:workbuddy / command-code / claude / antigravity 四条线路各有自己的本地实现,同样存在「按存储字节计量」与「工具结果图片漏算」两个缺陷,但各自预算数字不同,需逐条评估而非照搬。
|
|
16
|
+
|
|
17
|
+
- **[Codex] 请求级图片总量上限,以及请求路径失败的 cause 链([#50](https://github.com/Aa728848/dsh-chatgpt-subscription/issues/50))**
|
|
18
|
+
- **codex 此前是全插件唯一没有请求级图片总量约束的线路。** 历史里的每张图片每轮都会被重新内联,请求体随读图数量单调增长;超过传输层能接受的体积后整轮失败。报告方的现场日志:≤4 MB 稳过、4~5 MB 掉到 3/10;合成复现里 ≥4 MB 全挂(`ERR_HTTP2_STREAM_ERROR: NGHTTP2_ENHANCE_YOUR_CALM`),≤3 MB 全过。这是**概率关系**而非硬阈值——报告者自己也标明了这一点,所以修的是「无上限」,不是「阈值是多少」。
|
|
19
|
+
- 现在按**最旧优先**把超出预算的图片替换为明确的占位文本。**预算在构造好的请求体上执行**,而不是在 `options.messages` 上:图片有两种到达方式,粘贴附件是 `{ type: 'image', attachment }` 块,而工具读取的本地图片是 `` 链接、由 `mapUserText` 在构造时才取回并内联;消息块级方案看不到第二种,且共享的 `offloadOldestRequestImages` 也不递归 `tool-result`。在构造后测量是唯一能覆盖全部形态的位置。
|
|
20
|
+
- 预算是**这条线路自己的 2 MiB**,不是照搬:Kimi 的 1.5 MB 按它自己的 2 MB 请求上限定,用在这里会静默删掉本端点能接受的图片;MiniMax 的 16 MB 按 64 MB 请求体定,这里没有那个上限。`DSH_CODEX_MAX_IMAGE_BYTES` 可覆盖,非法值回落到默认而不是让守卫静默失效。
|
|
21
|
+
- **只约束图片部分**:纯文本本身就超出传输层体积的请求仍会被拒绝,图片预算不解决那个问题。
|
|
22
|
+
- `request()` 的 catch 补上 `errorChain()`:此前任何传输层失败都报成同一句 `Codex could not be reached.`,而 DSH 只持久化 `{message, code}`,于是 `NGHTTP2_ENHANCE_YOUR_CALM`、`ECONNRESET`、`UND_ERR_SOCKET` 在界面与日志里无法区分——正是这条让上面的体积问题无法自助定位。现在与 `streamFailure` 的既有做法一致。
|
|
23
|
+
- 测试:新增 `test/codex-image-budget.test.ts`(10 例)。**承重已验证**:撤掉 offload 调用后 40 张图 ~10.7 MB 直接上线并失败;还原成信息量低的报错后 cause 断言失败。
|
|
24
|
+
- 验证:`tsc -b --force` 与 `tsc -p test/tsconfig.json` 均 0 错误;全量 `vitest run` 2776 passed / 7 skipped;`npm run build` 干净。
|
|
25
|
+
|
|
5
26
|
- **[设置 / UI] 「订阅服务」改为总览卡片 + 逐线路下钻,配额进度移入账号卡片**
|
|
6
27
|
- 概览页替换原横向 TAB 条:每张卡片给出该线路的账号数、连接状态、已启用模型数与启停开关(Ollama 无开关,恒为启用),点卡片进入该线路设置,返回条回到总览。
|
|
7
28
|
- **每个账号的配额进度条画在它自己的账号卡片里。** 此前页面级进度条在轮询/粘性策略下会显示 A 账号的数字,而实际在服务的是 B——同一页面上两个数字互相矛盾。页面级区块只保留没有「按账号进度条」可放的事实。
|
package/README.md
CHANGED
|
@@ -70,6 +70,11 @@
|
|
|
70
70
|
- 回传后端在响应头给出的 `x-codex-turn-state`,让它续接该轮;
|
|
71
71
|
- 后端不再下发该头时立即停止回送——不重放过期值;
|
|
72
72
|
- **对话报文绝不发送 `max_output_tokens`**:订阅版 Responses 端点在部分账号/模型上直接以 `400 Unsupported parameter: max_output_tokens` 拒收该字段([#29](https://github.com/Aa728848/dsh-chatgpt-subscription/issues/29),实测 `gpt-6-sol` / `gpt-6.1-sol`),官方 CLI 的请求结构里也没有这个字段;输出长度由服务端默认值决定,撞上限仍以 `max-tokens` 结束原因上报(详见「模型目录」);
|
|
73
|
+
- **单次请求的图片负载有上限(2 MiB,可用 `DSH_CODEX_MAX_IMAGE_BYTES` 覆盖)**:历史里的每张图片每轮都会被重新内联,此前这条线路**没有任何总量约束**,长会话的请求体随读图数量单调增长,超过传输层能接受的体积后整轮失败,而报错只是一句没有信息量的「Codex could not be reached.」([#50](https://github.com/Aa728848/dsh-chatgpt-subscription/issues/50))。现在按**最旧优先**把超出预算的图片替换为一条明确的占位文本,请求体因此有界,且模型知道那张图已经不在了;
|
|
74
|
+
- 预算是**在构造好的请求体上**执行的,因为图片有两种到达方式:粘贴的附件是 `{ type: 'image', attachment }` 块,而工具读取的本地图片是 `` 链接、由映射器在构造时才取回并内联。只扫消息块的方案看不到第二种;
|
|
75
|
+
- 数字取自 #50 的实测(≤3 MB 全过、≥4 MB 全挂),而不是照搬别的线路:Kimi 的 1.5 MB 是按它自己的 2 MB 请求上限定的,用在这里会静默删掉本端点能接受的图片;MiniMax 的 16 MB 是按 64 MB 请求体定的,这里没有那个上限;
|
|
76
|
+
- 只约束**图片**这部分。纯文本本身就超出传输层体积的请求仍然会被拒绝,任何图片预算都救不了它;
|
|
77
|
+
- **请求路径的传输层失败会带上原因链**:此前 `request()` 把任何失败都报成同一句 `Codex could not be reached.`,而 DSH 只持久化 `{message, code}`,于是 `NGHTTP2_ENHANCE_YOUR_CALM`、`ECONNRESET`、`UND_ERR_SOCKET` 在界面和日志里长得一模一样——上面那条体积问题正是因此无法自助定位。现在与流中段断流(`streamFailure`)一致,把 cause 链拼进 message;
|
|
73
78
|
- Antigravity(Gemini / Claude)线路同样接受图片输入:DSH 以 `{ type: 'image', attachment }` 下发的粘贴图片会经附件服务读出字节并按 Gemini `inlineData` 发出,读不出的图片降级为一条可见的说明文本而不是被静默丢弃。单次请求的图片 base64 负载超过 12 MiB 时,最旧的图片按上游同款占位文案替换为文本,避免整条请求被体积上限拒绝;
|
|
74
79
|
- 原样转发 DSH 暴露的工具 schema;命令工具兼容 `pwsh` / `powershell`、`bash`、`sh` 与 `shell`,并按 PowerShell、Bash 或 POSIX sh 注入对应说明;
|
|
75
80
|
- 429/5xx 由 DSH retry policy 接管;401 只强制刷新并重试一次,支持 `AbortSignal`;
|
package/lib/index.js
CHANGED
|
@@ -5284,6 +5284,100 @@ async function* wrapStreamWithWatchdog(source, upstreamSignal, timeoutMs = DEFAU
|
|
|
5284
5284
|
}
|
|
5285
5285
|
//#endregion
|
|
5286
5286
|
//#region src/host/responses-mapper.ts
|
|
5287
|
+
/**
|
|
5288
|
+
* Base64 image payload one Codex request may carry.
|
|
5289
|
+
*
|
|
5290
|
+
* THIS ROUTE HAD NO BOUND AT ALL, which is what made a long session fail
|
|
5291
|
+
* intermittently (issue #50). Every turn re-inlines every image still in
|
|
5292
|
+
* history, so the request body grew with the number of images ever read and
|
|
5293
|
+
* nothing ever trimmed it. Past roughly 4 MB the transport itself gives up: the
|
|
5294
|
+
* report's field logs show 18/18 successes in the 3–4 MB band and 3/10 in the
|
|
5295
|
+
* 4–5 MB band, and a synthetic probe against the subscription endpoint returned
|
|
5296
|
+
* `NGHTTP2_ENHANCE_YOUR_CALM` / `NGHTTP2_INTERNAL_ERROR` on every ≥4 MB body
|
|
5297
|
+
* while ≤3 MB always passed.
|
|
5298
|
+
*
|
|
5299
|
+
* The NUMBER is this route's own, derived from those measurements rather than
|
|
5300
|
+
* borrowed. Kimi's 1.5 MB figure is sized for Kimi's 2 MB request limit and
|
|
5301
|
+
* would silently drop images this endpoint accepts; MiniMax's 16 MB is sized
|
|
5302
|
+
* for a 64 MB body ceiling this route does not have. 2 MiB of image data keeps
|
|
5303
|
+
* the whole body inside the band that never failed, even after the
|
|
5304
|
+
* conversation text, tool schemas and system prompt are added. It is a
|
|
5305
|
+
* transport property of this deployment, not a documented API limit, so
|
|
5306
|
+
* `DSH_CODEX_MAX_IMAGE_BYTES` overrides it.
|
|
5307
|
+
*
|
|
5308
|
+
* It bounds the IMAGE contribution only. A request whose text alone exceeds the
|
|
5309
|
+
* transport is still refused by the transport, and no image budget can fix that.
|
|
5310
|
+
*/
|
|
5311
|
+
const DEFAULT_MAX_REQUEST_IMAGE_BYTES$1 = 2 * 1024 * 1024;
|
|
5312
|
+
/**
|
|
5313
|
+
* Image budget this process enforces, honouring the deployment override.
|
|
5314
|
+
*
|
|
5315
|
+
* Parsed as bytes and ignored when it is not a positive finite number, so a
|
|
5316
|
+
* typo cannot silently disable the guard by producing `NaN`.
|
|
5317
|
+
*/
|
|
5318
|
+
function maxRequestImageBytes$1(env = process.env) {
|
|
5319
|
+
const raw = (env.DSH_CODEX_MAX_IMAGE_BYTES ?? "").trim();
|
|
5320
|
+
if (raw === "") return DEFAULT_MAX_REQUEST_IMAGE_BYTES$1;
|
|
5321
|
+
const parsed = Number(raw);
|
|
5322
|
+
if (!Number.isFinite(parsed) || parsed <= 0) return DEFAULT_MAX_REQUEST_IMAGE_BYTES$1;
|
|
5323
|
+
return Math.floor(parsed);
|
|
5324
|
+
}
|
|
5325
|
+
/**
|
|
5326
|
+
* Placeholder left where an over-budget image was removed. It says the picture
|
|
5327
|
+
* is gone rather than leaving a blank the model would answer about anyway.
|
|
5328
|
+
*/
|
|
5329
|
+
const OMITTED_IMAGE_TEXT$5 = "[image omitted to keep the request within its size limit; older images are omitted first. If this image is still needed, read its file again when a path is available; otherwise ask the user to attach it again.]";
|
|
5330
|
+
/**
|
|
5331
|
+
* Replace the oldest images with that placeholder once the built request would
|
|
5332
|
+
* carry more than `maxBytes` of base64 image data.
|
|
5333
|
+
*
|
|
5334
|
+
* WHY THIS RUNS ON THE BUILT INPUT rather than on `options.messages` like the
|
|
5335
|
+
* other routes. Two image forms reach this wire and only one of them is a
|
|
5336
|
+
* message block: a pasted attachment arrives as `{ type: 'image', attachment }`,
|
|
5337
|
+
* but the tool-read images in issue #50 arrive as local markdown links
|
|
5338
|
+
* (``) that `mapUserText` fetches and inlines
|
|
5339
|
+
* while building. A message-level pass cannot see the second form at all, and
|
|
5340
|
+
* the shared `offloadOldestRequestImages` additionally does not recurse into
|
|
5341
|
+
* `tool-result` content — so measuring here, after every form has become an
|
|
5342
|
+
* `input_image` item, is the one place that bounds what actually goes out.
|
|
5343
|
+
*
|
|
5344
|
+
* The oldest occurrences go first and durable history is untouched; only the
|
|
5345
|
+
* request about to be sent changes. A retry after a model fallback reuses the
|
|
5346
|
+
* bounded input instead of re-inflating it.
|
|
5347
|
+
*
|
|
5348
|
+
* @param input - the payload's `input` items, mutated in place.
|
|
5349
|
+
* @param maxBytes - base64 image budget for the whole request.
|
|
5350
|
+
* @returns how many images were replaced.
|
|
5351
|
+
*/
|
|
5352
|
+
function offloadOldestInputImages(input, maxBytes = maxRequestImageBytes$1()) {
|
|
5353
|
+
const retained = [];
|
|
5354
|
+
for (const item of input) {
|
|
5355
|
+
if (!Array.isArray(item.content)) continue;
|
|
5356
|
+
for (const [index, block] of item.content.entries()) {
|
|
5357
|
+
if (record$3(block) === null || block.type !== "input_image") continue;
|
|
5358
|
+
const url = block.image_url;
|
|
5359
|
+
if (typeof url !== "string") continue;
|
|
5360
|
+
retained.push({
|
|
5361
|
+
content: item.content,
|
|
5362
|
+
index,
|
|
5363
|
+
bytes: url.length
|
|
5364
|
+
});
|
|
5365
|
+
}
|
|
5366
|
+
}
|
|
5367
|
+
let total = retained.reduce((sum, entry) => sum + entry.bytes, 0);
|
|
5368
|
+
if (total <= maxBytes) return 0;
|
|
5369
|
+
let omitted = 0;
|
|
5370
|
+
for (const entry of retained) {
|
|
5371
|
+
if (total <= maxBytes) break;
|
|
5372
|
+
entry.content[entry.index] = {
|
|
5373
|
+
type: "input_text",
|
|
5374
|
+
text: OMITTED_IMAGE_TEXT$5
|
|
5375
|
+
};
|
|
5376
|
+
total -= entry.bytes;
|
|
5377
|
+
omitted += 1;
|
|
5378
|
+
}
|
|
5379
|
+
return omitted;
|
|
5380
|
+
}
|
|
5287
5381
|
function hiddenSandboxControlToolNames(options) {
|
|
5288
5382
|
const retryTools = recentSandboxRetryToolNames(options.messages);
|
|
5289
5383
|
return new Set(options.tools?.filter((tool) => hasSandboxControls(tool.parameters) && !retryTools.has(tool.name)).map((tool) => tool.name) ?? []);
|
|
@@ -5380,6 +5474,7 @@ async function buildResponsesPayload(options, attachments, localRawImages = {},
|
|
|
5380
5474
|
});
|
|
5381
5475
|
if (message.role === "assistant") appendMissingToolCalls(input, knownToolCalls, message, normalizeCallId);
|
|
5382
5476
|
}
|
|
5477
|
+
offloadOldestInputImages(input);
|
|
5383
5478
|
const payload = {
|
|
5384
5479
|
model: options.model,
|
|
5385
5480
|
input,
|
|
@@ -5945,7 +6040,8 @@ var ResponsesClient = class {
|
|
|
5945
6040
|
});
|
|
5946
6041
|
} catch (cause) {
|
|
5947
6042
|
if (signal?.aborted) throw signal.reason ?? new DOMException("Aborted", "AbortError");
|
|
5948
|
-
|
|
6043
|
+
const chain = errorChain(cause).trim();
|
|
6044
|
+
throw new LlmError(`Codex request failed: ${chain === "" ? "the connection failed before any response arrived" : chain.slice(0, 500)}`, "NETWORK", { cause });
|
|
5949
6045
|
}
|
|
5950
6046
|
}
|
|
5951
6047
|
};
|
|
@@ -9176,17 +9272,17 @@ function base64Length$4(bytes) {
|
|
|
9176
9272
|
return Math.ceil(bytes / 3) * 4;
|
|
9177
9273
|
}
|
|
9178
9274
|
/** Request payload one inline image block occupies, when it can be measured. */
|
|
9179
|
-
function requestImageBytes$
|
|
9275
|
+
function requestImageBytes$3(block) {
|
|
9180
9276
|
const attachment = attachmentOf$5(block);
|
|
9181
9277
|
if (attachment) return base64Length$4(attachment.bytes);
|
|
9182
9278
|
const inline = asString$17(block.data) || asString$17(block.base64);
|
|
9183
9279
|
return inline ? inline.length : void 0;
|
|
9184
9280
|
}
|
|
9185
|
-
function collectRequestImageBytes$
|
|
9281
|
+
function collectRequestImageBytes$3(content, lengths) {
|
|
9186
9282
|
if (!Array.isArray(content)) return;
|
|
9187
9283
|
for (const block of content) {
|
|
9188
9284
|
if (!isRecord$27(block) || block.type !== "image") continue;
|
|
9189
|
-
const bytes = requestImageBytes$
|
|
9285
|
+
const bytes = requestImageBytes$3(block);
|
|
9190
9286
|
if (bytes !== void 0) lengths.push(bytes);
|
|
9191
9287
|
}
|
|
9192
9288
|
}
|
|
@@ -9205,7 +9301,7 @@ function collectRequestImageBytes$4(content, lengths) {
|
|
|
9205
9301
|
*/
|
|
9206
9302
|
function offloadOldestRequestImages$4(options) {
|
|
9207
9303
|
const lengths = [];
|
|
9208
|
-
for (const message of options.messages) collectRequestImageBytes$
|
|
9304
|
+
for (const message of options.messages) collectRequestImageBytes$3(message.content, lengths);
|
|
9209
9305
|
const excess = lengths.reduce((sum, bytes) => sum + bytes, 0) - MAX_REQUEST_IMAGE_BYTES$4;
|
|
9210
9306
|
if (excess <= 0) return options;
|
|
9211
9307
|
let omitted = 0;
|
|
@@ -9221,7 +9317,7 @@ function offloadOldestRequestImages$4(options) {
|
|
|
9221
9317
|
let replaced = false;
|
|
9222
9318
|
const content = message.content.map((block) => {
|
|
9223
9319
|
if (remaining.count === 0 || !isRecord$27(block) || block.type !== "image") return block;
|
|
9224
|
-
if (requestImageBytes$
|
|
9320
|
+
if (requestImageBytes$3(block) === void 0) return block;
|
|
9225
9321
|
remaining.count -= 1;
|
|
9226
9322
|
replaced = true;
|
|
9227
9323
|
return {
|
|
@@ -13120,17 +13216,17 @@ function collectImageRefs$3(content, refs) {
|
|
|
13120
13216
|
function base64Length$3(bytes) {
|
|
13121
13217
|
return Math.ceil(bytes / 3) * 4;
|
|
13122
13218
|
}
|
|
13123
|
-
function requestImageBytes$
|
|
13219
|
+
function requestImageBytes$2(block) {
|
|
13124
13220
|
const attachment = attachmentOf$4(block);
|
|
13125
13221
|
if (attachment) return base64Length$3(attachment.bytes);
|
|
13126
13222
|
const inline = asString$15(block.data) || asString$15(block.base64);
|
|
13127
13223
|
return inline ? inline.length : void 0;
|
|
13128
13224
|
}
|
|
13129
|
-
function collectRequestImageBytes$
|
|
13225
|
+
function collectRequestImageBytes$2(content, lengths) {
|
|
13130
13226
|
if (!Array.isArray(content)) return;
|
|
13131
13227
|
for (const block of content) {
|
|
13132
13228
|
if (!isRecord$25(block) || block.type !== "image") continue;
|
|
13133
|
-
const bytes = requestImageBytes$
|
|
13229
|
+
const bytes = requestImageBytes$2(block);
|
|
13134
13230
|
if (bytes !== void 0) lengths.push(bytes);
|
|
13135
13231
|
}
|
|
13136
13232
|
}
|
|
@@ -13141,7 +13237,7 @@ function collectRequestImageBytes$3(content, lengths) {
|
|
|
13141
13237
|
*/
|
|
13142
13238
|
function offloadOldestRequestImages$3(options) {
|
|
13143
13239
|
const lengths = [];
|
|
13144
|
-
for (const message of options.messages) collectRequestImageBytes$
|
|
13240
|
+
for (const message of options.messages) collectRequestImageBytes$2(message.content, lengths);
|
|
13145
13241
|
const excess = lengths.reduce((sum, bytes) => sum + bytes, 0) - MAX_REQUEST_IMAGE_BYTES$3;
|
|
13146
13242
|
if (excess <= 0) return options;
|
|
13147
13243
|
let omitted = 0;
|
|
@@ -13157,7 +13253,7 @@ function offloadOldestRequestImages$3(options) {
|
|
|
13157
13253
|
let replaced = false;
|
|
13158
13254
|
const content = message.content.map((block) => {
|
|
13159
13255
|
if (remaining.count === 0 || !isRecord$25(block) || block.type !== "image") return block;
|
|
13160
|
-
if (requestImageBytes$
|
|
13256
|
+
if (requestImageBytes$2(block) === void 0) return block;
|
|
13161
13257
|
remaining.count -= 1;
|
|
13162
13258
|
replaced = true;
|
|
13163
13259
|
return {
|
|
@@ -20516,19 +20612,135 @@ function collectImageRefs$2(content, refs) {
|
|
|
20516
20612
|
function base64Length$2(bytes) {
|
|
20517
20613
|
return Math.ceil(bytes / 3) * 4;
|
|
20518
20614
|
}
|
|
20519
|
-
|
|
20615
|
+
/**
|
|
20616
|
+
* Base64 payload one image block contributes to the wire, or undefined when it
|
|
20617
|
+
* contributes none.
|
|
20618
|
+
*
|
|
20619
|
+
* This is the length of what is SENT, which is not the length of what is
|
|
20620
|
+
* STORED. Kimi's own client downsamples and re-encodes an oversized image before
|
|
20621
|
+
* delivery "to avoid the supplier erroring on an oversized image", and this route
|
|
20622
|
+
* does the same through `requestImageTarget`: a 5 MB screenshot reaches the
|
|
20623
|
+
* wire as a ~256 KiB request version. Measuring `attachment.bytes` therefore
|
|
20624
|
+
* over-counts every image that was scaled, and an image that fits comfortably
|
|
20625
|
+
* after scaling was reported as several megabytes over budget and dropped.
|
|
20626
|
+
*
|
|
20627
|
+
* With `images` supplied the measurement is exact. Without it the stored size is
|
|
20628
|
+
* the only estimate available, so it stays the fallback and every call site that
|
|
20629
|
+
* has no resolved map behaves exactly as before.
|
|
20630
|
+
*/
|
|
20631
|
+
function requestImagePayloadLength(block, images) {
|
|
20632
|
+
let data = asString$11(block.data) || asString$11(block.base64);
|
|
20633
|
+
const source = isRecord$19(block.source) ? block.source : void 0;
|
|
20634
|
+
if (!data && source) data = asString$11(source.data) || asString$11(source.base64);
|
|
20635
|
+
if (data?.startsWith("data:")) {
|
|
20636
|
+
const matched = data.match(/^data:([^;,]+);base64,(.*)$/s);
|
|
20637
|
+
if (matched) data = matched[2] ?? "";
|
|
20638
|
+
}
|
|
20639
|
+
if (data) return data.length;
|
|
20520
20640
|
const attachment = attachmentOf$3(block);
|
|
20521
|
-
if (attachment) return
|
|
20522
|
-
|
|
20523
|
-
|
|
20641
|
+
if (!attachment) return void 0;
|
|
20642
|
+
if (images === void 0) return base64Length$2(attachment.bytes);
|
|
20643
|
+
const resolved = images.get(attachment.attachmentId);
|
|
20644
|
+
return resolved?.kind === "inline" ? resolved.data.length : void 0;
|
|
20524
20645
|
}
|
|
20525
|
-
|
|
20646
|
+
/**
|
|
20647
|
+
* Collect every image occurrence in model request order, recursing into tool
|
|
20648
|
+
* results the way `collectImageRefs` does.
|
|
20649
|
+
*
|
|
20650
|
+
* RECURSION IS NOT OPTIONAL. A `read_image` result or a screenshot inside a tool
|
|
20651
|
+
* result carries its pixels to the wire — `toolResultBlocks` sends them — so an
|
|
20652
|
+
* earlier version that only looked at top-level blocks under-counted exactly the
|
|
20653
|
+
* images a tool-using session produces most of. The budget has to describe the
|
|
20654
|
+
* body that is actually built.
|
|
20655
|
+
*/
|
|
20656
|
+
function collectRequestImagePayloads(content, images, lengths) {
|
|
20526
20657
|
if (!Array.isArray(content)) return;
|
|
20527
20658
|
for (const block of content) {
|
|
20528
|
-
if (!isRecord$19(block)
|
|
20529
|
-
|
|
20530
|
-
|
|
20659
|
+
if (!isRecord$19(block)) continue;
|
|
20660
|
+
if (block.type === "image") {
|
|
20661
|
+
const bytes = requestImagePayloadLength(block, images);
|
|
20662
|
+
if (bytes !== void 0) lengths.push(bytes);
|
|
20663
|
+
continue;
|
|
20664
|
+
}
|
|
20665
|
+
if (block.type === "tool-result") collectRequestImagePayloads(block.content, images, lengths);
|
|
20666
|
+
}
|
|
20667
|
+
}
|
|
20668
|
+
/**
|
|
20669
|
+
* Wire-level base64 payload of each image occurrence one request carries, in the
|
|
20670
|
+
* order the request sends them, so index N is the Nth oldest image.
|
|
20671
|
+
*/
|
|
20672
|
+
function requestImagePayloadLengths(options, images) {
|
|
20673
|
+
const lengths = [];
|
|
20674
|
+
for (const message of options.messages) collectRequestImagePayloads(message.content, images, lengths);
|
|
20675
|
+
return lengths;
|
|
20676
|
+
}
|
|
20677
|
+
/** How many of the oldest occurrences must go to bring the total under `maxBytes`. */
|
|
20678
|
+
function imagesToOffloadCount(lengths, maxBytes) {
|
|
20679
|
+
const excess = lengths.reduce((sum, bytes) => sum + bytes, 0) - maxBytes;
|
|
20680
|
+
if (excess <= 0) return 0;
|
|
20681
|
+
let freed = 0;
|
|
20682
|
+
let omitted = 0;
|
|
20683
|
+
for (const bytes of lengths) {
|
|
20684
|
+
if (freed >= excess) break;
|
|
20685
|
+
freed += bytes;
|
|
20686
|
+
omitted += 1;
|
|
20531
20687
|
}
|
|
20688
|
+
return omitted;
|
|
20689
|
+
}
|
|
20690
|
+
/**
|
|
20691
|
+
* Replace the first `count` image occurrences with a visible placeholder,
|
|
20692
|
+
* recursing into tool results. Durable history is untouched; only the request
|
|
20693
|
+
* about to be sent changes.
|
|
20694
|
+
*/
|
|
20695
|
+
function replaceOldestRequestImages(options, count) {
|
|
20696
|
+
if (count <= 0) return options;
|
|
20697
|
+
const remaining = { count };
|
|
20698
|
+
const replaceIn = (content) => {
|
|
20699
|
+
if (!Array.isArray(content) || remaining.count === 0) return {
|
|
20700
|
+
content,
|
|
20701
|
+
replaced: false
|
|
20702
|
+
};
|
|
20703
|
+
let replaced = false;
|
|
20704
|
+
return {
|
|
20705
|
+
content: content.map((block) => {
|
|
20706
|
+
if (remaining.count === 0 || !isRecord$19(block)) return block;
|
|
20707
|
+
if (block.type === "image") {
|
|
20708
|
+
if (requestImagePayloadLength(block) === void 0) return block;
|
|
20709
|
+
remaining.count -= 1;
|
|
20710
|
+
replaced = true;
|
|
20711
|
+
return {
|
|
20712
|
+
type: "text",
|
|
20713
|
+
text: OMITTED_IMAGE_TEXT$2
|
|
20714
|
+
};
|
|
20715
|
+
}
|
|
20716
|
+
if (block.type === "tool-result" && Array.isArray(block.content)) {
|
|
20717
|
+
const inner = replaceIn(block.content);
|
|
20718
|
+
if (!inner.replaced) return block;
|
|
20719
|
+
replaced = true;
|
|
20720
|
+
return {
|
|
20721
|
+
...block,
|
|
20722
|
+
content: inner.content
|
|
20723
|
+
};
|
|
20724
|
+
}
|
|
20725
|
+
return block;
|
|
20726
|
+
}),
|
|
20727
|
+
replaced
|
|
20728
|
+
};
|
|
20729
|
+
};
|
|
20730
|
+
let changed = false;
|
|
20731
|
+
const messages = options.messages.map((message) => {
|
|
20732
|
+
const result = replaceIn(message.content);
|
|
20733
|
+
if (!result.replaced) return message;
|
|
20734
|
+
changed = true;
|
|
20735
|
+
return {
|
|
20736
|
+
...message,
|
|
20737
|
+
content: result.content
|
|
20738
|
+
};
|
|
20739
|
+
});
|
|
20740
|
+
return changed ? {
|
|
20741
|
+
...options,
|
|
20742
|
+
messages
|
|
20743
|
+
} : options;
|
|
20532
20744
|
}
|
|
20533
20745
|
/**
|
|
20534
20746
|
* Longest edge any image of this request may keep.
|
|
@@ -20588,41 +20800,22 @@ function requestImageTarget(ref, edge = REQUEST_IMAGE_MAX_EDGE) {
|
|
|
20588
20800
|
*
|
|
20589
20801
|
* Durable history is untouched; only the request about to be sent changes.
|
|
20590
20802
|
*/
|
|
20591
|
-
function offloadOldestRequestImages$2(options, maxBytes = MAX_REQUEST_IMAGE_BYTES$2) {
|
|
20592
|
-
|
|
20593
|
-
|
|
20594
|
-
|
|
20595
|
-
|
|
20596
|
-
|
|
20597
|
-
|
|
20598
|
-
|
|
20599
|
-
|
|
20600
|
-
|
|
20601
|
-
|
|
20602
|
-
|
|
20603
|
-
|
|
20604
|
-
|
|
20605
|
-
|
|
20606
|
-
let replaced = false;
|
|
20607
|
-
const content = message.content.map((block) => {
|
|
20608
|
-
if (remaining.count === 0 || !isRecord$19(block) || block.type !== "image") return block;
|
|
20609
|
-
if (requestImageBytes$2(block) === void 0) return block;
|
|
20610
|
-
remaining.count -= 1;
|
|
20611
|
-
replaced = true;
|
|
20612
|
-
return {
|
|
20613
|
-
type: "text",
|
|
20614
|
-
text: OMITTED_IMAGE_TEXT$2
|
|
20615
|
-
};
|
|
20616
|
-
});
|
|
20617
|
-
return replaced ? {
|
|
20618
|
-
...message,
|
|
20619
|
-
content
|
|
20620
|
-
} : message;
|
|
20803
|
+
function offloadOldestRequestImages$2(options, maxBytes = MAX_REQUEST_IMAGE_BYTES$2, images) {
|
|
20804
|
+
return replaceOldestRequestImages(options, imagesToOffloadCount(requestImagePayloadLengths(options, images), maxBytes));
|
|
20805
|
+
}
|
|
20806
|
+
/**
|
|
20807
|
+
* Whether a request still carries at least one image the mapper can send.
|
|
20808
|
+
*
|
|
20809
|
+
* A request whose images have all been replaced by placeholders can no longer
|
|
20810
|
+
* shrink, which is what separates "drop more images" from "this body is too
|
|
20811
|
+
* large for a reason no image budget can fix".
|
|
20812
|
+
*/
|
|
20813
|
+
function requestHasSendableImage(options) {
|
|
20814
|
+
return options.messages.some((message) => {
|
|
20815
|
+
const content = message.content;
|
|
20816
|
+
if (!Array.isArray(content)) return false;
|
|
20817
|
+
return content.some((block) => isRecord$19(block) && block.type === "image");
|
|
20621
20818
|
});
|
|
20622
|
-
return {
|
|
20623
|
-
...options,
|
|
20624
|
-
messages
|
|
20625
|
-
};
|
|
20626
20819
|
}
|
|
20627
20820
|
/**
|
|
20628
20821
|
* Read every durable `{ type: 'image', attachment }` block one request carries.
|
|
@@ -21821,7 +22014,48 @@ function assertRequestBodyFits$1(body, carriesVideo = false) {
|
|
|
21821
22014
|
const bytes = Buffer.byteLength(serialized, "utf8");
|
|
21822
22015
|
const limit = carriesVideo ? MAX_VIDEO_MESSAGE_BODY_BYTES : MAX_MESSAGE_BODY_BYTES;
|
|
21823
22016
|
if (bytes <= limit) return serialized;
|
|
21824
|
-
throw new LlmError$1(
|
|
22017
|
+
throw new LlmError$1(oversizedBodyMessage(bytes, limit, body), "PROVIDER_ERROR");
|
|
22018
|
+
}
|
|
22019
|
+
function walkJson(value, visit) {
|
|
22020
|
+
if (Array.isArray(value)) {
|
|
22021
|
+
for (const item of value) walkJson(item, visit);
|
|
22022
|
+
return;
|
|
22023
|
+
}
|
|
22024
|
+
if (!isRecord$17(value)) return;
|
|
22025
|
+
visit(value);
|
|
22026
|
+
for (const nested of Object.values(value)) walkJson(nested, visit);
|
|
22027
|
+
}
|
|
22028
|
+
/**
|
|
22029
|
+
* Measure one already-serialized body by composition.
|
|
22030
|
+
*
|
|
22031
|
+
* Image payload is found structurally (a base64 `data:` URL or an Anthropic
|
|
22032
|
+
* base64 source) rather than by searching for a marker substring, so a user
|
|
22033
|
+
* message that happens to contain that text cannot inflate the image share.
|
|
22034
|
+
*/
|
|
22035
|
+
function requestBodyBreakdown(body, carriesVideo = false) {
|
|
22036
|
+
const serialized = JSON.stringify(body);
|
|
22037
|
+
const totalBytes = Buffer.byteLength(serialized, "utf8");
|
|
22038
|
+
let imageBytes = 0;
|
|
22039
|
+
walkJson(body, (node) => {
|
|
22040
|
+
const url = isRecord$17(node.image_url) ? asString$9(node.image_url.url) : void 0;
|
|
22041
|
+
if (url?.startsWith("data:")) {
|
|
22042
|
+
imageBytes += Buffer.byteLength(url, "utf8");
|
|
22043
|
+
return;
|
|
22044
|
+
}
|
|
22045
|
+
const source = isRecord$17(node.source) ? node.source : void 0;
|
|
22046
|
+
if (source && asString$9(source.data) !== void 0 && asString$9(source.media_type) !== void 0) imageBytes += Buffer.byteLength(asString$9(source.data) ?? "", "utf8");
|
|
22047
|
+
});
|
|
22048
|
+
const toolSchemaBytes = Buffer.byteLength(JSON.stringify(body.tools ?? []), "utf8");
|
|
22049
|
+
return {
|
|
22050
|
+
totalBytes,
|
|
22051
|
+
imageBytes,
|
|
22052
|
+
toolSchemaBytes,
|
|
22053
|
+
otherBytes: Math.max(0, totalBytes - imageBytes - toolSchemaBytes)
|
|
22054
|
+
};
|
|
22055
|
+
}
|
|
22056
|
+
function oversizedBodyMessage(bytes, limit, body) {
|
|
22057
|
+
const parts = requestBodyBreakdown(body);
|
|
22058
|
+
return `Kimi Code rejected the request before sending: the serialized body is ${bytes} bytes, above the ${limit}-byte limit this route enforces. Composition: ${`images ${parts.imageBytes} bytes, tool schemas ${parts.toolSchemaBytes} bytes, conversation text and system prompt ${parts.otherBytes} bytes`}. ${parts.imageBytes >= parts.otherBytes ? "Older images are omitted first; drop or re-attach fewer images, or start a new session." : "The conversation text and tool schemas dominate, so no image budget can fix this: compact the conversation or start a new session."}`;
|
|
21825
22059
|
}
|
|
21826
22060
|
function createStreamState$3(wire, sessionId) {
|
|
21827
22061
|
return {
|
|
@@ -22413,6 +22647,34 @@ function assertStreamComplete$3(state) {
|
|
|
22413
22647
|
//#endregion
|
|
22414
22648
|
//#region src/host/kimi-code/adapter.ts
|
|
22415
22649
|
/**
|
|
22650
|
+
* Rebuild attempts allowed while shrinking a request into its body ceiling.
|
|
22651
|
+
*
|
|
22652
|
+
* Each attempt drops at least one image, so the loop is bounded by the number of
|
|
22653
|
+
* images the request carries; this cap only exists so a future change that fails
|
|
22654
|
+
* to make progress fails fast instead of spinning.
|
|
22655
|
+
*/
|
|
22656
|
+
const MAX_BODY_FIT_ATTEMPTS = 64;
|
|
22657
|
+
/**
|
|
22658
|
+
* Drop the fewest oldest images that free at least `excessBytes`.
|
|
22659
|
+
*
|
|
22660
|
+
* `current` is the options the over-large body was built from, and `resolved`
|
|
22661
|
+
* supplies the post-scaling payload length of each occurrence, so the arithmetic
|
|
22662
|
+
* is made of the bytes the wire actually carries rather than of stored sizes.
|
|
22663
|
+
*/
|
|
22664
|
+
function dropOldestImagesUntilFits(current, resolved, excessBytes, baseline) {
|
|
22665
|
+
const lengths = requestImagePayloadLengths(baseline, resolved);
|
|
22666
|
+
const alreadyDropped = countOmitted(current, baseline);
|
|
22667
|
+
const additional = imagesToOffloadCount(lengths.slice(alreadyDropped), excessBytes);
|
|
22668
|
+
if (additional === 0) return current;
|
|
22669
|
+
return replaceOldestRequestImages(current, additional);
|
|
22670
|
+
}
|
|
22671
|
+
/** How many image occurrences `current` has already had replaced, versus `baseline`. */
|
|
22672
|
+
function countOmitted(current, baseline) {
|
|
22673
|
+
const before = requestImagePayloadLengths(baseline).length;
|
|
22674
|
+
const after = requestImagePayloadLengths(current).length;
|
|
22675
|
+
return Math.max(0, before - after);
|
|
22676
|
+
}
|
|
22677
|
+
/**
|
|
22416
22678
|
* Transient-failure retry policy for the `kimi-code` route.
|
|
22417
22679
|
*
|
|
22418
22680
|
* Kimi Code fronts the model providers, so a call can fail with a 502/503/504
|
|
@@ -22750,8 +23012,10 @@ var KimiCodeAdapter = class extends LlmAdapter {
|
|
|
22750
23012
|
const catalog = await this.catalog().catch(() => []);
|
|
22751
23013
|
const wire = wireForCatalogEntry(options.model, catalog);
|
|
22752
23014
|
const entry = catalog.find((model) => model.id === options.model);
|
|
22753
|
-
const
|
|
22754
|
-
const
|
|
23015
|
+
const normalized = normalizeGenerateOptions(options);
|
|
23016
|
+
const images = await resolveRequestImages$2(normalized, this.options.attachments, signal);
|
|
23017
|
+
const requestOptions = offloadOldestRequestVideos(offloadOldestRequestImages$2(normalized, MAX_REQUEST_IMAGE_BYTES$2, images), MAX_REQUEST_VIDEO_BYTES$1);
|
|
23018
|
+
const videos = await resolveRequestVideos(requestOptions, this.options.videos, signal);
|
|
22755
23019
|
const settings = await this.settings();
|
|
22756
23020
|
const media = {
|
|
22757
23021
|
videos,
|
|
@@ -22763,10 +23027,25 @@ var KimiCodeAdapter = class extends LlmAdapter {
|
|
|
22763
23027
|
const requestedMax = options.maxTokens ?? maxOutputTokensFor$3(options.model, contextWindow);
|
|
22764
23028
|
const inputCap = maxInputTokensForEntry(options.model, catalog);
|
|
22765
23029
|
const promptLimit = inputCap === void 0 ? contextWindow : Math.min(contextWindow, inputCap);
|
|
22766
|
-
const
|
|
23030
|
+
const boundedOptions = {
|
|
22767
23031
|
...requestOptions,
|
|
22768
23032
|
maxTokens: clampOutputToContext$1(requestedMax, promptLimit, estimatedInputTokens(requestOptions))
|
|
22769
|
-
}
|
|
23033
|
+
};
|
|
23034
|
+
const carriesVideo = requestHasVideo(requestOptions);
|
|
23035
|
+
const bodyLimit = carriesVideo ? MAX_VIDEO_MESSAGE_BODY_BYTES : MAX_MESSAGE_BODY_BYTES;
|
|
23036
|
+
let buildOptions = boundedOptions;
|
|
23037
|
+
let body = "";
|
|
23038
|
+
for (let attempt = 0;; attempt++) {
|
|
23039
|
+
const built = buildRequest(buildOptions, wire, images, void 0, media);
|
|
23040
|
+
body = JSON.stringify(built);
|
|
23041
|
+
const bytes = Buffer.byteLength(body, "utf8");
|
|
23042
|
+
if (bytes <= bodyLimit) break;
|
|
23043
|
+
if (attempt > MAX_BODY_FIT_ATTEMPTS || !requestHasSendableImage(buildOptions)) {
|
|
23044
|
+
assertRequestBodyFits$1(built, carriesVideo);
|
|
23045
|
+
throw new Error("unreachable: assertRequestBodyFits returns or throws");
|
|
23046
|
+
}
|
|
23047
|
+
buildOptions = dropOldestImagesUntilFits(buildOptions, images, bytes - bodyLimit, requestOptions);
|
|
23048
|
+
}
|
|
22770
23049
|
const pool = this.accountPool;
|
|
22771
23050
|
const tried = /* @__PURE__ */ new Set();
|
|
22772
23051
|
let servedByAccountId;
|
|
@@ -232,8 +232,8 @@ export declare const dictionaries: {
|
|
|
232
232
|
quotaFactsScope: string;
|
|
233
233
|
composerLabel: string;
|
|
234
234
|
};
|
|
235
|
-
en: Record<"
|
|
236
|
-
'en-US': Record<"
|
|
235
|
+
en: Record<"account" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "signedOut" | "signedIn" | "plan" | "expires" | "signIn" | "signInAgain" | "signOut" | "refreshToken" | "loading" | "connection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "save" | "refreshQuota" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel" | "pageDesc" | "signingIn" | "modelsSection" | "enhanced" | "defaultReasoningEffort" | "defaultReasoningEffortHint" | "defaultEffortAuto" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saved" | "saving" | "quotaSection" | "quotaDesc" | "refreshingQuota" | "quotaEmpty" | "googleValidation" | "resetPrefix" | "resetUnavailable" | "resetNow" | "timeDayHour" | "timeHourMin" | "timeMin" | "updatedAt" | "loginFailed", string>;
|
|
236
|
+
'en-US': Record<"account" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "signedOut" | "signedIn" | "plan" | "expires" | "signIn" | "signInAgain" | "signOut" | "refreshToken" | "loading" | "connection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "save" | "refreshQuota" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel" | "pageDesc" | "signingIn" | "modelsSection" | "enhanced" | "defaultReasoningEffort" | "defaultReasoningEffortHint" | "defaultEffortAuto" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saved" | "saving" | "quotaSection" | "quotaDesc" | "refreshingQuota" | "quotaEmpty" | "googleValidation" | "resetPrefix" | "resetUnavailable" | "resetNow" | "timeDayHour" | "timeHourMin" | "timeMin" | "updatedAt" | "loginFailed", string>;
|
|
237
237
|
};
|
|
238
238
|
export type AntigravityLocaleKey = keyof typeof zh;
|
|
239
239
|
//# sourceMappingURL=locales.d.ts.map
|
|
@@ -452,8 +452,8 @@ export declare const dictionaries: {
|
|
|
452
452
|
readonly quotaFactsScope: string;
|
|
453
453
|
readonly composerLabel: string;
|
|
454
454
|
};
|
|
455
|
-
en: Record<"
|
|
456
|
-
'en-US': Record<"
|
|
455
|
+
en: Record<"account" | "quotaRefreshing" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "signedOut" | "signedIn" | "plan" | "expires" | "signIn" | "signInAgain" | "loading" | "connection" | "testConnection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowInvalid" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "save" | "refreshQuota" | "quotaSignedOut" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel" | "source" | "pageDesc" | "signingIn" | "modelsSection" | "enhanced" | "defaultReasoningEffort" | "defaultReasoningEffortHint" | "defaultEffortAuto" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saving" | "quotaSection" | "quotaDesc" | "refreshingQuota" | "quotaEmpty" | "updatedAt" | "loginFailed" | "now" | "planUnknown" | "subscriptionType" | "sourceManaged" | "sourceClaudeCode" | "adoptedBadge" | "signInSection" | "cancelSignIn" | "openAuthorizeUrl" | "authorizeUrl" | "redirectUri" | "loginModeManual" | "loginModeLoopback" | "loginFallbackReason" | "loginWaiting" | "loginExchanging" | "loginComplete" | "manualPasteSection" | "manualPasteHint" | "manualPastePlaceholder" | "manualPasteSubmit" | "manualPasteSubmitting" | "importClaudeCode" | "importing" | "stopImporting" | "importHint" | "importUnavailable" | "importSearched" | "testingConnection" | "testSuccess" | "testLatency" | "testFailed" | "testRetryable" | "testNotRetryable" | "routeOwned" | "routeConflict" | "refreshCatalog" | "refreshingCatalog" | "capImage" | "capNoImage" | "capThinkingOff" | "thinkingModeMidConvo" | "thinkingModeAdaptive" | "thinkingModeBudget" | "thinkingModeNone" | "cacheTtl" | "cacheTtlHint" | "cacheTtlSubscription" | "cacheTtl1h" | "cacheTtl5m" | "effortLow" | "effortMedium" | "effortHigh" | "effortXHigh" | "effortMax" | "modelLadders" | "modelLadderNone" | "quotaUnknown" | "quotaUnknownHint" | "usedLabel" | "remainingLabel" | "left" | "resetAt" | "resetUnknown" | "observedAt" | "quotaError" | "extraUsage" | "extraUsageEnabled" | "extraUsageDisabled" | "extraUsageLimit" | "sourceUsage" | "sourceHeaders" | "quotaStatus" | "quotaRepresentative" | "copy" | "copied", string>;
|
|
456
|
+
'en-US': Record<"account" | "quotaRefreshing" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "signedOut" | "signedIn" | "plan" | "expires" | "signIn" | "signInAgain" | "loading" | "connection" | "testConnection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowInvalid" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "save" | "refreshQuota" | "quotaSignedOut" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel" | "source" | "pageDesc" | "signingIn" | "modelsSection" | "enhanced" | "defaultReasoningEffort" | "defaultReasoningEffortHint" | "defaultEffortAuto" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saving" | "quotaSection" | "quotaDesc" | "refreshingQuota" | "quotaEmpty" | "updatedAt" | "loginFailed" | "now" | "planUnknown" | "subscriptionType" | "sourceManaged" | "sourceClaudeCode" | "adoptedBadge" | "signInSection" | "cancelSignIn" | "openAuthorizeUrl" | "authorizeUrl" | "redirectUri" | "loginModeManual" | "loginModeLoopback" | "loginFallbackReason" | "loginWaiting" | "loginExchanging" | "loginComplete" | "manualPasteSection" | "manualPasteHint" | "manualPastePlaceholder" | "manualPasteSubmit" | "manualPasteSubmitting" | "importClaudeCode" | "importing" | "stopImporting" | "importHint" | "importUnavailable" | "importSearched" | "testingConnection" | "testSuccess" | "testLatency" | "testFailed" | "testRetryable" | "testNotRetryable" | "routeOwned" | "routeConflict" | "refreshCatalog" | "refreshingCatalog" | "capImage" | "capNoImage" | "capThinkingOff" | "thinkingModeMidConvo" | "thinkingModeAdaptive" | "thinkingModeBudget" | "thinkingModeNone" | "cacheTtl" | "cacheTtlHint" | "cacheTtlSubscription" | "cacheTtl1h" | "cacheTtl5m" | "effortLow" | "effortMedium" | "effortHigh" | "effortXHigh" | "effortMax" | "modelLadders" | "modelLadderNone" | "quotaUnknown" | "quotaUnknownHint" | "usedLabel" | "remainingLabel" | "left" | "resetAt" | "resetUnknown" | "observedAt" | "quotaError" | "extraUsage" | "extraUsageEnabled" | "extraUsageDisabled" | "extraUsageLimit" | "sourceUsage" | "sourceHeaders" | "quotaStatus" | "quotaRepresentative" | "copy" | "copied", string>;
|
|
457
457
|
};
|
|
458
458
|
export type ClaudeLocaleKey = keyof typeof zh;
|
|
459
459
|
//# sourceMappingURL=locales.d.ts.map
|
|
@@ -292,8 +292,8 @@ export declare const dictionaries: {
|
|
|
292
292
|
readonly quotaFactsScope: string;
|
|
293
293
|
readonly composerLabel: string;
|
|
294
294
|
};
|
|
295
|
-
en: Record<"
|
|
296
|
-
'en-US': Record<"
|
|
295
|
+
en: Record<"account" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "signedOut" | "signedIn" | "plan" | "expires" | "signIn" | "signInAgain" | "signOut" | "loading" | "connection" | "testConnection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "save" | "refreshQuota" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel" | "pageDesc" | "signingIn" | "modelsSection" | "enhanced" | "defaultReasoningEffort" | "defaultReasoningEffortHint" | "defaultEffortAuto" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saved" | "saving" | "quotaSection" | "quotaDesc" | "refreshingQuota" | "quotaEmpty" | "updatedAt" | "loginFailed" | "planUnknown" | "cancelSignIn" | "testingConnection" | "routeOwned" | "routeConflict" | "refreshCatalog" | "refreshingCatalog" | "keyName" | "organization" | "subscription" | "renews" | "authenticatedAt" | "openSignInPage" | "apiKeySection" | "apiKeyHint" | "apiKeyPlaceholder" | "apiKeySave" | "apiKeySaving" | "apiKeySaved" | "catalogStale" | "catalogFresh" | "zdrEnabled" | "wireAnthropic" | "wireOpenai" | "wireResponses" | "quotaCredits" | "quotaUnlimited", string>;
|
|
296
|
+
'en-US': Record<"account" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "signedOut" | "signedIn" | "plan" | "expires" | "signIn" | "signInAgain" | "signOut" | "loading" | "connection" | "testConnection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "save" | "refreshQuota" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel" | "pageDesc" | "signingIn" | "modelsSection" | "enhanced" | "defaultReasoningEffort" | "defaultReasoningEffortHint" | "defaultEffortAuto" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saved" | "saving" | "quotaSection" | "quotaDesc" | "refreshingQuota" | "quotaEmpty" | "updatedAt" | "loginFailed" | "planUnknown" | "cancelSignIn" | "testingConnection" | "routeOwned" | "routeConflict" | "refreshCatalog" | "refreshingCatalog" | "keyName" | "organization" | "subscription" | "renews" | "authenticatedAt" | "openSignInPage" | "apiKeySection" | "apiKeyHint" | "apiKeyPlaceholder" | "apiKeySave" | "apiKeySaving" | "apiKeySaved" | "catalogStale" | "catalogFresh" | "zdrEnabled" | "wireAnthropic" | "wireOpenai" | "wireResponses" | "quotaCredits" | "quotaUnlimited", string>;
|
|
297
297
|
};
|
|
298
298
|
export type CommandCodeLocaleKey = keyof typeof zh;
|
|
299
299
|
//# sourceMappingURL=locales.d.ts.map
|
|
@@ -454,8 +454,8 @@ export declare const dictionaries: {
|
|
|
454
454
|
readonly quotaFactsScope: string;
|
|
455
455
|
readonly composerLabel: string;
|
|
456
456
|
};
|
|
457
|
-
en: Record<"
|
|
458
|
-
'en-US': Record<"
|
|
457
|
+
en: Record<"account" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "signedOut" | "signedIn" | "plan" | "expires" | "signIn" | "signInAgain" | "signOut" | "loading" | "connection" | "testConnection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "save" | "refreshQuota" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel" | "pageDesc" | "signingIn" | "modelsSection" | "enhanced" | "defaultReasoningEffort" | "defaultReasoningEffortHint" | "defaultEffortAuto" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saved" | "saving" | "quotaSection" | "quotaDesc" | "refreshingQuota" | "quotaEmpty" | "updatedAt" | "loginFailed" | "planUnknown" | "cancelSignIn" | "testingConnection" | "testSuccess" | "testFailed" | "routeOwned" | "routeConflict" | "refreshCatalog" | "refreshingCatalog" | "cacheTtl" | "cacheTtlHint" | "cacheTtl1h" | "cacheTtl5m" | "effortLow" | "effortHigh" | "effortMax" | "resetAt" | "copied" | "authenticatedAt" | "openSignInPage" | "wireAnthropic" | "wireOpenai" | "nickname" | "region" | "regionMainland" | "regionGlobal" | "refreshRejected" | "deviceCodeSection" | "deviceCodeHint" | "copyCode" | "userCode" | "codeExpires" | "waitingAuthorization" | "requestingCode" | "oauthHost" | "codingEndpoint" | "capVideo" | "capDynamicTools" | "capImageOnly" | "capNone" | "capVideoFootnote" | "capabilitiesTitle" | "capColMedia" | "capColTools" | "capColNotes" | "capPlan" | "capInputCap" | "capNoTools" | "speedRegular" | "speedHighspeed" | "quotaCost" | "minimumPlan" | "cacheTtlDefault" | "effortNone" | "contextWindowPlan" | "cacheSection" | "cacheDesc" | "cacheEmpty" | "cacheHitRatio" | "cacheCached" | "cacheFresh" | "cacheOutput" | "cacheRequests" | "cacheHint" | "cacheExpired" | "cacheDrift" | "cacheDriftFirst" | "cacheDriftStable" | "cacheDriftSystemPrompt" | "cacheDriftTools" | "cacheDriftCacheKey" | "cacheDriftColdKey" | "preserveThinking" | "preserveOn" | "preserveOff" | "outputCap" | "quotaPlan" | "quotaWallet" | "quotaWalletLimit" | "quotaWalletUsed" | "requests", string>;
|
|
458
|
+
'en-US': Record<"account" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "signedOut" | "signedIn" | "plan" | "expires" | "signIn" | "signInAgain" | "signOut" | "loading" | "connection" | "testConnection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "save" | "refreshQuota" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel" | "pageDesc" | "signingIn" | "modelsSection" | "enhanced" | "defaultReasoningEffort" | "defaultReasoningEffortHint" | "defaultEffortAuto" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saved" | "saving" | "quotaSection" | "quotaDesc" | "refreshingQuota" | "quotaEmpty" | "updatedAt" | "loginFailed" | "planUnknown" | "cancelSignIn" | "testingConnection" | "testSuccess" | "testFailed" | "routeOwned" | "routeConflict" | "refreshCatalog" | "refreshingCatalog" | "cacheTtl" | "cacheTtlHint" | "cacheTtl1h" | "cacheTtl5m" | "effortLow" | "effortHigh" | "effortMax" | "resetAt" | "copied" | "authenticatedAt" | "openSignInPage" | "wireAnthropic" | "wireOpenai" | "nickname" | "region" | "regionMainland" | "regionGlobal" | "refreshRejected" | "deviceCodeSection" | "deviceCodeHint" | "copyCode" | "userCode" | "codeExpires" | "waitingAuthorization" | "requestingCode" | "oauthHost" | "codingEndpoint" | "capVideo" | "capDynamicTools" | "capImageOnly" | "capNone" | "capVideoFootnote" | "capabilitiesTitle" | "capColMedia" | "capColTools" | "capColNotes" | "capPlan" | "capInputCap" | "capNoTools" | "speedRegular" | "speedHighspeed" | "quotaCost" | "minimumPlan" | "cacheTtlDefault" | "effortNone" | "contextWindowPlan" | "cacheSection" | "cacheDesc" | "cacheEmpty" | "cacheHitRatio" | "cacheCached" | "cacheFresh" | "cacheOutput" | "cacheRequests" | "cacheHint" | "cacheExpired" | "cacheDrift" | "cacheDriftFirst" | "cacheDriftStable" | "cacheDriftSystemPrompt" | "cacheDriftTools" | "cacheDriftCacheKey" | "cacheDriftColdKey" | "preserveThinking" | "preserveOn" | "preserveOff" | "outputCap" | "quotaPlan" | "quotaWallet" | "quotaWalletLimit" | "quotaWalletUsed" | "requests", string>;
|
|
459
459
|
};
|
|
460
460
|
export type KimiCodeLocaleKey = keyof typeof zh;
|
|
461
461
|
//# sourceMappingURL=locales.d.ts.map
|
|
@@ -356,6 +356,6 @@ export declare const dictionaries: {
|
|
|
356
356
|
readonly quotaFactsScope: string;
|
|
357
357
|
readonly composerLabel: string;
|
|
358
358
|
};
|
|
359
|
-
en: Record<"
|
|
359
|
+
en: Record<"stale" | "quota" | "account" | "rotationStrategy" | "pending" | "accountId" | "relogin" | "used" | "tokens" | "title" | "hubTitle" | "intro" | "signedOut" | "signedIn" | "plan" | "expires" | "signIn" | "signInAgain" | "cancel" | "signOut" | "refreshToken" | "popupBlocked" | "continueLogin" | "loading" | "connection" | "testConnection" | "testing" | "latency" | "selectAll" | "unselectAll" | "models" | "modelsHint" | "proxySettings" | "proxyMode" | "proxyModeHint" | "proxyModeAuto" | "proxyModeCustom" | "proxyModeDirect" | "customProxyUrl" | "customProxyUrlHint" | "customProxyUrlPlaceholder" | "saveProxyUrl" | "proxyDetected" | "proxyDetectedEffective" | "proxyNoneDetected" | "proxyDirectHint" | "enhancements" | "fastMode" | "fastModeHint" | "outputVerbosity" | "outputVerbosityHint" | "verbosityLow" | "verbosityMedium" | "verbosityHigh" | "reasoningSummary" | "reasoningSummaryHint" | "summaryAuto" | "summaryConcise" | "summaryDetailed" | "summaryNone" | "searchProvider" | "searchProviderHint" | "searchProviderDsh" | "searchProviderCodex" | "fetchStatus" | "fetchStatusHint" | "fetchConfiguredProvider" | "fetchProviderDshDefault" | "switcherState" | "switcherStateIdle" | "switcherStateApplying" | "switcherStateApplied" | "switcherStateMissing" | "switcherStateFailed" | "fetchMode" | "fetchModeAuto" | "fetchModePlugin" | "fetchModeDsh" | "fetchMaxBodyChars" | "fetchMaxResponseBytes" | "characters" | "bytes" | "fetchLimitsInactive" | "fetchConfigSource" | "providerDefault" | "contextWindows" | "contextWindowsHint" | "contextWindow" | "contextWindowInvalid" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "contextWindowsNoneEnabled" | "saveContextWindow" | "save" | "quickQuota" | "quickQuotaHint" | "quotaIntro" | "refreshQuota" | "refreshing" | "noQuota" | "quotaSignedOut" | "updated" | "primary" | "secondary" | "limitWindow" | "remaining" | "available" | "unavailable" | "unlimited" | "credits" | "monthlySpend" | "resetCredits" | "resetCreditExpires" | "useResetCredit" | "usingResetCredit" | "useResetCreditConfirm" | "resetCreditUsed" | "spendControlReached" | "limit" | "exhausted" | "resets" | "quickQuotaLabel" | "quickQuotaLoading" | "imageToolRunning" | "imageToolDone" | "imageToolFailed" | "image" | "openImage" | "openNamedImage" | "imageLoading" | "imageLoadFailed" | "imagePreviewClose" | "imagePreviewOpenOriginal" | "retry" | "unknown" | "hubBack" | "hubOverviewHint" | "hubAccountCount" | "hubNoAccounts" | "hubStateEnabled" | "hubStateDisabled" | "hubModelsEnabled" | "hubModelsEnabledOfTotal" | "hubStatusFailed" | "hubSwitchOn" | "hubSwitchOff" | "hubCardLabel" | "modelChecklistCount" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel", string>;
|
|
360
360
|
};
|
|
361
361
|
//# sourceMappingURL=locales.d.ts.map
|
|
@@ -349,8 +349,8 @@ export declare const dictionaries: {
|
|
|
349
349
|
readonly quotaUsed: string;
|
|
350
350
|
readonly quotaFactsScope: string;
|
|
351
351
|
};
|
|
352
|
-
en: Record<"
|
|
353
|
-
'en-US': Record<"
|
|
352
|
+
en: Record<"account" | "quotaRefreshing" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "signedOut" | "signedIn" | "expires" | "signIn" | "signOut" | "loading" | "connection" | "testConnection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowReset" | "contextWindowResetAll" | "save" | "unknown" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel" | "pageDesc" | "signingIn" | "modelsSection" | "enhanced" | "defaultReasoningEffort" | "defaultReasoningEffortHint" | "defaultEffortAuto" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saving" | "quotaSection" | "loginFailed" | "cancelSignIn" | "testingConnection" | "testSuccess" | "testFailed" | "routeOwned" | "routeConflict" | "capImage" | "copied" | "openSignInPage" | "region" | "regionGlobal" | "deviceCodeSection" | "deviceCodeHint" | "copyCode" | "userCode" | "codeExpires" | "waitingAuthorization" | "accountLabel" | "regionCn" | "expiresAt" | "expiresRemaining" | "expiresExpired" | "expiresHint" | "codeMinutes" | "loginExpired" | "loginDenied" | "logoutOwnedByApp" | "testSuccessModel" | "modelsUnavailable" | "dailyCheckin" | "checkinHint" | "checkinAuto" | "checkinToday" | "checkinSkipped" | "checkinFailed" | "checkinStreak" | "checkinClaimed" | "checkinLastRun" | "checkinNever" | "checkinNow" | "checkinRunning" | "quotaUnavailable" | "quotaNeedsApiKey" | "quotaUnreachable" | "quotaTokenExpired" | "quotaStale" | "quotaUsedShare" | "quotaRefresh" | "invalidCapacity" | "thinkingAlwaysOn" | "thinkingToggle" | "thinkingForced" | "capText", string>;
|
|
353
|
+
'en-US': Record<"account" | "quotaRefreshing" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "signedOut" | "signedIn" | "expires" | "signIn" | "signOut" | "loading" | "connection" | "testConnection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowReset" | "contextWindowResetAll" | "save" | "unknown" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel" | "pageDesc" | "signingIn" | "modelsSection" | "enhanced" | "defaultReasoningEffort" | "defaultReasoningEffortHint" | "defaultEffortAuto" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saving" | "quotaSection" | "loginFailed" | "cancelSignIn" | "testingConnection" | "testSuccess" | "testFailed" | "routeOwned" | "routeConflict" | "capImage" | "copied" | "openSignInPage" | "region" | "regionGlobal" | "deviceCodeSection" | "deviceCodeHint" | "copyCode" | "userCode" | "codeExpires" | "waitingAuthorization" | "accountLabel" | "regionCn" | "expiresAt" | "expiresRemaining" | "expiresExpired" | "expiresHint" | "codeMinutes" | "loginExpired" | "loginDenied" | "logoutOwnedByApp" | "testSuccessModel" | "modelsUnavailable" | "dailyCheckin" | "checkinHint" | "checkinAuto" | "checkinToday" | "checkinSkipped" | "checkinFailed" | "checkinStreak" | "checkinClaimed" | "checkinLastRun" | "checkinNever" | "checkinNow" | "checkinRunning" | "quotaUnavailable" | "quotaNeedsApiKey" | "quotaUnreachable" | "quotaTokenExpired" | "quotaStale" | "quotaUsedShare" | "quotaRefresh" | "invalidCapacity" | "thinkingAlwaysOn" | "thinkingToggle" | "thinkingForced" | "capText", string>;
|
|
354
354
|
};
|
|
355
355
|
export type MinimaxCodeLocaleKey = keyof typeof zh;
|
|
356
356
|
//# sourceMappingURL=locales.d.ts.map
|
|
@@ -64,6 +64,19 @@ export declare const MAX_REQUEST_VIDEO_BYTES: number;
|
|
|
64
64
|
/** Media types both upstream wires accept as inline base64. */
|
|
65
65
|
export declare const SUPPORTED_IMAGE_MEDIA_TYPES: Set<string>;
|
|
66
66
|
export declare function attachmentLabel(block: Record<string, unknown>): string | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Wire-level base64 payload of each image occurrence one request carries, in the
|
|
69
|
+
* order the request sends them, so index N is the Nth oldest image.
|
|
70
|
+
*/
|
|
71
|
+
export declare function requestImagePayloadLengths(options: GenerateOptions, images?: ResolvedRequestImages): number[];
|
|
72
|
+
/** How many of the oldest occurrences must go to bring the total under `maxBytes`. */
|
|
73
|
+
export declare function imagesToOffloadCount(lengths: readonly number[], maxBytes: number): number;
|
|
74
|
+
/**
|
|
75
|
+
* Replace the first `count` image occurrences with a visible placeholder,
|
|
76
|
+
* recursing into tool results. Durable history is untouched; only the request
|
|
77
|
+
* about to be sent changes.
|
|
78
|
+
*/
|
|
79
|
+
export declare function replaceOldestRequestImages(options: GenerateOptions, count: number): GenerateOptions;
|
|
67
80
|
/**
|
|
68
81
|
* Longest edge any image of this request may keep.
|
|
69
82
|
*
|
|
@@ -101,7 +114,15 @@ export declare function requestImageTarget(ref: ImageAttachmentRef, edge?: numbe
|
|
|
101
114
|
*
|
|
102
115
|
* Durable history is untouched; only the request about to be sent changes.
|
|
103
116
|
*/
|
|
104
|
-
export declare function offloadOldestRequestImages(options: GenerateOptions, maxBytes?: number): GenerateOptions;
|
|
117
|
+
export declare function offloadOldestRequestImages(options: GenerateOptions, maxBytes?: number, images?: ResolvedRequestImages): GenerateOptions;
|
|
118
|
+
/**
|
|
119
|
+
* Whether a request still carries at least one image the mapper can send.
|
|
120
|
+
*
|
|
121
|
+
* A request whose images have all been replaced by placeholders can no longer
|
|
122
|
+
* shrink, which is what separates "drop more images" from "this body is too
|
|
123
|
+
* large for a reason no image budget can fix".
|
|
124
|
+
*/
|
|
125
|
+
export declare function requestHasSendableImage(options: GenerateOptions): boolean;
|
|
105
126
|
/**
|
|
106
127
|
* Read every durable `{ type: 'image', attachment }` block one request carries.
|
|
107
128
|
* An unreadable image resolves to `unavailable` rather than disappearing, so
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-images.d.ts","sourceRoot":"","sources":["../../../../src/host/common/request-images.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,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,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AAC,EAAE,WAAW,GACnB,OAAO,CAAC,qBAAqB,CAAC,CAgChC;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAI3E;AAED,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;CACb;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,qBAAqB,GAAG,WAAW,GAAG,SAAS,CAuBzH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/adapter.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,UAAU,EAEV,iBAAiB,EAEjB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAGL,WAAW,EAOX,mBAAmB,EACpB,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EAEtB,KAAK,oBAAoB,EAEzB,KAAK,uBAAuB,EAC7B,MAAM,kBAAkB,CAAA;AAGzB,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAUnB,MAAM,aAAa,CAAA;AACpB,OAAO,
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/adapter.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,UAAU,EAEV,iBAAiB,EAEjB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAA;A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C,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;YAgBpD,aAAa;IAgS5B;;;;;;;;;;;;;;;OAeG;YACW,mBAAmB;IAqDjC;;;;;;;;OAQG;YACW,mBAAmB;CASlC;AAQD,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -264,6 +264,28 @@ export declare function buildRequest(options: GenerateOptions, wire: KimiCodeWir
|
|
|
264
264
|
* serialize a body of up to tens of megabytes a second time.
|
|
265
265
|
*/
|
|
266
266
|
export declare function assertRequestBodyFits(body: Record<string, unknown>, carriesVideo?: boolean): string;
|
|
267
|
+
/**
|
|
268
|
+
* How a request body splits into the parts that share the ceiling.
|
|
269
|
+
*
|
|
270
|
+
* The 2 MB limit covers images, conversation text, tool schemas and the system
|
|
271
|
+
* prompt together, but only the first is compressible by dropping something. A
|
|
272
|
+
* message that names which part dominates is the difference between a user who
|
|
273
|
+
* compacts the conversation and a user who deletes images and fails again.
|
|
274
|
+
*/
|
|
275
|
+
export interface RequestBodyBreakdown {
|
|
276
|
+
readonly totalBytes: number;
|
|
277
|
+
readonly imageBytes: number;
|
|
278
|
+
readonly toolSchemaBytes: number;
|
|
279
|
+
readonly otherBytes: number;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Measure one already-serialized body by composition.
|
|
283
|
+
*
|
|
284
|
+
* Image payload is found structurally (a base64 `data:` URL or an Anthropic
|
|
285
|
+
* base64 source) rather than by searching for a marker substring, so a user
|
|
286
|
+
* message that happens to contain that text cannot inflate the image share.
|
|
287
|
+
*/
|
|
288
|
+
export declare function requestBodyBreakdown(body: Record<string, unknown>, carriesVideo?: boolean): RequestBodyBreakdown;
|
|
267
289
|
/** One tool call accumulating across `chat/completions` deltas. */
|
|
268
290
|
interface PendingToolCall {
|
|
269
291
|
blockIndex: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapper.d.ts","sourceRoot":"","sources":["../../../../src/host/kimi-code/mapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAGH,OAAO,EAGL,KAAK,oBAAoB,EAEzB,KAAK,eAAe,EACpB,KAAK,OAAO,EACZ,KAAK,WAAW,EAEjB,MAAM,yBAAyB,CAAA;AAKhC,OAAO,EAAE,uBAAuB,EAAmB,MAAM,0BAA0B,CAAA;AACnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AAEnE,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,CAAA;AACxD,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,4BAA4B,EAC5B,kBAAkB,EAClB,sBAAsB,EAItB,0BAA0B,EAC1B,kBAAkB,EAClB,oBAAoB,EAEpB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC3B,MAAM,6BAA6B,CAAA;AAGpC,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,4BAA4B,EAC5B,kBAAkB,EAClB,sBAAsB,EACtB,0BAA0B,EAC1B,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,GAC3B,CAAA;AACD,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,YAAY,CAAA;AAIlE,OAAO,EACL,0BAA0B,IAAI,yBAAyB,EACvD,eAAe,EACf,oBAAoB,EAEpB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC3B,MAAM,4BAA4B,CAAA;AAInC,OAAO,EACL,yBAAyB,IAAI,0BAA0B,EACvD,eAAe,EACf,oBAAoB,EACpB,KAAK,qBAAqB,E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AC,CAyQ5B"}
|
|
@@ -15,6 +15,61 @@ export interface LocalRawImageOptions {
|
|
|
15
15
|
baseUrl?: string;
|
|
16
16
|
fetchFn?: FetchLike;
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Base64 image payload one Codex request may carry.
|
|
20
|
+
*
|
|
21
|
+
* THIS ROUTE HAD NO BOUND AT ALL, which is what made a long session fail
|
|
22
|
+
* intermittently (issue #50). Every turn re-inlines every image still in
|
|
23
|
+
* history, so the request body grew with the number of images ever read and
|
|
24
|
+
* nothing ever trimmed it. Past roughly 4 MB the transport itself gives up: the
|
|
25
|
+
* report's field logs show 18/18 successes in the 3–4 MB band and 3/10 in the
|
|
26
|
+
* 4–5 MB band, and a synthetic probe against the subscription endpoint returned
|
|
27
|
+
* `NGHTTP2_ENHANCE_YOUR_CALM` / `NGHTTP2_INTERNAL_ERROR` on every ≥4 MB body
|
|
28
|
+
* while ≤3 MB always passed.
|
|
29
|
+
*
|
|
30
|
+
* The NUMBER is this route's own, derived from those measurements rather than
|
|
31
|
+
* borrowed. Kimi's 1.5 MB figure is sized for Kimi's 2 MB request limit and
|
|
32
|
+
* would silently drop images this endpoint accepts; MiniMax's 16 MB is sized
|
|
33
|
+
* for a 64 MB body ceiling this route does not have. 2 MiB of image data keeps
|
|
34
|
+
* the whole body inside the band that never failed, even after the
|
|
35
|
+
* conversation text, tool schemas and system prompt are added. It is a
|
|
36
|
+
* transport property of this deployment, not a documented API limit, so
|
|
37
|
+
* `DSH_CODEX_MAX_IMAGE_BYTES` overrides it.
|
|
38
|
+
*
|
|
39
|
+
* It bounds the IMAGE contribution only. A request whose text alone exceeds the
|
|
40
|
+
* transport is still refused by the transport, and no image budget can fix that.
|
|
41
|
+
*/
|
|
42
|
+
export declare const DEFAULT_MAX_REQUEST_IMAGE_BYTES: number;
|
|
43
|
+
/**
|
|
44
|
+
* Image budget this process enforces, honouring the deployment override.
|
|
45
|
+
*
|
|
46
|
+
* Parsed as bytes and ignored when it is not a positive finite number, so a
|
|
47
|
+
* typo cannot silently disable the guard by producing `NaN`.
|
|
48
|
+
*/
|
|
49
|
+
export declare function maxRequestImageBytes(env?: NodeJS.ProcessEnv): number;
|
|
50
|
+
/**
|
|
51
|
+
* Replace the oldest images with that placeholder once the built request would
|
|
52
|
+
* carry more than `maxBytes` of base64 image data.
|
|
53
|
+
*
|
|
54
|
+
* WHY THIS RUNS ON THE BUILT INPUT rather than on `options.messages` like the
|
|
55
|
+
* other routes. Two image forms reach this wire and only one of them is a
|
|
56
|
+
* message block: a pasted attachment arrives as `{ type: 'image', attachment }`,
|
|
57
|
+
* but the tool-read images in issue #50 arrive as local markdown links
|
|
58
|
+
* (``) that `mapUserText` fetches and inlines
|
|
59
|
+
* while building. A message-level pass cannot see the second form at all, and
|
|
60
|
+
* the shared `offloadOldestRequestImages` additionally does not recurse into
|
|
61
|
+
* `tool-result` content — so measuring here, after every form has become an
|
|
62
|
+
* `input_image` item, is the one place that bounds what actually goes out.
|
|
63
|
+
*
|
|
64
|
+
* The oldest occurrences go first and durable history is untouched; only the
|
|
65
|
+
* request about to be sent changes. A retry after a model fallback reuses the
|
|
66
|
+
* bounded input instead of re-inflating it.
|
|
67
|
+
*
|
|
68
|
+
* @param input - the payload's `input` items, mutated in place.
|
|
69
|
+
* @param maxBytes - base64 image budget for the whole request.
|
|
70
|
+
* @returns how many images were replaced.
|
|
71
|
+
*/
|
|
72
|
+
export declare function offloadOldestInputImages(input: Array<Record<string, unknown>>, maxBytes?: number): number;
|
|
18
73
|
export declare function hiddenSandboxControlToolNames(options: GenerateOptions): Set<string>;
|
|
19
74
|
export declare function buildResponsesPayload(options: GenerateOptions, attachments: Pick<AttachmentStore, 'readImage'> & Partial<Pick<AttachmentStore, 'imageLimits'>>, localRawImages?: LocalRawImageOptions, outputVerbosity?: CodexOutputVerbosity | null, fastMode?: boolean, reasoningSummary?: CodexReasoningSummary | null, promptCacheKey?: string): Promise<ResponsesPayload>;
|
|
20
75
|
//# sourceMappingURL=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,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACrC,QAAQ,GAAE,MAA+B,GACxC,MAAM,CAsBR;AAED,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,eAAe,GAAG,GAAG,CAAC,MAAM,CAAC,CAKnF;AAsCD,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,IAAI,CAAC,eAAe,EAAE,WAAW,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC,EAC/F,cAAc,GAAE,oBAAyB,EACzC,eAAe,GAAE,oBAAoB,GAAG,IAAW,EACnD,QAAQ,GAAE,OAAe,EACzB,gBAAgB,GAAE,qBAAqB,GAAG,IAAW,EACrD,cAAc,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,gBAAgB,CAAC,CA+I3B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eddyskywalker/dsh-chatgpt-subscription",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.2",
|
|
4
4
|
"description": "DSH provider plugin for Codex access through a ChatGPT subscription.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "eddyskywalker",
|
|
@@ -126,6 +126,7 @@
|
|
|
126
126
|
"scripts": {
|
|
127
127
|
"build": "tsc -b && tsdown",
|
|
128
128
|
"prepack": "npm run build",
|
|
129
|
+
"release": "node .dsh/skills/release-plugin/scripts/release.mjs",
|
|
129
130
|
"test": "vitest run",
|
|
130
131
|
"typecheck": "tsc -b --pretty false && tsc -p test/tsconfig.json --pretty false"
|
|
131
132
|
},
|