theclawbay 0.3.61 → 0.3.63

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.
@@ -65,7 +65,7 @@ const LEGACY_THECLAWBAY_OPENAI_PROXY_SUFFIX = "/api/codex-auth/v1/proxy/v1";
65
65
  const CANONICAL_THECLAWBAY_OPENAI_PROXY_SUFFIX = "/v1";
66
66
  const THECLAWBAY_CANONICAL_API_HOST = "api.theclawbay.com";
67
67
  const THECLAWBAY_WEBSITE_HOSTS = new Set(["theclawbay.com", "www.theclawbay.com"]);
68
- const SUPPORTED_MODEL_IDS = new Set((0, supported_models_1.getSupportedModelIds)());
68
+ const SUPPORTED_MODEL_IDS = new Set((0, supported_models_1.getKnownTheClawBayModelIds)());
69
69
  const CONTINUE_MODEL_NAME = "The Claw Bay";
70
70
  const TRAE_PATCH_MARKER = "theclawbay-trae-patch";
71
71
  const TRAE_BUNDLE_BACKUP_SUFFIX = ".theclawbay-managed-backup";
@@ -1533,6 +1533,7 @@ async function writeCodexConfig(params) {
1533
1533
  'name = "OpenAI"',
1534
1534
  `base_url = "${nativeCodexBaseUrl}"`,
1535
1535
  'wire_api = "responses"',
1536
+ "requires_openai_auth = true",
1536
1537
  "supports_websockets = true",
1537
1538
  `experimental_bearer_token = "${params.apiKey}"`,
1538
1539
  MANAGED_END,
@@ -15,11 +15,14 @@ const MODELS_CACHE_FILE = "models_cache.json";
15
15
  const MODELS_CACHE_STATE_FILE = "theclawbay.models-cache.json";
16
16
  const STATE_DB_FILE_PATTERN = /^state_\d+\.sqlite$/;
17
17
  const TARGET_MODEL_IDS = (0, supported_models_1.getSupportedModelIds)();
18
+ const LEGACY_REMOVED_MODEL_IDS = (0, supported_models_1.getLegacyRemovedModelIds)();
18
19
  const TARGET_MODEL_ID_SET = new Set(TARGET_MODEL_IDS);
20
+ const TRACKED_MODEL_ID_SET = new Set([...TARGET_MODEL_IDS, ...LEGACY_REMOVED_MODEL_IDS]);
21
+ const LEGACY_REMOVED_MODEL_ID_SET = new Set(LEGACY_REMOVED_MODEL_IDS);
19
22
  const SEED_MARKER_KEY = "_theclawbay_seeded";
20
23
  // Older releases stored the model id as the marker value; accept those so cleanup still works.
21
24
  const SEED_MARKER_VALUE = "theclawbay";
22
- const LEGACY_SEED_MARKER_VALUES = new Set([...TARGET_MODEL_IDS, SEED_MARKER_VALUE, true]);
25
+ const LEGACY_SEED_MARKER_VALUES = new Set([...TRACKED_MODEL_ID_SET, SEED_MARKER_VALUE, true]);
23
26
  const SUPPORTED_MODELS = (0, supported_models_1.getSupportedModels)();
24
27
  const SUPPORTED_MODEL_CONFIG = new Map(SUPPORTED_MODELS.map((model) => [model.id, model]));
25
28
  const TEMPLATE_MODEL_IDS = TARGET_MODEL_IDS;
@@ -97,13 +100,13 @@ function normalizePatchFingerprintMap(state) {
97
100
  if (!state)
98
101
  return {};
99
102
  if (state.version === 1) {
100
- if (!TARGET_MODEL_ID_SET.has(state.modelId))
103
+ if (!TRACKED_MODEL_ID_SET.has(state.modelId))
101
104
  return {};
102
105
  return state.fingerprint ? { [state.modelId]: state.fingerprint } : {};
103
106
  }
104
107
  const output = {};
105
108
  for (const entry of state.models) {
106
- if (!TARGET_MODEL_ID_SET.has(entry.modelId))
109
+ if (!TRACKED_MODEL_ID_SET.has(entry.modelId))
107
110
  continue;
108
111
  if (entry.fingerprint)
109
112
  output[entry.modelId] = entry.fingerprint;
@@ -421,6 +424,20 @@ async function ensureCodexModelCacheHasGpt54(params) {
421
424
  let seeded = false;
422
425
  let stateChanged = false;
423
426
  const nextState = { ...existingState };
427
+ const legacyRemovedBefore = doc.models.length;
428
+ doc.models = doc.models.filter((entry) => {
429
+ const slug = typeof entry.slug === "string" ? entry.slug : "";
430
+ if (!slug || !LEGACY_REMOVED_MODEL_ID_SET.has(slug))
431
+ return true;
432
+ if (!hasSeedMarker(entry))
433
+ return true;
434
+ delete nextState[slug];
435
+ stateChanged = true;
436
+ return false;
437
+ });
438
+ if (doc.models.length !== legacyRemovedBefore) {
439
+ changed = true;
440
+ }
424
441
  for (const modelId of TARGET_MODEL_IDS) {
425
442
  const existingModel = findModel(doc.models, modelId);
426
443
  const trackedFingerprint = existingState[modelId];
@@ -530,7 +547,7 @@ async function cleanupSeededCodexModelCache(params) {
530
547
  let preserved = 0;
531
548
  doc.models = doc.models.filter((entry) => {
532
549
  const slug = typeof entry.slug === "string" ? entry.slug : "";
533
- if (!slug || !TARGET_MODEL_ID_SET.has(slug))
550
+ if (!slug || !TRACKED_MODEL_ID_SET.has(slug))
534
551
  return true;
535
552
  if (!hasSeedMarker(entry)) {
536
553
  preserved += 1;
@@ -11,3 +11,5 @@ export type SupportedModelConfig = {
11
11
  export declare function getSupportedModels(): SupportedModelConfig[];
12
12
  export declare function getSupportedModelIds(): string[];
13
13
  export declare function getSupportedModelDisplayNames(): Record<string, string>;
14
+ export declare function getLegacyRemovedModelIds(): string[];
15
+ export declare function getKnownTheClawBayModelIds(): string[];
@@ -6,11 +6,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getSupportedModels = getSupportedModels;
7
7
  exports.getSupportedModelIds = getSupportedModelIds;
8
8
  exports.getSupportedModelDisplayNames = getSupportedModelDisplayNames;
9
+ exports.getLegacyRemovedModelIds = getLegacyRemovedModelIds;
10
+ exports.getKnownTheClawBayModelIds = getKnownTheClawBayModelIds;
9
11
  const node_path_1 = __importDefault(require("node:path"));
10
12
  const node_fs_1 = require("node:fs");
11
13
  function configPath() {
12
14
  return node_path_1.default.resolve(__dirname, "..", "..", "theclawbay-supported-models.json");
13
15
  }
16
+ const LEGACY_REMOVED_MODEL_IDS = [
17
+ "gpt-image-1.5",
18
+ "gpt-5.2-codex",
19
+ "gpt-5.1-codex-max",
20
+ "gpt-5.1-codex-mini",
21
+ ];
14
22
  function parseSupportedModels(raw) {
15
23
  const parsed = JSON.parse(raw);
16
24
  if (!Array.isArray(parsed)) {
@@ -61,3 +69,9 @@ function getSupportedModelIds() {
61
69
  function getSupportedModelDisplayNames() {
62
70
  return Object.fromEntries(getSupportedModels().map((model) => [model.id, model.label]));
63
71
  }
72
+ function getLegacyRemovedModelIds() {
73
+ return [...LEGACY_REMOVED_MODEL_IDS];
74
+ }
75
+ function getKnownTheClawBayModelIds() {
76
+ return Array.from(new Set([...getSupportedModelIds(), ...getLegacyRemovedModelIds()]));
77
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "theclawbay",
3
- "version": "0.3.61",
3
+ "version": "0.3.63",
4
4
  "description": "CLI for connecting Codex, 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": {
@@ -26,15 +26,6 @@
26
26
  "cachedInputPer1M": 0.125,
27
27
  "outputPer1M": 10.0
28
28
  },
29
- {
30
- "id": "gpt-image-1.5",
31
- "label": "GPT Image 1.5",
32
- "note": "Native image generation model for direct image outputs.",
33
- "tone": "coral",
34
- "inputPer1M": 8.0,
35
- "cachedInputPer1M": 2.0,
36
- "outputPer1M": 32.0
37
- },
38
29
  {
39
30
  "id": "gpt-5.3-codex",
40
31
  "label": "GPT-5.3 Codex",
@@ -44,15 +35,6 @@
44
35
  "cachedInputPer1M": 0.175,
45
36
  "outputPer1M": 14.0
46
37
  },
47
- {
48
- "id": "gpt-5.2-codex",
49
- "label": "GPT-5.2 Codex",
50
- "note": "Stable compatibility option for older Codex flows.",
51
- "tone": "sea",
52
- "inputPer1M": 1.75,
53
- "cachedInputPer1M": 0.175,
54
- "outputPer1M": 14.0
55
- },
56
38
  {
57
39
  "id": "gpt-5.2",
58
40
  "label": "GPT-5.2",
@@ -61,23 +43,5 @@
61
43
  "inputPer1M": 1.75,
62
44
  "cachedInputPer1M": 0.175,
63
45
  "outputPer1M": 14.0
64
- },
65
- {
66
- "id": "gpt-5.1-codex-max",
67
- "label": "GPT-5.1 Codex Max",
68
- "note": "Higher-throughput option for longer coding sessions.",
69
- "tone": "coral",
70
- "inputPer1M": 1.25,
71
- "cachedInputPer1M": 0.125,
72
- "outputPer1M": 10.0
73
- },
74
- {
75
- "id": "gpt-5.1-codex-mini",
76
- "label": "GPT-5.1 Codex Mini",
77
- "note": "Lower-cost Codex path for quick iterations.",
78
- "tone": "sea",
79
- "inputPer1M": 0.25,
80
- "cachedInputPer1M": 0.025,
81
- "outputPer1M": 2.0
82
46
  }
83
47
  ]