clixad 0.0.1-beta.35 → 0.0.1-beta.36
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.
|
@@ -591,6 +591,16 @@ async function refusal402(res, model) {
|
|
|
591
591
|
}
|
|
592
592
|
return paywallError(body);
|
|
593
593
|
}
|
|
594
|
+
async function refusal400(res, what) {
|
|
595
|
+
const text = await res.text().catch(() => "");
|
|
596
|
+
try {
|
|
597
|
+
const body = JSON.parse(text);
|
|
598
|
+
if (body.error === "prompt_too_long" && typeof body.message === "string") return new Error(body.message);
|
|
599
|
+
} catch {
|
|
600
|
+
}
|
|
601
|
+
const detail = safeDetail(text);
|
|
602
|
+
return new Error(detail ? `${what} failed: 400 \u2014 ${detail}` : `${what} failed: 400`);
|
|
603
|
+
}
|
|
594
604
|
async function refusal429(res) {
|
|
595
605
|
const text = await res.text().catch(() => "");
|
|
596
606
|
try {
|
|
@@ -1373,6 +1383,7 @@ var GatewayClient = class {
|
|
|
1373
1383
|
);
|
|
1374
1384
|
if (res.status === 401) throw await authFailure(res, "chat");
|
|
1375
1385
|
if (res.status === 402) throw await refusal402(res, model);
|
|
1386
|
+
if (res.status === 400) throw await refusal400(res, "chat");
|
|
1376
1387
|
if (res.status === 429) throw await refusal429(res);
|
|
1377
1388
|
if (res.status === 503) throw await refusal503(res, "chat");
|
|
1378
1389
|
if (!res.ok) throw new Error(await httpFailure(res, "chat"));
|
|
@@ -5838,14 +5849,14 @@ import { dirname as dirname3, join as join6 } from "node:path";
|
|
|
5838
5849
|
var CONTEXT_TOKENS = {
|
|
5839
5850
|
"gpt-5-nano": 4e5,
|
|
5840
5851
|
"gemini-2.5-flash-lite": 1048576,
|
|
5841
|
-
"claude-haiku-5.5":
|
|
5852
|
+
"claude-haiku-5.5": 24e3,
|
|
5842
5853
|
"deepseek-v4-flash": 1048576,
|
|
5843
5854
|
"gemini-3.5-flash-lite": 1048576,
|
|
5844
5855
|
"kimi-k2.5": 262144,
|
|
5845
5856
|
"gemini-3.8-flash": 1048576,
|
|
5846
5857
|
"kimi-k2.7-code": 262144,
|
|
5847
5858
|
"claude-sonnet-5.5": 1e6,
|
|
5848
|
-
"gpt-6-sol":
|
|
5859
|
+
"gpt-6-sol": 78e3,
|
|
5849
5860
|
"kimi-k3": 1048576,
|
|
5850
5861
|
"claude-opus-5.5": 1e6,
|
|
5851
5862
|
"claude-fable-5.1": 1e6,
|
|
@@ -5854,16 +5865,16 @@ var CONTEXT_TOKENS = {
|
|
|
5854
5865
|
// against the window of the model that actually answers.
|
|
5855
5866
|
"gemini-3.1-flash-lite": 1048576,
|
|
5856
5867
|
// Served by Claude Haiku 5.5 since 2026-10-12, when Kimi K2.5 left the free set.
|
|
5857
|
-
"kimi-k2":
|
|
5868
|
+
"kimi-k2": 24e3,
|
|
5858
5869
|
"gemini-3.6-flash": 1048576,
|
|
5859
|
-
"gpt-5.2":
|
|
5870
|
+
"gpt-5.2": 78e3,
|
|
5860
5871
|
"claude-opus-5": 1e6,
|
|
5861
|
-
"gpt-5.5":
|
|
5862
|
-
"gpt-5.2-pro":
|
|
5872
|
+
"gpt-5.5": 78e3,
|
|
5873
|
+
"gpt-5.2-pro": 78e3,
|
|
5863
5874
|
// Retired on 2026-09-29 for Claude Sonnet 5.5, same window.
|
|
5864
5875
|
"claude-sonnet-5": 1e6,
|
|
5865
5876
|
// Retired on 2026-10-12 for Claude Haiku 5.5.
|
|
5866
|
-
"claude-haiku-4.5":
|
|
5877
|
+
"claude-haiku-4.5": 24e3
|
|
5867
5878
|
};
|
|
5868
5879
|
var DEFAULT_CONTEXT_TOKENS = 256e3;
|
|
5869
5880
|
function contextTokensFor(modelId) {
|
package/dist/clixad.mjs
CHANGED
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
takeConfigNotices,
|
|
48
48
|
toolSchemaFor,
|
|
49
49
|
usd
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-5I5QG3FG.mjs";
|
|
51
51
|
|
|
52
52
|
// src/tui/load.ts
|
|
53
53
|
import * as nodeModule from "node:module";
|
|
@@ -126,7 +126,7 @@ async function withProductionReact(load) {
|
|
|
126
126
|
}
|
|
127
127
|
function loadTui() {
|
|
128
128
|
boundInkCaches();
|
|
129
|
-
return withProductionReact(() => import("./tui-
|
|
129
|
+
return withProductionReact(() => import("./tui-XJFTG3ZM.mjs"));
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
// src/title.ts
|