theclawbay 0.5.0 → 0.5.1
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.
|
@@ -4,6 +4,8 @@ export declare const MANAGED_START = "# theclawbay-managed:start";
|
|
|
4
4
|
export declare const MANAGED_END = "# theclawbay-managed:end";
|
|
5
5
|
export declare const HISTORY_PROVIDER_NEUTRALIZE_SOURCES: Set<string>;
|
|
6
6
|
export declare const HISTORY_PROVIDER_DB_MIGRATE_SOURCES: string[];
|
|
7
|
+
export declare const CODEX_MODEL_CONTEXT_WINDOW = 272000;
|
|
8
|
+
export declare const CODEX_MODEL_AUTO_COMPACT_TOKEN_LIMIT = 220000;
|
|
7
9
|
export type CodexFeatureFlagSnapshot = {
|
|
8
10
|
hadFeaturesTable: boolean;
|
|
9
11
|
appsHadKey: boolean;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.HISTORY_PROVIDER_DB_MIGRATE_SOURCES = exports.HISTORY_PROVIDER_NEUTRALIZE_SOURCES = exports.MANAGED_END = exports.MANAGED_START = exports.MIGRATION_STATE_FILE = exports.CODEX_FEATURE_FLAGS_STATE_PATH = void 0;
|
|
6
|
+
exports.CODEX_MODEL_AUTO_COMPACT_TOKEN_LIMIT = exports.CODEX_MODEL_CONTEXT_WINDOW = exports.HISTORY_PROVIDER_DB_MIGRATE_SOURCES = exports.HISTORY_PROVIDER_NEUTRALIZE_SOURCES = exports.MANAGED_END = exports.MANAGED_START = exports.MIGRATION_STATE_FILE = exports.CODEX_FEATURE_FLAGS_STATE_PATH = void 0;
|
|
7
7
|
exports.removeProviderTable = removeProviderTable;
|
|
8
8
|
exports.restoreManagedCodexFeatureFlags = restoreManagedCodexFeatureFlags;
|
|
9
9
|
exports.ensureManagedCodexFeatureFlags = ensureManagedCodexFeatureFlags;
|
|
@@ -28,6 +28,14 @@ exports.MANAGED_START = "# theclawbay-managed:start";
|
|
|
28
28
|
exports.MANAGED_END = "# theclawbay-managed:end";
|
|
29
29
|
exports.HISTORY_PROVIDER_NEUTRALIZE_SOURCES = new Set(["openai", "theclawbay-wan", providers_1.DEFAULT_PROVIDER_ID]);
|
|
30
30
|
exports.HISTORY_PROVIDER_DB_MIGRATE_SOURCES = ["openai", providers_1.DEFAULT_PROVIDER_ID, "theclawbay-wan"];
|
|
31
|
+
// Codex auto-compaction only triggers when it knows the model's context window.
|
|
32
|
+
// In API-key + custom base_url mode there is no server-provided window, so unless
|
|
33
|
+
// we write these, `model_context_window()` is None and compaction never fires —
|
|
34
|
+
// the conversation grows unbounded until it hits the relay's request-size cap.
|
|
35
|
+
// The auto-compact limit (~80% of window) keeps even image-heavy sessions well
|
|
36
|
+
// under the cap while matching Codex's default behavior for gpt-5.x.
|
|
37
|
+
exports.CODEX_MODEL_CONTEXT_WINDOW = 272000;
|
|
38
|
+
exports.CODEX_MODEL_AUTO_COMPACT_TOKEN_LIMIT = 220000;
|
|
31
39
|
function removeProviderTable(source, providerId) {
|
|
32
40
|
const header = `[model_providers.${providerId}]`;
|
|
33
41
|
const lines = source.split(/\r?\n/);
|
|
@@ -158,6 +166,10 @@ async function writeCodexConfig(params) {
|
|
|
158
166
|
next = (0, toml_1.upsertFirstKeyLine)(next, "model_provider", `"${providers_1.DEFAULT_PROVIDER_ID}"`);
|
|
159
167
|
next = (0, toml_1.upsertFirstKeyLine)(next, "model", `"${params.model}"`);
|
|
160
168
|
next = (0, toml_1.upsertFirstKeyLine)(next, "openai_base_url", `"${nativeCodexBaseUrl}"`);
|
|
169
|
+
// Give Codex the context window it needs to trigger auto-compaction; without
|
|
170
|
+
// these, custom-base_url sessions never compact and grow until the relay 413s.
|
|
171
|
+
next = (0, toml_1.upsertFirstKeyLine)(next, "model_context_window", String(exports.CODEX_MODEL_CONTEXT_WINDOW));
|
|
172
|
+
next = (0, toml_1.upsertFirstKeyLine)(next, "model_auto_compact_token_limit", String(exports.CODEX_MODEL_AUTO_COMPACT_TOKEN_LIMIT));
|
|
161
173
|
next = (0, toml_1.removeTopLevelKeyLineIf)(next, "chatgpt_base_url", urls_1.isTheClawBayChatgptBaseUrl);
|
|
162
174
|
const managedBlock = (0, fsx_1.appendManagedBlock)("", [
|
|
163
175
|
exports.MANAGED_START,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "theclawbay",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "CLI for connecting Codex, Hermes Agent, Gemini-compatible apps, Continue, Cline, GSD, OpenClaw, OpenCode, Kilo, Roo Code, Aider, experimental Trae, and experimental Zo to The Claw Bay.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"note": "Google's flagship coding and reasoning model through CliRelay.",
|
|
46
46
|
"tone": "coral",
|
|
47
47
|
"provider": "google",
|
|
48
|
-
"inputPer1M": 1.
|
|
49
|
-
"cachedInputPer1M": 0.
|
|
50
|
-
"outputPer1M":
|
|
48
|
+
"inputPer1M": 1.16,
|
|
49
|
+
"cachedInputPer1M": 0.12,
|
|
50
|
+
"outputPer1M": 9.25
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
"id": "gemini-2.5-flash",
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
"note": "Balanced Gemini path for fast multimodal and agentic work.",
|
|
56
56
|
"tone": "ink",
|
|
57
57
|
"provider": "google",
|
|
58
|
-
"inputPer1M": 0.
|
|
59
|
-
"cachedInputPer1M": 0.
|
|
60
|
-
"outputPer1M":
|
|
58
|
+
"inputPer1M": 0.89,
|
|
59
|
+
"cachedInputPer1M": 0.09,
|
|
60
|
+
"outputPer1M": 7.4
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
"id": "gemini-2.5-flash-lite",
|
|
@@ -65,9 +65,9 @@
|
|
|
65
65
|
"note": "Lowest-cost Gemini path for lightweight coding and tooling loops.",
|
|
66
66
|
"tone": "sea",
|
|
67
67
|
"provider": "google",
|
|
68
|
-
"inputPer1M": 0.
|
|
69
|
-
"cachedInputPer1M": 0.
|
|
70
|
-
"outputPer1M":
|
|
68
|
+
"inputPer1M": 0.3,
|
|
69
|
+
"cachedInputPer1M": 0.03,
|
|
70
|
+
"outputPer1M": 1.19
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
"id": "gemini-3-pro-preview",
|
|
@@ -75,9 +75,9 @@
|
|
|
75
75
|
"note": "Preview Gemini model for heavier multimodal and coding sessions.",
|
|
76
76
|
"tone": "coral",
|
|
77
77
|
"provider": "google",
|
|
78
|
-
"inputPer1M":
|
|
79
|
-
"cachedInputPer1M": 0.
|
|
80
|
-
"outputPer1M":
|
|
78
|
+
"inputPer1M": 1.85,
|
|
79
|
+
"cachedInputPer1M": 0.19,
|
|
80
|
+
"outputPer1M": 11.1
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
83
|
"id": "gemini-3.1-pro-preview",
|
|
@@ -85,9 +85,9 @@
|
|
|
85
85
|
"note": "Newest Gemini Pro preview with stronger agentic and coding behavior.",
|
|
86
86
|
"tone": "coral",
|
|
87
87
|
"provider": "google",
|
|
88
|
-
"inputPer1M":
|
|
89
|
-
"cachedInputPer1M": 0.
|
|
90
|
-
"outputPer1M":
|
|
88
|
+
"inputPer1M": 1.85,
|
|
89
|
+
"cachedInputPer1M": 0.02,
|
|
90
|
+
"outputPer1M": 11.1
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
93
|
"id": "gemini-3-flash-preview",
|
|
@@ -95,9 +95,9 @@
|
|
|
95
95
|
"note": "Faster Gemini preview tuned for responsive high-volume tasks.",
|
|
96
96
|
"tone": "ink",
|
|
97
97
|
"provider": "google",
|
|
98
|
-
"inputPer1M": 0.
|
|
98
|
+
"inputPer1M": 0.47,
|
|
99
99
|
"cachedInputPer1M": 0.05,
|
|
100
|
-
"outputPer1M":
|
|
100
|
+
"outputPer1M": 2.78
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
103
|
"id": "deepseek-v4-flash",
|