claudish 14.24.0 → 14.25.0

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.
Files changed (2) hide show
  1. package/dist/index.js +383 -107
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -4487,7 +4487,7 @@ function requireWireApiForTransport(transport, wire, ctx) {
4487
4487
  });
4488
4488
  }
4489
4489
  }
4490
- var CustomEndpointAuthSchemeSchema, WireValueSchema, WirePointerSchema, WireAssignmentSchema, CustomEndpointWireSchema, CustomEndpointSimpleSchema, CustomEndpointComplexSchema, CustomEndpointSchema, PredefinedEndpointsConfigSchema, AccountIdentitySchema, AccountStoreKindSchema, SubscriptionAccountSchema, CodexWindowSlotSchema, SubscriptionAccountsEntrySchema, SubscriptionAccountsSchema;
4490
+ var CustomEndpointAuthSchemeSchema, WireValueSchema, WirePointerSchema, WireAssignmentSchema, CustomEndpointWireSchema, CustomEndpointSimpleSchema, CustomEndpointComplexSchema, CustomEndpointSchema, PredefinedEndpointsConfigSchema, HarnessGatewayConfigSchema, AccountIdentitySchema, AccountStoreKindSchema, SubscriptionAccountSchema, CodexWindowSlotSchema, SubscriptionAccountsEntrySchema, SubscriptionAccountsSchema;
4491
4491
  var init_config_schema = __esm(() => {
4492
4492
  init_zod();
4493
4493
  init_account_label();
@@ -4548,6 +4548,9 @@ var init_config_schema = __esm(() => {
4548
4548
  disable: array(string2()).optional(),
4549
4549
  enable: array(string2()).optional()
4550
4550
  });
4551
+ HarnessGatewayConfigSchema = object({
4552
+ url: string2()
4553
+ });
4551
4554
  AccountIdentitySchema = object({
4552
4555
  accountUuid: string2().optional(),
4553
4556
  chatgptAccountId: string2().optional(),
@@ -5522,7 +5525,7 @@ var init_env_placeholder = __esm(() => {
5522
5525
  });
5523
5526
 
5524
5527
  // src/version.ts
5525
- var VERSION = "14.24.0";
5528
+ var VERSION = "14.25.0";
5526
5529
 
5527
5530
  // src/redact.ts
5528
5531
  function isPlaceholder(value) {
@@ -11236,6 +11239,9 @@ function loadConfig() {
11236
11239
  if (config.recoveryUi !== undefined) {
11237
11240
  merged.recoveryUi = config.recoveryUi;
11238
11241
  }
11242
+ if (config.harnessGateway !== undefined) {
11243
+ merged.harnessGateway = config.harnessGateway;
11244
+ }
11239
11245
  return merged;
11240
11246
  } catch (error) {
11241
11247
  console.error(`Warning: Failed to load config, using defaults: ${error}`);
@@ -14048,7 +14054,7 @@ var init_bundled_recommended_list = __esm(() => {
14048
14054
  }
14049
14055
  }
14050
14056
  },
14051
- fetchedAt: "2026-11-14T16:08:39.633Z",
14057
+ fetchedAt: "2026-11-15T00:03:45.109Z",
14052
14058
  format: 1,
14053
14059
  recommendations: {
14054
14060
  contractVersion: 3,
@@ -14154,11 +14160,11 @@ var init_bundled_recommended_list = __esm(() => {
14154
14160
  tier: "luxury"
14155
14161
  }
14156
14162
  ],
14157
- generationId: "g-20261114132932816-1f7e197a"
14163
+ generationId: "g-20261114234105679-14dde71a"
14158
14164
  },
14159
14165
  source: "https://us-central1-claudish-6da10.cloudfunctions.net"
14160
14166
  },
14161
- catalogGenerationId: "g-20261114132932816-1f7e197a",
14167
+ catalogGenerationId: "g-20261114234105679-14dde71a",
14162
14168
  entries: [
14163
14169
  {
14164
14170
  aggregators: [
@@ -14732,9 +14738,9 @@ var init_bundled_recommended_list = __esm(() => {
14732
14738
  ],
14733
14739
  aliases: [
14734
14740
  "anthropic/claude-opus-5.5",
14741
+ "claude-opus-5-5-low",
14735
14742
  "claude-opus-5-5-medium",
14736
14743
  "claude-opus-5-5-high",
14737
- "claude-opus-5-5-low",
14738
14744
  "claude-opus-5-5-max",
14739
14745
  "claude-opus-5-5-xhigh"
14740
14746
  ],
@@ -14925,9 +14931,9 @@ var init_bundled_recommended_list = __esm(() => {
14925
14931
  aliases: [
14926
14932
  "anthropic/claude-sonnet-5.5",
14927
14933
  "claude-sonnet-5.5",
14928
- "claude-sonnet-5-5-low",
14929
14934
  "claude-sonnet-5-5-high",
14930
14935
  "claude-sonnet-5-5-medium",
14936
+ "claude-sonnet-5-5-low",
14931
14937
  "claude-sonnet-5-5-max",
14932
14938
  "claude-sonnet-5-5-xhigh"
14933
14939
  ],
@@ -15129,8 +15135,21 @@ var init_bundled_recommended_list = __esm(() => {
15129
15135
  type: "flat"
15130
15136
  },
15131
15137
  reasoning: {
15138
+ mode: {
15139
+ status: "rejected"
15140
+ },
15132
15141
  request: {
15133
- status: "unknown"
15142
+ api: "gemini",
15143
+ effort: {
15144
+ default: "medium",
15145
+ path: "/generationConfig/thinkingConfig/thinkingLevel",
15146
+ values: {
15147
+ high: "high",
15148
+ low: "low",
15149
+ medium: "medium"
15150
+ }
15151
+ },
15152
+ status: "supported"
15134
15153
  }
15135
15154
  },
15136
15155
  route: {
@@ -15143,7 +15162,26 @@ var init_bundled_recommended_list = __esm(() => {
15143
15162
  api: "gemini",
15144
15163
  evidence: [],
15145
15164
  reasoning: {
15146
- status: "unknown"
15165
+ disable: {
15166
+ status: "not_applicable"
15167
+ },
15168
+ effort: {
15169
+ default: "medium",
15170
+ path: "/generationConfig/thinkingConfig/thinkingLevel",
15171
+ values: {
15172
+ high: "high",
15173
+ low: "low",
15174
+ medium: "medium"
15175
+ }
15176
+ },
15177
+ enable: {
15178
+ status: "not_applicable"
15179
+ },
15180
+ mode: {
15181
+ path: "/reasoning/mode",
15182
+ status: "rejected"
15183
+ },
15184
+ status: "supported"
15147
15185
  },
15148
15186
  speed: {
15149
15187
  status: "unknown"
@@ -15158,8 +15196,8 @@ var init_bundled_recommended_list = __esm(() => {
15158
15196
  ],
15159
15197
  aliases: [
15160
15198
  "google/gemini-4-argon",
15161
- "gemini-4-argon-high",
15162
15199
  "gemini-4-argon-medium",
15200
+ "gemini-4-argon-high",
15163
15201
  "gemini-4-argon-low"
15164
15202
  ],
15165
15203
  contextWindow: 1048576,
@@ -15251,8 +15289,21 @@ var init_bundled_recommended_list = __esm(() => {
15251
15289
  type: "flat"
15252
15290
  },
15253
15291
  reasoning: {
15254
- request: {
15292
+ mode: {
15255
15293
  status: "unknown"
15294
+ },
15295
+ request: {
15296
+ api: "gemini",
15297
+ effort: {
15298
+ default: "medium",
15299
+ path: "/generationConfig/thinkingConfig/thinkingLevel",
15300
+ values: {
15301
+ high: "high",
15302
+ low: "low",
15303
+ medium: "medium"
15304
+ }
15305
+ },
15306
+ status: "supported"
15256
15307
  }
15257
15308
  },
15258
15309
  route: {
@@ -15265,7 +15316,25 @@ var init_bundled_recommended_list = __esm(() => {
15265
15316
  api: "gemini",
15266
15317
  evidence: [],
15267
15318
  reasoning: {
15268
- status: "unknown"
15319
+ disable: {
15320
+ status: "not_applicable"
15321
+ },
15322
+ effort: {
15323
+ default: "medium",
15324
+ path: "/generationConfig/thinkingConfig/thinkingLevel",
15325
+ values: {
15326
+ high: "high",
15327
+ low: "low",
15328
+ medium: "medium"
15329
+ }
15330
+ },
15331
+ enable: {
15332
+ status: "not_applicable"
15333
+ },
15334
+ mode: {
15335
+ status: "unknown"
15336
+ },
15337
+ status: "supported"
15269
15338
  },
15270
15339
  speed: {
15271
15340
  status: "unknown"
@@ -15282,9 +15351,9 @@ var init_bundled_recommended_list = __esm(() => {
15282
15351
  ],
15283
15352
  aliases: [
15284
15353
  "google/gemini-4-carbon",
15285
- "gemini-4-carbon-high",
15286
15354
  "gemini-4-carbon-medium",
15287
- "gemini-4-carbon-low"
15355
+ "gemini-4-carbon-low",
15356
+ "gemini-4-carbon-high"
15288
15357
  ],
15289
15358
  contextWindow: 1048576,
15290
15359
  contractVersion: 3,
@@ -15373,8 +15442,22 @@ var init_bundled_recommended_list = __esm(() => {
15373
15442
  type: "flat"
15374
15443
  },
15375
15444
  reasoning: {
15376
- request: {
15445
+ mode: {
15377
15446
  status: "unknown"
15447
+ },
15448
+ request: {
15449
+ api: "gemini",
15450
+ effort: {
15451
+ default: "high",
15452
+ path: "/generationConfig/thinkingConfig/thinkingLevel",
15453
+ values: {
15454
+ high: "high",
15455
+ low: "low",
15456
+ medium: "medium",
15457
+ xhigh: "xhigh"
15458
+ }
15459
+ },
15460
+ status: "supported"
15378
15461
  }
15379
15462
  },
15380
15463
  route: {
@@ -15387,7 +15470,26 @@ var init_bundled_recommended_list = __esm(() => {
15387
15470
  api: "gemini",
15388
15471
  evidence: [],
15389
15472
  reasoning: {
15390
- status: "unknown"
15473
+ disable: {
15474
+ status: "not_applicable"
15475
+ },
15476
+ effort: {
15477
+ default: "high",
15478
+ path: "/generationConfig/thinkingConfig/thinkingLevel",
15479
+ values: {
15480
+ high: "high",
15481
+ low: "low",
15482
+ medium: "medium",
15483
+ xhigh: "xhigh"
15484
+ }
15485
+ },
15486
+ enable: {
15487
+ status: "not_applicable"
15488
+ },
15489
+ mode: {
15490
+ status: "unknown"
15491
+ },
15492
+ status: "supported"
15391
15493
  },
15392
15494
  speed: {
15393
15495
  status: "unknown"
@@ -15404,10 +15506,10 @@ var init_bundled_recommended_list = __esm(() => {
15404
15506
  ],
15405
15507
  aliases: [
15406
15508
  "google/gemini-4-hydrogen",
15407
- "gemini-4-hydrogen-low",
15408
- "gemini-4-hydrogen-high",
15409
15509
  "gemini-4-hydrogen-xhigh",
15410
- "gemini-4-hydrogen-medium"
15510
+ "gemini-4-hydrogen-medium",
15511
+ "gemini-4-hydrogen-high",
15512
+ "gemini-4-hydrogen-low"
15411
15513
  ],
15412
15514
  contextWindow: 1048576,
15413
15515
  contractVersion: 3,
@@ -17813,7 +17915,7 @@ var init_bundled_recommended_list = __esm(() => {
17813
17915
  supportsVision: true
17814
17916
  }
17815
17917
  ],
17816
- lastUpdated: "2026-11-14T13:29:32.816Z",
17918
+ lastUpdated: "2026-11-14T23:41:05.679Z",
17817
17919
  models: [],
17818
17920
  plans: [
17819
17921
  {
@@ -18514,34 +18616,34 @@ var init_bundled_recommended_list = __esm(() => {
18514
18616
  id: "google-antigravity",
18515
18617
  inclusions: [
18516
18618
  {
18517
- externalModelId: "gemini-4-hydrogen-low",
18619
+ externalModelId: "claude-opus-5-5-low",
18518
18620
  kind: "provider_model",
18519
18621
  provider: "antigravity",
18520
18622
  resolution: {
18521
- modelId: "gemini-4-hydrogen",
18623
+ modelId: "claude-opus-5-5",
18522
18624
  status: "mapped"
18523
18625
  },
18524
- sourceText: "gemini-4-hydrogen-low"
18626
+ sourceText: "claude-opus-5-5-low"
18525
18627
  },
18526
18628
  {
18527
- externalModelId: "gemini-4-carbon-high",
18629
+ externalModelId: "gemini-4-argon-medium",
18528
18630
  kind: "provider_model",
18529
18631
  provider: "antigravity",
18530
18632
  resolution: {
18531
- modelId: "gemini-4-carbon",
18633
+ modelId: "gemini-4-argon",
18532
18634
  status: "mapped"
18533
18635
  },
18534
- sourceText: "gemini-4-carbon-high"
18636
+ sourceText: "gemini-4-argon-medium"
18535
18637
  },
18536
18638
  {
18537
- externalModelId: "gemini-4-hydrogen-high",
18639
+ externalModelId: "claude-opus-5-5-medium",
18538
18640
  kind: "provider_model",
18539
18641
  provider: "antigravity",
18540
18642
  resolution: {
18541
- modelId: "gemini-4-hydrogen",
18643
+ modelId: "claude-opus-5-5",
18542
18644
  status: "mapped"
18543
18645
  },
18544
- sourceText: "gemini-4-hydrogen-high"
18646
+ sourceText: "claude-opus-5-5-medium"
18545
18647
  },
18546
18648
  {
18547
18649
  externalModelId: "gemini-4-carbon-medium",
@@ -18554,124 +18656,124 @@ var init_bundled_recommended_list = __esm(() => {
18554
18656
  sourceText: "gemini-4-carbon-medium"
18555
18657
  },
18556
18658
  {
18557
- externalModelId: "claude-sonnet-5-5-low",
18659
+ externalModelId: "gemini-4-hydrogen-xhigh",
18558
18660
  kind: "provider_model",
18559
18661
  provider: "antigravity",
18560
18662
  resolution: {
18561
- modelId: "claude-sonnet-5-5",
18663
+ modelId: "gemini-4-hydrogen",
18562
18664
  status: "mapped"
18563
18665
  },
18564
- sourceText: "claude-sonnet-5-5-low"
18666
+ sourceText: "gemini-4-hydrogen-xhigh"
18565
18667
  },
18566
18668
  {
18567
- externalModelId: "claude-opus-5-5-medium",
18669
+ externalModelId: "gemini-4-hydrogen-medium",
18568
18670
  kind: "provider_model",
18569
18671
  provider: "antigravity",
18570
18672
  resolution: {
18571
- modelId: "claude-opus-5-5",
18673
+ modelId: "gemini-4-hydrogen",
18572
18674
  status: "mapped"
18573
18675
  },
18574
- sourceText: "claude-opus-5-5-medium"
18676
+ sourceText: "gemini-4-hydrogen-medium"
18575
18677
  },
18576
18678
  {
18577
- externalModelId: "claude-sonnet-5-5-high",
18679
+ externalModelId: "gemini-4-carbon-low",
18578
18680
  kind: "provider_model",
18579
18681
  provider: "antigravity",
18580
18682
  resolution: {
18581
- modelId: "claude-sonnet-5-5",
18683
+ modelId: "gemini-4-carbon",
18582
18684
  status: "mapped"
18583
18685
  },
18584
- sourceText: "claude-sonnet-5-5-high"
18686
+ sourceText: "gemini-4-carbon-low"
18585
18687
  },
18586
18688
  {
18587
- externalModelId: "claude-opus-5-5-high",
18689
+ externalModelId: "claude-sonnet-5-5-high",
18588
18690
  kind: "provider_model",
18589
18691
  provider: "antigravity",
18590
18692
  resolution: {
18591
- modelId: "claude-opus-5-5",
18693
+ modelId: "claude-sonnet-5-5",
18592
18694
  status: "mapped"
18593
18695
  },
18594
- sourceText: "claude-opus-5-5-high"
18696
+ sourceText: "claude-sonnet-5-5-high"
18595
18697
  },
18596
18698
  {
18597
- externalModelId: "claude-opus-5-5-low",
18699
+ externalModelId: "claude-sonnet-5-5-medium",
18598
18700
  kind: "provider_model",
18599
18701
  provider: "antigravity",
18600
18702
  resolution: {
18601
- modelId: "claude-opus-5-5",
18703
+ modelId: "claude-sonnet-5-5",
18602
18704
  status: "mapped"
18603
18705
  },
18604
- sourceText: "claude-opus-5-5-low"
18706
+ sourceText: "claude-sonnet-5-5-medium"
18605
18707
  },
18606
18708
  {
18607
- externalModelId: "gemini-4-argon-high",
18709
+ externalModelId: "gemini-4-hydrogen-high",
18608
18710
  kind: "provider_model",
18609
18711
  provider: "antigravity",
18610
18712
  resolution: {
18611
- modelId: "gemini-4-argon",
18713
+ modelId: "gemini-4-hydrogen",
18612
18714
  status: "mapped"
18613
18715
  },
18614
- sourceText: "gemini-4-argon-high"
18716
+ sourceText: "gemini-4-hydrogen-high"
18615
18717
  },
18616
18718
  {
18617
- externalModelId: "gemini-4-argon-medium",
18719
+ externalModelId: "claude-sonnet-5-5-low",
18618
18720
  kind: "provider_model",
18619
18721
  provider: "antigravity",
18620
18722
  resolution: {
18621
- modelId: "gemini-4-argon",
18723
+ modelId: "claude-sonnet-5-5",
18622
18724
  status: "mapped"
18623
18725
  },
18624
- sourceText: "gemini-4-argon-medium"
18726
+ sourceText: "claude-sonnet-5-5-low"
18625
18727
  },
18626
18728
  {
18627
- externalModelId: "claude-sonnet-5-5-medium",
18729
+ externalModelId: "gemini-4-hydrogen-low",
18628
18730
  kind: "provider_model",
18629
18731
  provider: "antigravity",
18630
18732
  resolution: {
18631
- modelId: "claude-sonnet-5-5",
18733
+ modelId: "gemini-4-hydrogen",
18632
18734
  status: "mapped"
18633
18735
  },
18634
- sourceText: "claude-sonnet-5-5-medium"
18736
+ sourceText: "gemini-4-hydrogen-low"
18635
18737
  },
18636
18738
  {
18637
- externalModelId: "gemini-4-hydrogen-xhigh",
18739
+ externalModelId: "claude-opus-5-5-high",
18638
18740
  kind: "provider_model",
18639
18741
  provider: "antigravity",
18640
18742
  resolution: {
18641
- modelId: "gemini-4-hydrogen",
18743
+ modelId: "claude-opus-5-5",
18642
18744
  status: "mapped"
18643
18745
  },
18644
- sourceText: "gemini-4-hydrogen-xhigh"
18746
+ sourceText: "claude-opus-5-5-high"
18645
18747
  },
18646
18748
  {
18647
- externalModelId: "gemini-4-argon-low",
18749
+ externalModelId: "gemini-4-argon-high",
18648
18750
  kind: "provider_model",
18649
18751
  provider: "antigravity",
18650
18752
  resolution: {
18651
18753
  modelId: "gemini-4-argon",
18652
18754
  status: "mapped"
18653
18755
  },
18654
- sourceText: "gemini-4-argon-low"
18756
+ sourceText: "gemini-4-argon-high"
18655
18757
  },
18656
18758
  {
18657
- externalModelId: "gemini-4-carbon-low",
18759
+ externalModelId: "gemini-4-argon-low",
18658
18760
  kind: "provider_model",
18659
18761
  provider: "antigravity",
18660
18762
  resolution: {
18661
- modelId: "gemini-4-carbon",
18763
+ modelId: "gemini-4-argon",
18662
18764
  status: "mapped"
18663
18765
  },
18664
- sourceText: "gemini-4-carbon-low"
18766
+ sourceText: "gemini-4-argon-low"
18665
18767
  },
18666
18768
  {
18667
- externalModelId: "gemini-4-hydrogen-medium",
18769
+ externalModelId: "gemini-4-carbon-high",
18668
18770
  kind: "provider_model",
18669
18771
  provider: "antigravity",
18670
18772
  resolution: {
18671
- modelId: "gemini-4-hydrogen",
18773
+ modelId: "gemini-4-carbon",
18672
18774
  status: "mapped"
18673
18775
  },
18674
- sourceText: "gemini-4-hydrogen-medium"
18776
+ sourceText: "gemini-4-carbon-high"
18675
18777
  }
18676
18778
  ],
18677
18779
  modelDiscovery: "client",
@@ -18995,24 +19097,24 @@ var init_bundled_recommended_list = __esm(() => {
18995
19097
  id: "ollama-cloud",
18996
19098
  inclusions: [
18997
19099
  {
18998
- externalModelId: "glm-5.3-flash",
19100
+ externalModelId: "glm-5.3",
18999
19101
  kind: "provider_model",
19000
19102
  provider: "ollamacloud",
19001
19103
  resolution: {
19002
- modelId: "glm-5.3-flash",
19104
+ modelId: "glm-5.3",
19003
19105
  status: "mapped"
19004
19106
  },
19005
- sourceText: "glm-5.3-flash"
19107
+ sourceText: "glm-5.3"
19006
19108
  },
19007
19109
  {
19008
- externalModelId: "glm-5.3",
19110
+ externalModelId: "mimo-v2.6-flash",
19009
19111
  kind: "provider_model",
19010
19112
  provider: "ollamacloud",
19011
19113
  resolution: {
19012
- modelId: "glm-5.3",
19114
+ modelId: "mimo-v2.6-flash",
19013
19115
  status: "mapped"
19014
19116
  },
19015
- sourceText: "glm-5.3"
19117
+ sourceText: "mimo-v2.6-flash"
19016
19118
  },
19017
19119
  {
19018
19120
  externalModelId: "mimo-v2.6-pro",
@@ -19025,14 +19127,14 @@ var init_bundled_recommended_list = __esm(() => {
19025
19127
  sourceText: "mimo-v2.6-pro"
19026
19128
  },
19027
19129
  {
19028
- externalModelId: "deepseek-v4.1-flash",
19130
+ externalModelId: "kimi-k3.1-pro",
19029
19131
  kind: "provider_model",
19030
19132
  provider: "ollamacloud",
19031
19133
  resolution: {
19032
- modelId: "deepseek-v4.1-flash",
19134
+ modelId: "kimi-k3.1-pro",
19033
19135
  status: "mapped"
19034
19136
  },
19035
- sourceText: "deepseek-v4.1-flash"
19137
+ sourceText: "kimi-k3.1-pro"
19036
19138
  },
19037
19139
  {
19038
19140
  externalModelId: "minimax-m3.1-flash",
@@ -19045,24 +19147,24 @@ var init_bundled_recommended_list = __esm(() => {
19045
19147
  sourceText: "minimax-m3.1-flash"
19046
19148
  },
19047
19149
  {
19048
- externalModelId: "kimi-k3.1-pro",
19150
+ externalModelId: "glm-5.3-flash",
19049
19151
  kind: "provider_model",
19050
19152
  provider: "ollamacloud",
19051
19153
  resolution: {
19052
- modelId: "kimi-k3.1-pro",
19154
+ modelId: "glm-5.3-flash",
19053
19155
  status: "mapped"
19054
19156
  },
19055
- sourceText: "kimi-k3.1-pro"
19157
+ sourceText: "glm-5.3-flash"
19056
19158
  },
19057
19159
  {
19058
- externalModelId: "mimo-v2.6-flash",
19160
+ externalModelId: "deepseek-v4.1-flash",
19059
19161
  kind: "provider_model",
19060
19162
  provider: "ollamacloud",
19061
19163
  resolution: {
19062
- modelId: "mimo-v2.6-flash",
19164
+ modelId: "deepseek-v4.1-flash",
19063
19165
  status: "mapped"
19064
19166
  },
19065
- sourceText: "mimo-v2.6-flash"
19167
+ sourceText: "deepseek-v4.1-flash"
19066
19168
  }
19067
19169
  ],
19068
19170
  modelDiscovery: "catalog",
@@ -19307,7 +19409,7 @@ var init_bundled_recommended_list = __esm(() => {
19307
19409
  }
19308
19410
  ],
19309
19411
  routeRegistry: {
19310
- generationId: "g-20261114132932816-1f7e197a",
19412
+ generationId: "g-20261114234105679-14dde71a",
19311
19413
  registry: {
19312
19414
  contractVersion: 3,
19313
19415
  registryVersion: "3.7.0",
@@ -22822,14 +22924,26 @@ var init_gemini_api_format = __esm(() => {
22822
22924
  init_logger();
22823
22925
  init_base_api_format();
22824
22926
  GeminiAPIFormat = class GeminiAPIFormat extends BaseAPIFormat {
22927
+ thinkingFromModelName;
22928
+ constructor(modelId, wireFormat, options = {}) {
22929
+ super(modelId, wireFormat);
22930
+ this.thinkingFromModelName = options.thinkingFromModelName === true;
22931
+ }
22825
22932
  toolCallMap = new Map;
22933
+ callIdOf = new WeakMap;
22826
22934
  convertMessages(claudeRequest, _filterIdentityFn) {
22827
22935
  const messages = [];
22936
+ this.callIdOf = new WeakMap;
22828
22937
  if (claudeRequest.messages) {
22829
22938
  for (const msg of claudeRequest.messages) {
22830
22939
  if (msg.role === "user") {
22831
22940
  const parts = this.convertUserParts(msg);
22832
- if (parts.length > 0)
22941
+ if (parts.length === 0)
22942
+ continue;
22943
+ const prev = messages[messages.length - 1];
22944
+ if (prev?.role === "user")
22945
+ prev.parts.push(...parts);
22946
+ else
22833
22947
  messages.push({ role: "user", parts });
22834
22948
  } else if (msg.role === "assistant") {
22835
22949
  const parts = this.convertAssistantParts(msg);
@@ -22838,8 +22952,39 @@ var init_gemini_api_format = __esm(() => {
22838
22952
  }
22839
22953
  }
22840
22954
  }
22955
+ messages.forEach((content, i) => {
22956
+ const next = messages[i + 1];
22957
+ if (content.role === "model" && next?.role === "user") {
22958
+ next.parts = this.alignResponsesToCalls(content.parts, next.parts);
22959
+ }
22960
+ });
22841
22961
  return messages;
22842
22962
  }
22963
+ alignResponsesToCalls(callParts, parts) {
22964
+ const callOrder = callParts.filter((p) => p.functionCall).map((p) => this.callIdOf.get(p)).filter((id) => id !== undefined);
22965
+ const groups = [];
22966
+ const others = [];
22967
+ for (const part of parts) {
22968
+ const id = this.callIdOf.get(part);
22969
+ if (part.functionResponse && id !== undefined)
22970
+ groups.push({ id, parts: [part] });
22971
+ else if (id !== undefined && groups.at(-1)?.id === id)
22972
+ groups.at(-1)?.parts.push(part);
22973
+ else
22974
+ others.push(part);
22975
+ }
22976
+ if (groups.length === 0)
22977
+ return parts;
22978
+ const rank = (id) => {
22979
+ const at = callOrder.indexOf(id);
22980
+ return at === -1 ? callOrder.length : at;
22981
+ };
22982
+ const sorted = [...groups].sort((a, b) => rank(a.id) - rank(b.id));
22983
+ if (sorted.some((g, i) => g !== groups[i])) {
22984
+ log(`[GeminiAPIFormat] Reordered ${groups.length} function responses to their function calls' order`);
22985
+ }
22986
+ return [...sorted.flatMap((g) => g.parts), ...others];
22987
+ }
22843
22988
  convertUserParts(msg) {
22844
22989
  const parts = [];
22845
22990
  if (Array.isArray(msg.content)) {
@@ -22859,6 +23004,7 @@ var init_gemini_api_format = __esm(() => {
22859
23004
  log(`[GeminiAPIFormat] Warning: No function name found for tool_use_id ${block.tool_use_id}`);
22860
23005
  continue;
22861
23006
  }
23007
+ const firstResultPart = parts.length;
22862
23008
  if (Array.isArray(block.content)) {
22863
23009
  const textParts = [];
22864
23010
  const imageParts = [];
@@ -22894,6 +23040,9 @@ var init_gemini_api_format = __esm(() => {
22894
23040
  }
22895
23041
  });
22896
23042
  }
23043
+ for (const part of parts.slice(firstResultPart)) {
23044
+ this.callIdOf.set(part, block.tool_use_id);
23045
+ }
22897
23046
  }
22898
23047
  }
22899
23048
  } else if (typeof msg.content === "string") {
@@ -22928,6 +23077,7 @@ var init_gemini_api_format = __esm(() => {
22928
23077
  } else if (toolInfo.name !== block.name) {
22929
23078
  this.toolCallMap.set(block.id, { ...toolInfo, name: block.name });
22930
23079
  }
23080
+ this.callIdOf.set(functionCallPart, block.id);
22931
23081
  parts.push(functionCallPart);
22932
23082
  }
22933
23083
  }
@@ -22968,32 +23118,34 @@ CRITICAL INSTRUCTION FOR OUTPUT FORMAT:
22968
23118
  log(`[GeminiAPIFormat] toolConfig.mode -> ${toolConfig.functionCallingConfig.mode} for ${this.modelId}`);
22969
23119
  }
22970
23120
  }
22971
- const effort = this.resolveEffortLevel(claudeRequest);
22972
- if (effort) {
22973
- if (matchesModelFamily(this.modelId, "gemini-3")) {
22974
- payload.generationConfig.thinkingConfig = {
22975
- thinkingLevel: this.effortToThinkingLevel(effort)
22976
- };
22977
- log(`[GeminiAPIFormat] thinkingLevel -> ${payload.generationConfig.thinkingConfig.thinkingLevel} (from ${effort}) for ${this.modelId}`);
22978
- } else {
22979
- const budget = this.budgetWithinOutputCap(this.effortToThinkingBudget(effort), claudeRequest.max_tokens);
22980
- if (budget === undefined) {
22981
- log(`[GeminiAPIFormat] thinking omitted (from ${effort}): max_tokens ${claudeRequest.max_tokens} leaves no valid budget for ${this.modelId}`);
23121
+ if (this.thinkingFromModelName) {
23122
+ const effort = this.resolveEffortLevel(claudeRequest);
23123
+ if (effort) {
23124
+ if (matchesModelFamily(this.modelId, "gemini-3")) {
23125
+ payload.generationConfig.thinkingConfig = {
23126
+ thinkingLevel: this.effortToThinkingLevel(effort)
23127
+ };
23128
+ log(`[GeminiAPIFormat] thinkingLevel -> ${payload.generationConfig.thinkingConfig.thinkingLevel} (from ${effort}) for ${this.modelId}`);
22982
23129
  } else {
22983
- payload.generationConfig.thinkingConfig = { thinkingBudget: budget };
22984
- log(`[GeminiAPIFormat] thinkingBudget -> ${budget} (from ${effort}) for ${this.modelId}`);
23130
+ const budget = this.budgetWithinOutputCap(this.effortToThinkingBudget(effort), claudeRequest.max_tokens);
23131
+ if (budget === undefined) {
23132
+ log(`[GeminiAPIFormat] thinking omitted (from ${effort}): max_tokens ${claudeRequest.max_tokens} leaves no valid budget for ${this.modelId}`);
23133
+ } else {
23134
+ payload.generationConfig.thinkingConfig = { thinkingBudget: budget };
23135
+ log(`[GeminiAPIFormat] thinkingBudget -> ${budget} (from ${effort}) for ${this.modelId}`);
23136
+ }
23137
+ }
23138
+ } else if (claudeRequest.thinking) {
23139
+ const { budget_tokens } = claudeRequest.thinking;
23140
+ if (matchesModelFamily(this.modelId, "gemini-3")) {
23141
+ payload.generationConfig.thinkingConfig = {
23142
+ thinkingLevel: budget_tokens >= 16000 ? "high" : "low"
23143
+ };
23144
+ } else {
23145
+ payload.generationConfig.thinkingConfig = {
23146
+ thinkingBudget: Math.min(budget_tokens, GeminiAPIFormat.MAX_GEMINI_BUDGET)
23147
+ };
22985
23148
  }
22986
- }
22987
- } else if (claudeRequest.thinking) {
22988
- const { budget_tokens } = claudeRequest.thinking;
22989
- if (matchesModelFamily(this.modelId, "gemini-3")) {
22990
- payload.generationConfig.thinkingConfig = {
22991
- thinkingLevel: budget_tokens >= 16000 ? "high" : "low"
22992
- };
22993
- } else {
22994
- payload.generationConfig.thinkingConfig = {
22995
- thinkingBudget: Math.min(budget_tokens, GeminiAPIFormat.MAX_GEMINI_BUDGET)
22996
- };
22997
23149
  }
22998
23150
  }
22999
23151
  return payload;
@@ -71511,7 +71663,7 @@ var init_provider_profiles = __esm(() => {
71511
71663
  antigravityProfile = {
71512
71664
  createHandler(ctx) {
71513
71665
  const transport = new AntigravityProviderTransport(ctx.modelName);
71514
- const adapter = new GeminiAPIFormat(ctx.modelName);
71666
+ const adapter = new GeminiAPIFormat(ctx.modelName, undefined, { thinkingFromModelName: true });
71515
71667
  const handler = new ComposedHandler(transport, ctx.targetModel, ctx.modelName, ctx.port, {
71516
71668
  adapter,
71517
71669
  unwrapGeminiResponse: true,
@@ -86775,6 +86927,104 @@ var init_anthropic_forward = __esm(() => {
86775
86927
  CLAUDE_SUBSCRIPTION_API_KEY_REQUEST = "Claude subscription session: this request carries an API key (x-api-key), not a Claude Code " + "login, and claudish never signs a Claude subscription request with an API key. Use " + "anthropic@<id> for the Claude API, or, for a bare Claude model name, pass " + "--anthropic-api-billing to bill the key.";
86776
86928
  });
86777
86929
 
86930
+ // src/harness-gateway.ts
86931
+ function isAmbiguous2(text) {
86932
+ for (let i = 0;i < text.length; i++) {
86933
+ const code = text.charCodeAt(i);
86934
+ if (code === 92 || code <= 31 || code === 127)
86935
+ return true;
86936
+ }
86937
+ return false;
86938
+ }
86939
+ function canonical2(parsed, written) {
86940
+ const bareOrigin = parsed.pathname === "/" && !parsed.search && !parsed.hash;
86941
+ return bareOrigin && !written.endsWith("/") ? parsed.origin : parsed.href;
86942
+ }
86943
+ function resolveHarnessGateway(config) {
86944
+ const block = config.harnessGateway;
86945
+ if (block === undefined)
86946
+ return { kind: "off" };
86947
+ if (block === null || typeof block !== "object" || Array.isArray(block)) {
86948
+ return { kind: "invalid", message: `harnessGateway must be an object { "url": "..." }` };
86949
+ }
86950
+ if (!("url" in block) || block.url === undefined)
86951
+ return { kind: "off" };
86952
+ const parsed = HarnessGatewayConfigSchema.safeParse(block);
86953
+ if (!parsed.success) {
86954
+ return { kind: "invalid", message: `harnessGateway.url must be a string: ${RULE}` };
86955
+ }
86956
+ const written = parsed.data.url.trim();
86957
+ const refused = {
86958
+ kind: "invalid",
86959
+ message: `harnessGateway.url is not accepted: ${RULE}`
86960
+ };
86961
+ if (isAmbiguous2(written) || !isLoopbackTarget(written))
86962
+ return refused;
86963
+ let url;
86964
+ try {
86965
+ url = new URL(written);
86966
+ } catch {
86967
+ return refused;
86968
+ }
86969
+ if (url.username || url.password)
86970
+ return refused;
86971
+ return { kind: "on", url: canonical2(url, written) };
86972
+ }
86973
+ function applyHarnessGateway(env, gatewayUrl, proxyUrl) {
86974
+ env.ANTHROPIC_BASE_URL = gatewayUrl;
86975
+ const target = HARNESS_GATEWAY_TARGET_HEADER.toLowerCase();
86976
+ const kept = (env.ANTHROPIC_CUSTOM_HEADERS ?? "").split(/\r?\n/).filter((line) => {
86977
+ if (!line.trim())
86978
+ return false;
86979
+ const colon = line.indexOf(":");
86980
+ return colon <= 0 || line.slice(0, colon).trim().toLowerCase() !== target;
86981
+ });
86982
+ kept.push(`${HARNESS_GATEWAY_TARGET_HEADER}: ${proxyUrl}`);
86983
+ env.ANTHROPIC_CUSTOM_HEADERS = kept.join(`
86984
+ `);
86985
+ env[HARNESS_GATEWAY_TARGET_RECORD] = proxyUrl;
86986
+ }
86987
+ function scrubInheritedHarnessGatewayTarget(env) {
86988
+ const record = env[HARNESS_GATEWAY_TARGET_RECORD];
86989
+ if (record === undefined)
86990
+ return;
86991
+ delete env[HARNESS_GATEWAY_TARGET_RECORD];
86992
+ const headers = env.ANTHROPIC_CUSTOM_HEADERS;
86993
+ if (headers === undefined)
86994
+ return;
86995
+ const target = HARNESS_GATEWAY_TARGET_HEADER.toLowerCase();
86996
+ const kept = headers.split(/\r?\n/).filter((line) => {
86997
+ if (!line.trim())
86998
+ return false;
86999
+ const colon = line.indexOf(":");
87000
+ if (colon <= 0)
87001
+ return true;
87002
+ const name = line.slice(0, colon).trim().toLowerCase();
87003
+ return name !== target || line.slice(colon + 1).trim() !== record;
87004
+ });
87005
+ if (kept.length === 0)
87006
+ delete env.ANTHROPIC_CUSTOM_HEADERS;
87007
+ else
87008
+ env.ANTHROPIC_CUSTOM_HEADERS = kept.join(`
87009
+ `);
87010
+ }
87011
+ function displayUrl(url) {
87012
+ try {
87013
+ return new URL(url).origin;
87014
+ } catch {
87015
+ return "the configured harnessGateway.url";
87016
+ }
87017
+ }
87018
+ function harnessGatewayNotice(gatewayUrl, nativeRoute) {
87019
+ const base = `Claude Code's requests go through the gateway at ${displayUrl(gatewayUrl)}`;
87020
+ return nativeRoute ? `${base}; on this native Claude route the Claude login token passes through it` : base;
87021
+ }
87022
+ var HARNESS_GATEWAY_TARGET_HEADER = "X-Target-URL", HARNESS_GATEWAY_OFF_VAR = "CLAUDISH_HARNESS_GATEWAY_OFF", RULE = "it must be an http:// or https:// URL whose host is 127.0.0.1 (any 127.x.x.x), ::1 or localhost, with no user:password@, backslash or control character", HARNESS_GATEWAY_TARGET_RECORD = "CLAUDISH_SET_HARNESS_GATEWAY_TARGET";
87023
+ var init_harness_gateway = __esm(() => {
87024
+ init_config_schema();
87025
+ init_test_upstream();
87026
+ });
87027
+
86778
87028
  // src/hooks/session/binding.ts
86779
87029
  function sessionHooksNeedBinding(engine) {
86780
87030
  return BINDING_EVENTS.some((e) => engine.select(e).length > 0);
@@ -111553,6 +111803,18 @@ async function runClaudeWithProxy(config, proxyUrl, onCleanup) {
111553
111803
  onCleanup?.();
111554
111804
  return 1;
111555
111805
  }
111806
+ const globalConfig = loadConfig();
111807
+ const gatewayHeldOff = process.env[HARNESS_GATEWAY_OFF_VAR] === "1";
111808
+ const gatewayEligible = !config.monitor && !advisorNativeSession && !gatewayHeldOff;
111809
+ const harnessGateway = gatewayEligible ? resolveHarnessGateway(globalConfig) : { kind: "off" };
111810
+ if (harnessGateway.kind === "invalid") {
111811
+ console.error(`[claudish] Error: ${harnessGateway.message}.`);
111812
+ onCleanup?.();
111813
+ return 1;
111814
+ }
111815
+ if (!gatewayEligible && globalConfig.harnessGateway !== undefined) {
111816
+ log(gatewayHeldOff ? `[claude-runner] harnessGateway ignored: ${HARNESS_GATEWAY_OFF_VAR}=1` : "[claude-runner] harnessGateway ignored: a monitor session keeps the proxy URL");
111817
+ }
111556
111818
  const userStatusLineCommand = discoverUserStatusLineCommand(config.claudeArgs);
111557
111819
  const advisorModelArg = resolveAdvisorModelArg(config);
111558
111820
  const {
@@ -111601,6 +111863,14 @@ async function runClaudeWithProxy(config, proxyUrl, onCleanup) {
111601
111863
  ...advisorToolEnv.vars
111602
111864
  };
111603
111865
  scrubChildEnv(env, { interactive: Boolean(config.interactive) });
111866
+ scrubInheritedHarnessGatewayTarget(env);
111867
+ delete env[HARNESS_GATEWAY_OFF_VAR];
111868
+ let gatewayNotice;
111869
+ if (harnessGateway.kind === "on") {
111870
+ applyHarnessGateway(env, harnessGateway.url, proxyUrl);
111871
+ gatewayNotice = harnessGatewayNotice(harnessGateway.url, shouldPreserveNativeAuth(config));
111872
+ log(`[claude-runner] ${gatewayNotice}`);
111873
+ }
111604
111874
  const paneCapability = magmuxPaneCapability({
111605
111875
  interactive: Boolean(config.interactive),
111606
111876
  stdoutIsTty: Boolean(process.stdout.isTTY)
@@ -111698,6 +111968,8 @@ async function runClaudeWithProxy(config, proxyUrl, onCleanup) {
111698
111968
  log2("[claudish] ANTHROPIC_API_KEY found but hidden so it can't override that subscription \xB7 " + (config.claudeSubscriptionPin ? "use anthropic@<id> to bill the Claude API instead" : "use --anthropic-api-billing (or anthropicApiBilling: true) to bill the API instead"));
111699
111969
  }
111700
111970
  }
111971
+ if (gatewayNotice)
111972
+ log2(`[claudish] ${gatewayNotice}`);
111701
111973
  if (config.interactive) {
111702
111974
  log2(`
111703
111975
  [claudish] Model: ${modelDisplayName}
@@ -112029,6 +112301,7 @@ var init_claude_runner = __esm(() => {
112029
112301
  init_claude_code_login();
112030
112302
  init_config();
112031
112303
  init_anthropic_forward();
112304
+ init_harness_gateway();
112032
112305
  init_hooks();
112033
112306
  init_sinks();
112034
112307
  init_binding();
@@ -123674,6 +123947,7 @@ function claudeCodePrintEnv(parent) {
123674
123947
  delete env.ANTHROPIC_BASE_URL;
123675
123948
  scrubInheritedFastModeGates(env);
123676
123949
  scrubInheritedHostRouting(env);
123950
+ scrubInheritedHarnessGatewayTarget(env);
123677
123951
  return env;
123678
123952
  }
123679
123953
  function isFrame(v) {
@@ -123795,7 +124069,8 @@ async function runPromptViaClaudeCode(model, prompt, systemPrompt, opts = {}) {
123795
124069
  const argv = claudeCodePrintArgv(model, systemPromptFile, {
123796
124070
  subscriptionPin: opts.subscriptionPin === true
123797
124071
  });
123798
- const outcome = await runChild(launch, argv, cwd, printEnv, prompt, signal);
124072
+ const childEnv = { ...printEnv, [HARNESS_GATEWAY_OFF_VAR]: "1" };
124073
+ const outcome = await runChild(launch, argv, cwd, childEnv, prompt, signal);
123799
124074
  if (signal?.aborted)
123800
124075
  throw new Error("cancelled");
123801
124076
  const parsed = parseClaudeCodePrintOutput(outcome.stdout);
@@ -123875,6 +124150,7 @@ var PRINT_FLAGS, SUBSCRIPTION_PIN_FLAG = "--claude-subscription-pin", PRINT_CHIL
123875
124150
  var init_run_prompt_claude_code = __esm(() => {
123876
124151
  init_claude_runner();
123877
124152
  init_config();
124153
+ init_harness_gateway();
123878
124154
  init_host_routing_env();
123879
124155
  init_claude_launch();
123880
124156
  init_child_env();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudish",
3
- "version": "14.24.0",
3
+ "version": "14.25.0",
4
4
  "description": "Run Claude Code with any model - OpenRouter, Ollama, LM Studio & local models",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -74,10 +74,10 @@
74
74
  "ai"
75
75
  ],
76
76
  "optionalDependencies": {
77
- "@claudish/magmux-darwin-arm64": "14.24.0",
78
- "@claudish/magmux-darwin-x64": "14.24.0",
79
- "@claudish/magmux-linux-arm64": "14.24.0",
80
- "@claudish/magmux-linux-x64": "14.24.0"
77
+ "@claudish/magmux-darwin-arm64": "14.25.0",
78
+ "@claudish/magmux-darwin-x64": "14.25.0",
79
+ "@claudish/magmux-linux-arm64": "14.25.0",
80
+ "@claudish/magmux-linux-x64": "14.25.0"
81
81
  },
82
82
  "author": "Jack Rudenko <i@madappgang.com>",
83
83
  "license": "MIT",