@cortexkit/opencode-antigravity-auth 3.0.0 → 3.0.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.
- package/README.md +5 -3
- package/dist/cli.js +38 -33
- package/dist/cli.js.map +2 -2
- package/dist/cli.meta.json +33 -12
- package/dist/index.js +339 -67
- package/dist/index.js.map +4 -4
- package/dist/index.meta.json +49 -20
- package/dist/server.js +339 -67
- package/dist/server.js.map +4 -4
- package/dist/server.meta.json +49 -20
- package/dist/src/plugin/request.d.ts.map +1 -1
- package/dist/src/plugin/request.js +39 -5
- package/dist/src/plugin/request.js.map +1 -1
- package/dist/src/plugin/shared/request-services.d.ts.map +1 -1
- package/dist/src/plugin/shared/request-services.js +13 -4
- package/dist/src/plugin/shared/request-services.js.map +1 -1
- package/dist/types/src/plugin/request.d.ts.map +1 -1
- package/dist/types/src/plugin/shared/request-services.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -14082,7 +14082,8 @@ function jsonBytes(bytes) {
|
|
|
14082
14082
|
}
|
|
14083
14083
|
async function syncFile(path5) {
|
|
14084
14084
|
await secureRead(path5);
|
|
14085
|
-
const
|
|
14085
|
+
const access = process.platform === "win32" ? constants.O_RDWR : constants.O_RDONLY;
|
|
14086
|
+
const handle = await open(path5, access | constants.O_NOFOLLOW);
|
|
14086
14087
|
try {
|
|
14087
14088
|
await handle.sync();
|
|
14088
14089
|
} finally {
|
|
@@ -17197,8 +17198,8 @@ function createAccountRepositoryFactory(modules, factoryOptions = {}) {
|
|
|
17197
17198
|
|
|
17198
17199
|
// ../core/dist/fingerprint.js
|
|
17199
17200
|
import * as crypto from "node:crypto";
|
|
17200
|
-
var AGY_CLI_VERSION = "1.
|
|
17201
|
-
var AGY_CLI_CHANGE_LIST = "
|
|
17201
|
+
var AGY_CLI_VERSION = "1.3.3";
|
|
17202
|
+
var AGY_CLI_CHANGE_LIST = "996823801";
|
|
17202
17203
|
var ANTIGRAVITY_API_CLIENT = "antigravity-cli";
|
|
17203
17204
|
var MAX_FINGERPRINT_HISTORY = 5;
|
|
17204
17205
|
function normalizeHarnessPlatform(platform = process.platform) {
|
|
@@ -17270,7 +17271,7 @@ function buildFingerprintHeaders(fingerprint) {
|
|
|
17270
17271
|
return {};
|
|
17271
17272
|
}
|
|
17272
17273
|
return {
|
|
17273
|
-
"User-Agent":
|
|
17274
|
+
"User-Agent": buildAntigravityHarnessUserAgent()
|
|
17274
17275
|
};
|
|
17275
17276
|
}
|
|
17276
17277
|
var sessionFingerprint = null;
|
|
@@ -17301,7 +17302,227 @@ function defineModel(id, model) {
|
|
|
17301
17302
|
...model
|
|
17302
17303
|
};
|
|
17303
17304
|
}
|
|
17305
|
+
var AGY_NATIVE_MODEL_DEFINITIONS = {
|
|
17306
|
+
"gemini-3.8-flash-high": {
|
|
17307
|
+
displayName: "Gemini 3.8 Flash (High)",
|
|
17308
|
+
maxTokens: 1048576,
|
|
17309
|
+
maxOutputTokens: 65536,
|
|
17310
|
+
model: "MODEL_PLACEHOLDER_M318",
|
|
17311
|
+
thinkingBudget: -1,
|
|
17312
|
+
supportsThinking: true
|
|
17313
|
+
},
|
|
17314
|
+
"gemini-3.8-flash-medium": {
|
|
17315
|
+
displayName: "Gemini 3.8 Flash (Medium)",
|
|
17316
|
+
maxTokens: 1048576,
|
|
17317
|
+
maxOutputTokens: 65536,
|
|
17318
|
+
model: "MODEL_PLACEHOLDER_M319",
|
|
17319
|
+
thinkingBudget: 4e3,
|
|
17320
|
+
supportsThinking: true
|
|
17321
|
+
},
|
|
17322
|
+
"gemini-3.8-flash-low": {
|
|
17323
|
+
displayName: "Gemini 3.8 Flash (Low)",
|
|
17324
|
+
maxTokens: 1048576,
|
|
17325
|
+
maxOutputTokens: 65536,
|
|
17326
|
+
model: "MODEL_PLACEHOLDER_M320",
|
|
17327
|
+
thinkingBudget: 1e3,
|
|
17328
|
+
supportsThinking: true
|
|
17329
|
+
},
|
|
17330
|
+
"gemini-3.7-flash-high": {
|
|
17331
|
+
displayName: "Gemini 3.7 Flash (High)",
|
|
17332
|
+
maxTokens: 1048576,
|
|
17333
|
+
maxOutputTokens: 65536,
|
|
17334
|
+
model: "MODEL_PLACEHOLDER_M298",
|
|
17335
|
+
thinkingBudget: -1,
|
|
17336
|
+
supportsThinking: true
|
|
17337
|
+
},
|
|
17338
|
+
"gemini-3.7-flash-medium": {
|
|
17339
|
+
displayName: "Gemini 3.7 Flash (Medium)",
|
|
17340
|
+
maxTokens: 1048576,
|
|
17341
|
+
maxOutputTokens: 65536,
|
|
17342
|
+
model: "MODEL_PLACEHOLDER_M299",
|
|
17343
|
+
thinkingBudget: 4e3,
|
|
17344
|
+
supportsThinking: true
|
|
17345
|
+
},
|
|
17346
|
+
"gemini-3.7-flash-low": {
|
|
17347
|
+
displayName: "Gemini 3.7 Flash (Low)",
|
|
17348
|
+
maxTokens: 1048576,
|
|
17349
|
+
maxOutputTokens: 65536,
|
|
17350
|
+
model: "MODEL_PLACEHOLDER_M300",
|
|
17351
|
+
thinkingBudget: 1e3,
|
|
17352
|
+
supportsThinking: true
|
|
17353
|
+
},
|
|
17354
|
+
"gemini-3.6-flash-high": {
|
|
17355
|
+
displayName: "Gemini 3.6 Flash (High)",
|
|
17356
|
+
maxTokens: 1048576,
|
|
17357
|
+
maxOutputTokens: 65536,
|
|
17358
|
+
model: "MODEL_PLACEHOLDER_M71",
|
|
17359
|
+
thinkingBudget: -1,
|
|
17360
|
+
supportsThinking: true
|
|
17361
|
+
},
|
|
17362
|
+
"gemini-3.6-flash-medium": {
|
|
17363
|
+
displayName: "Gemini 3.6 Flash (Medium)",
|
|
17364
|
+
maxTokens: 1048576,
|
|
17365
|
+
maxOutputTokens: 65536,
|
|
17366
|
+
model: "MODEL_PLACEHOLDER_M72",
|
|
17367
|
+
thinkingBudget: 4e3,
|
|
17368
|
+
supportsThinking: true
|
|
17369
|
+
},
|
|
17370
|
+
"gemini-3.6-flash-low": {
|
|
17371
|
+
displayName: "Gemini 3.6 Flash (Low)",
|
|
17372
|
+
maxTokens: 1048576,
|
|
17373
|
+
maxOutputTokens: 65536,
|
|
17374
|
+
model: "MODEL_PLACEHOLDER_M73",
|
|
17375
|
+
thinkingBudget: 1e3,
|
|
17376
|
+
supportsThinking: true
|
|
17377
|
+
},
|
|
17378
|
+
"gemini-3.1-pro-high": {
|
|
17379
|
+
displayName: "Gemini 3.1 Pro (High)",
|
|
17380
|
+
maxTokens: 1048576,
|
|
17381
|
+
maxOutputTokens: 65535,
|
|
17382
|
+
model: "MODEL_PLACEHOLDER_M37",
|
|
17383
|
+
thinkingBudget: 10001,
|
|
17384
|
+
supportsThinking: true
|
|
17385
|
+
},
|
|
17386
|
+
"gemini-3.1-pro-low": {
|
|
17387
|
+
displayName: "Gemini 3.1 Pro (Low)",
|
|
17388
|
+
maxTokens: 1048576,
|
|
17389
|
+
maxOutputTokens: 65535,
|
|
17390
|
+
model: "MODEL_PLACEHOLDER_M36",
|
|
17391
|
+
thinkingBudget: 1001,
|
|
17392
|
+
supportsThinking: true
|
|
17393
|
+
},
|
|
17394
|
+
"claude-opus-5-5-low": {
|
|
17395
|
+
displayName: "Claude Opus 5.5 (Low)",
|
|
17396
|
+
maxTokens: 1e6,
|
|
17397
|
+
maxOutputTokens: 128e3,
|
|
17398
|
+
model: "MODEL_PLACEHOLDER_M400",
|
|
17399
|
+
thinkingLevel: 1,
|
|
17400
|
+
supportsThinking: true,
|
|
17401
|
+
supportsAdaptiveThinking: true,
|
|
17402
|
+
vertexModelId: "claude-opus-5-5@default"
|
|
17403
|
+
},
|
|
17404
|
+
"claude-opus-5-5-medium": {
|
|
17405
|
+
displayName: "Claude Opus 5.5 (Medium)",
|
|
17406
|
+
maxTokens: 1e6,
|
|
17407
|
+
maxOutputTokens: 128e3,
|
|
17408
|
+
model: "MODEL_PLACEHOLDER_M401",
|
|
17409
|
+
thinkingLevel: 2,
|
|
17410
|
+
supportsThinking: true,
|
|
17411
|
+
supportsAdaptiveThinking: true,
|
|
17412
|
+
vertexModelId: "claude-opus-5-5@default"
|
|
17413
|
+
},
|
|
17414
|
+
"claude-opus-5-5-high": {
|
|
17415
|
+
displayName: "Claude Opus 5.5 (High)",
|
|
17416
|
+
maxTokens: 1e6,
|
|
17417
|
+
maxOutputTokens: 128e3,
|
|
17418
|
+
model: "MODEL_PLACEHOLDER_M402",
|
|
17419
|
+
thinkingLevel: 3,
|
|
17420
|
+
supportsThinking: true,
|
|
17421
|
+
supportsAdaptiveThinking: true,
|
|
17422
|
+
vertexModelId: "claude-opus-5-5@default"
|
|
17423
|
+
},
|
|
17424
|
+
"claude-sonnet-5-5-low": {
|
|
17425
|
+
displayName: "Claude Sonnet 5.5 (Low)",
|
|
17426
|
+
maxTokens: 1e6,
|
|
17427
|
+
maxOutputTokens: 128e3,
|
|
17428
|
+
model: "MODEL_PLACEHOLDER_M403",
|
|
17429
|
+
thinkingLevel: 1,
|
|
17430
|
+
supportsThinking: true,
|
|
17431
|
+
supportsAdaptiveThinking: true,
|
|
17432
|
+
vertexModelId: "claude-sonnet-5-5@default"
|
|
17433
|
+
},
|
|
17434
|
+
"claude-sonnet-5-5-medium": {
|
|
17435
|
+
displayName: "Claude Sonnet 5.5 (Medium)",
|
|
17436
|
+
maxTokens: 1e6,
|
|
17437
|
+
maxOutputTokens: 128e3,
|
|
17438
|
+
model: "MODEL_PLACEHOLDER_M404",
|
|
17439
|
+
thinkingLevel: 2,
|
|
17440
|
+
supportsThinking: true,
|
|
17441
|
+
supportsAdaptiveThinking: true,
|
|
17442
|
+
vertexModelId: "claude-sonnet-5-5@default"
|
|
17443
|
+
},
|
|
17444
|
+
"claude-sonnet-5-5-high": {
|
|
17445
|
+
displayName: "Claude Sonnet 5.5 (High)",
|
|
17446
|
+
maxTokens: 1e6,
|
|
17447
|
+
maxOutputTokens: 128e3,
|
|
17448
|
+
model: "MODEL_PLACEHOLDER_M405",
|
|
17449
|
+
thinkingLevel: 3,
|
|
17450
|
+
supportsThinking: true,
|
|
17451
|
+
supportsAdaptiveThinking: true,
|
|
17452
|
+
vertexModelId: "claude-sonnet-5-5@default"
|
|
17453
|
+
},
|
|
17454
|
+
"gpt-oss-120b-medium": {
|
|
17455
|
+
displayName: "GPT-OSS 120B (Medium)",
|
|
17456
|
+
maxTokens: 131072,
|
|
17457
|
+
maxOutputTokens: 32768,
|
|
17458
|
+
model: "MODEL_OPENAI_GPT_OSS_120B_MEDIUM",
|
|
17459
|
+
thinkingBudget: 8192,
|
|
17460
|
+
supportsThinking: true,
|
|
17461
|
+
vertexModelId: "openai/gpt-oss-120b-maas"
|
|
17462
|
+
},
|
|
17463
|
+
"gemini-3.5-flash-extra-low": {
|
|
17464
|
+
displayName: "Gemini 3.5 Flash (Low)",
|
|
17465
|
+
maxTokens: 1048576,
|
|
17466
|
+
maxOutputTokens: 65536,
|
|
17467
|
+
model: "MODEL_PLACEHOLDER_M187",
|
|
17468
|
+
thinkingBudget: 1e3,
|
|
17469
|
+
supportsThinking: true
|
|
17470
|
+
},
|
|
17471
|
+
"gemini-3.5-flash-low": {
|
|
17472
|
+
displayName: "Gemini 3.5 Flash (Medium)",
|
|
17473
|
+
maxTokens: 1048576,
|
|
17474
|
+
maxOutputTokens: 65536,
|
|
17475
|
+
model: "MODEL_PLACEHOLDER_M20",
|
|
17476
|
+
thinkingBudget: 4e3,
|
|
17477
|
+
supportsThinking: true
|
|
17478
|
+
},
|
|
17479
|
+
"gemini-3-flash-agent": {
|
|
17480
|
+
displayName: "Gemini 3.5 Flash (High)",
|
|
17481
|
+
maxTokens: 1048576,
|
|
17482
|
+
maxOutputTokens: 65536,
|
|
17483
|
+
model: "MODEL_PLACEHOLDER_M84",
|
|
17484
|
+
thinkingBudget: -1,
|
|
17485
|
+
supportsThinking: true
|
|
17486
|
+
},
|
|
17487
|
+
"gemini-3.1-flash-image": {
|
|
17488
|
+
displayName: "Gemini 3.1 Flash Image",
|
|
17489
|
+
model: "MODEL_PLACEHOLDER_M21"
|
|
17490
|
+
},
|
|
17491
|
+
"gemini-pro-agent": {
|
|
17492
|
+
displayName: "Gemini 3.1 Pro (High)",
|
|
17493
|
+
maxTokens: 1048576,
|
|
17494
|
+
maxOutputTokens: 65535,
|
|
17495
|
+
model: "MODEL_PLACEHOLDER_M16",
|
|
17496
|
+
thinkingBudget: 10001,
|
|
17497
|
+
supportsThinking: true
|
|
17498
|
+
}
|
|
17499
|
+
};
|
|
17500
|
+
function getAgyNativeModel(model) {
|
|
17501
|
+
return AGY_NATIVE_MODEL_DEFINITIONS[model.toLowerCase()];
|
|
17502
|
+
}
|
|
17503
|
+
var RETIRED_AGY_MODEL_MESSAGE = "This Antigravity model is no longer offered. Choose another model.";
|
|
17504
|
+
function isRetiredAgyModel(model) {
|
|
17505
|
+
const route = model.toLowerCase().replace(/^antigravity-/, "").replace(/^gemini-(?=claude-)/, "");
|
|
17506
|
+
return /^claude-(opus|sonnet)-4-6(?:-thinking)?(?:-(?:minimal|low|medium|high))?$/.test(route) && getAgyNativeModel(route) === void 0;
|
|
17507
|
+
}
|
|
17304
17508
|
var ALL_MODEL_DEFINITIONS = {
|
|
17509
|
+
"antigravity-gemini-3.5-flash": defineModel("antigravity-gemini-3.5-flash", {
|
|
17510
|
+
name: "Gemini 3.5 Flash (Antigravity)",
|
|
17511
|
+
reasoning: true,
|
|
17512
|
+
limit: { context: 1048576, output: 65536 },
|
|
17513
|
+
modalities: DEFAULT_MODALITIES,
|
|
17514
|
+
variants: {
|
|
17515
|
+
low: { thinkingLevel: "low" },
|
|
17516
|
+
medium: { thinkingLevel: "medium" },
|
|
17517
|
+
high: { thinkingLevel: "high" }
|
|
17518
|
+
}
|
|
17519
|
+
}),
|
|
17520
|
+
"antigravity-gemini-3.1-flash-image": defineModel("antigravity-gemini-3.1-flash-image", {
|
|
17521
|
+
name: "Gemini 3.1 Flash Image (Antigravity)",
|
|
17522
|
+
reasoning: false,
|
|
17523
|
+
limit: { context: 66e3, output: 33e3 },
|
|
17524
|
+
modalities: { input: ["text", "image"], output: ["text", "image"] }
|
|
17525
|
+
}),
|
|
17305
17526
|
"antigravity-gemini-3.1-pro": defineModel("antigravity-gemini-3.1-pro", {
|
|
17306
17527
|
name: "Gemini 3.1 Pro (Antigravity)",
|
|
17307
17528
|
reasoning: true,
|
|
@@ -17319,6 +17540,7 @@ var ALL_MODEL_DEFINITIONS = {
|
|
|
17319
17540
|
modalities: DEFAULT_MODALITIES,
|
|
17320
17541
|
variants: {
|
|
17321
17542
|
low: { thinkingLevel: "low" },
|
|
17543
|
+
medium: { thinkingLevel: "medium" },
|
|
17322
17544
|
high: { thinkingLevel: "high" }
|
|
17323
17545
|
}
|
|
17324
17546
|
}),
|
|
@@ -17329,6 +17551,7 @@ var ALL_MODEL_DEFINITIONS = {
|
|
|
17329
17551
|
modalities: DEFAULT_MODALITIES,
|
|
17330
17552
|
variants: {
|
|
17331
17553
|
low: { thinkingLevel: "low" },
|
|
17554
|
+
medium: { thinkingLevel: "medium" },
|
|
17332
17555
|
high: { thinkingLevel: "high" }
|
|
17333
17556
|
}
|
|
17334
17557
|
}),
|
|
@@ -17339,46 +17562,30 @@ var ALL_MODEL_DEFINITIONS = {
|
|
|
17339
17562
|
modalities: DEFAULT_MODALITIES,
|
|
17340
17563
|
variants: {
|
|
17341
17564
|
low: { thinkingLevel: "low" },
|
|
17565
|
+
medium: { thinkingLevel: "medium" },
|
|
17342
17566
|
high: { thinkingLevel: "high" }
|
|
17343
17567
|
}
|
|
17344
17568
|
}),
|
|
17345
|
-
"antigravity-
|
|
17346
|
-
name: "
|
|
17569
|
+
"antigravity-claude-sonnet-5-5": defineModel("antigravity-claude-sonnet-5-5", {
|
|
17570
|
+
name: "Claude Sonnet 5.5 (Antigravity)",
|
|
17347
17571
|
reasoning: true,
|
|
17348
|
-
limit: { context:
|
|
17572
|
+
limit: { context: 1e6, output: 128e3 },
|
|
17349
17573
|
modalities: DEFAULT_MODALITIES,
|
|
17350
17574
|
variants: {
|
|
17351
17575
|
low: { thinkingLevel: "low" },
|
|
17576
|
+
medium: { thinkingLevel: "medium" },
|
|
17352
17577
|
high: { thinkingLevel: "high" }
|
|
17353
17578
|
}
|
|
17354
17579
|
}),
|
|
17355
|
-
"antigravity-claude-
|
|
17356
|
-
name: "Claude
|
|
17580
|
+
"antigravity-claude-opus-5-5": defineModel("antigravity-claude-opus-5-5", {
|
|
17581
|
+
name: "Claude Opus 5.5 (Antigravity)",
|
|
17357
17582
|
reasoning: true,
|
|
17358
|
-
limit: { context:
|
|
17583
|
+
limit: { context: 1e6, output: 128e3 },
|
|
17359
17584
|
modalities: DEFAULT_MODALITIES,
|
|
17360
17585
|
variants: {
|
|
17361
|
-
low: {
|
|
17362
|
-
|
|
17363
|
-
|
|
17364
|
-
}),
|
|
17365
|
-
"antigravity-claude-opus-4-6-thinking": defineModel("antigravity-claude-opus-4-6-thinking", {
|
|
17366
|
-
name: "Claude Opus 4.6 Thinking (Antigravity)",
|
|
17367
|
-
reasoning: true,
|
|
17368
|
-
limit: { context: 25e4, output: 64e3 },
|
|
17369
|
-
modalities: DEFAULT_MODALITIES,
|
|
17370
|
-
variants: {
|
|
17371
|
-
low: { disabled: true },
|
|
17372
|
-
high: { disabled: true }
|
|
17373
|
-
}
|
|
17374
|
-
}),
|
|
17375
|
-
"antigravity-gemini-3.1-flash-image": defineModel("antigravity-gemini-3.1-flash-image", {
|
|
17376
|
-
name: "Gemini 3.1 Flash Image (Antigravity)",
|
|
17377
|
-
reasoning: false,
|
|
17378
|
-
limit: { context: 66e3, output: 33e3 },
|
|
17379
|
-
modalities: {
|
|
17380
|
-
input: ["text", "image"],
|
|
17381
|
-
output: ["text", "image"]
|
|
17586
|
+
low: { thinkingLevel: "low" },
|
|
17587
|
+
medium: { thinkingLevel: "medium" },
|
|
17588
|
+
high: { thinkingLevel: "high" }
|
|
17382
17589
|
}
|
|
17383
17590
|
}),
|
|
17384
17591
|
"antigravity-gpt-oss-120b-medium": defineModel("antigravity-gpt-oss-120b-medium", {
|
|
@@ -17460,6 +17667,7 @@ var RESOLVER_ALIASES = {
|
|
|
17460
17667
|
"gemini-3.8-flash-low": "gemini-3.8-flash",
|
|
17461
17668
|
"gemini-3.8-flash-medium": "gemini-3.8-flash",
|
|
17462
17669
|
"gemini-3.8-flash-high": "gemini-3.8-flash",
|
|
17670
|
+
// Historical parsing does not authorize serving: admission rejects retired routes.
|
|
17463
17671
|
"gemini-claude-opus-4-6-thinking-low": "claude-opus-4-6-thinking",
|
|
17464
17672
|
"gemini-claude-opus-4-6-thinking-medium": "claude-opus-4-6-thinking",
|
|
17465
17673
|
"gemini-claude-opus-4-6-thinking-high": "claude-opus-4-6-thinking",
|
|
@@ -17542,10 +17750,10 @@ var ANTIGRAVITY_OPENCODE_MODEL_IDS = [
|
|
|
17542
17750
|
"antigravity-gemini-3.7-flash",
|
|
17543
17751
|
"antigravity-gemini-3.6-flash",
|
|
17544
17752
|
"antigravity-gemini-3.5-flash",
|
|
17545
|
-
"antigravity-gemini-3.1-pro",
|
|
17546
|
-
"antigravity-claude-sonnet-4-6-thinking",
|
|
17547
|
-
"antigravity-claude-opus-4-6-thinking",
|
|
17548
17753
|
"antigravity-gemini-3.1-flash-image",
|
|
17754
|
+
"antigravity-gemini-3.1-pro",
|
|
17755
|
+
"antigravity-claude-sonnet-5-5",
|
|
17756
|
+
"antigravity-claude-opus-5-5",
|
|
17549
17757
|
"antigravity-gpt-oss-120b-medium"
|
|
17550
17758
|
];
|
|
17551
17759
|
function pickModelDefinitions(ids) {
|
|
@@ -21440,26 +21648,6 @@ var AGY_REQUEST_FIELD_ORDER = [
|
|
|
21440
21648
|
"generationConfig",
|
|
21441
21649
|
"sessionId"
|
|
21442
21650
|
];
|
|
21443
|
-
var AGY_MODEL_ENUM_BY_WIRE_MODEL = {
|
|
21444
|
-
"gemini-3.5-flash-extra-low": "MODEL_PLACEHOLDER_M187",
|
|
21445
|
-
"gemini-3.5-flash-low": "MODEL_PLACEHOLDER_M20",
|
|
21446
|
-
"gemini-3-flash-agent": "MODEL_PLACEHOLDER_M84",
|
|
21447
|
-
"gemini-3.6-flash-low": "MODEL_PLACEHOLDER_M73",
|
|
21448
|
-
"gemini-3.6-flash-medium": "MODEL_PLACEHOLDER_M72",
|
|
21449
|
-
"gemini-3.6-flash-high": "MODEL_PLACEHOLDER_M71",
|
|
21450
|
-
"gemini-3.7-flash-low": "MODEL_PLACEHOLDER_M300",
|
|
21451
|
-
"gemini-3.7-flash-medium": "MODEL_PLACEHOLDER_M299",
|
|
21452
|
-
"gemini-3.7-flash-high": "MODEL_PLACEHOLDER_M298",
|
|
21453
|
-
"gemini-3.8-flash-low": "MODEL_PLACEHOLDER_M320",
|
|
21454
|
-
"gemini-3.8-flash-medium": "MODEL_PLACEHOLDER_M319",
|
|
21455
|
-
"gemini-3.8-flash-high": "MODEL_PLACEHOLDER_M318",
|
|
21456
|
-
"gemini-3.1-pro-low": "MODEL_PLACEHOLDER_M36",
|
|
21457
|
-
"gemini-pro-agent": "MODEL_PLACEHOLDER_M16",
|
|
21458
|
-
"claude-sonnet-4-6": "MODEL_PLACEHOLDER_M35",
|
|
21459
|
-
"claude-opus-4-6-thinking": "MODEL_PLACEHOLDER_M26",
|
|
21460
|
-
"gemini-3.1-flash-image": "MODEL_PLACEHOLDER_M21",
|
|
21461
|
-
"gpt-oss-120b-medium": "MODEL_OPENAI_GPT_OSS_120B_MEDIUM"
|
|
21462
|
-
};
|
|
21463
21651
|
function fnv1a64Signed(input2) {
|
|
21464
21652
|
let hash2 = FNV1A_64_OFFSET_BASIS;
|
|
21465
21653
|
for (const byte of Buffer2.from(input2, "utf8")) {
|
|
@@ -21551,8 +21739,13 @@ var AgyRequestSessionStore = class {
|
|
|
21551
21739
|
}
|
|
21552
21740
|
}
|
|
21553
21741
|
};
|
|
21742
|
+
var HISTORICAL_AGY_MODEL_ENUMS = {
|
|
21743
|
+
"claude-sonnet-4-6": "MODEL_PLACEHOLDER_M35",
|
|
21744
|
+
"claude-opus-4-6-thinking": "MODEL_PLACEHOLDER_M26"
|
|
21745
|
+
};
|
|
21554
21746
|
function getAgyModelEnum(model) {
|
|
21555
|
-
|
|
21747
|
+
const lower = model.toLowerCase();
|
|
21748
|
+
return getAgyNativeModel(lower)?.model ?? HISTORICAL_AGY_MODEL_ENUMS[lower];
|
|
21556
21749
|
}
|
|
21557
21750
|
function orderAgyRequestPayloadInPlace(payload) {
|
|
21558
21751
|
const ordered = {};
|
|
@@ -23972,6 +24165,30 @@ async function defaultTransport(url, init, options) {
|
|
|
23972
24165
|
return fetchWithActiveTimeout(url, init, { timeoutMs: options.timeoutMs });
|
|
23973
24166
|
}
|
|
23974
24167
|
|
|
24168
|
+
// ../core/dist/transform/agy-generation.js
|
|
24169
|
+
var ADAPTIVE_LEVELS = {
|
|
24170
|
+
1: "LOW",
|
|
24171
|
+
2: "MEDIUM",
|
|
24172
|
+
3: "HIGH"
|
|
24173
|
+
};
|
|
24174
|
+
function applyAgyNativeGenerationConfig(wireModel, generationConfig) {
|
|
24175
|
+
const native = getAgyNativeModel(wireModel);
|
|
24176
|
+
if (!native)
|
|
24177
|
+
return;
|
|
24178
|
+
const output2 = generationConfig.max_output_tokens ?? native.maxOutputTokens;
|
|
24179
|
+
if (generationConfig.maxOutputTokens === void 0 && output2 !== void 0) {
|
|
24180
|
+
generationConfig.maxOutputTokens = output2;
|
|
24181
|
+
}
|
|
24182
|
+
delete generationConfig.max_output_tokens;
|
|
24183
|
+
if (native.supportsAdaptiveThinking && native.thinkingLevel !== void 0) {
|
|
24184
|
+
generationConfig.thinkingConfig = {
|
|
24185
|
+
includeThoughts: true,
|
|
24186
|
+
thinkingBudget: 0,
|
|
24187
|
+
thinkingLevel: ADAPTIVE_LEVELS[native.thinkingLevel]
|
|
24188
|
+
};
|
|
24189
|
+
}
|
|
24190
|
+
}
|
|
24191
|
+
|
|
23975
24192
|
// ../core/dist/transform/claude.js
|
|
23976
24193
|
var CLAUDE_THINKING_MAX_OUTPUT_TOKENS = 64e3;
|
|
23977
24194
|
function computeClaudeMaxOutputTokens(thinkingBudget) {
|
|
@@ -23986,7 +24203,7 @@ function isClaudeModel(model) {
|
|
|
23986
24203
|
}
|
|
23987
24204
|
function isClaudeThinkingModel(model) {
|
|
23988
24205
|
const lower = model.toLowerCase();
|
|
23989
|
-
return lower.includes("claude") && (lower.includes("thinking") || lower.endsWith("claude-sonnet-4-6"));
|
|
24206
|
+
return lower.includes("claude") && (lower.includes("thinking") || lower.endsWith("claude-sonnet-4-6") || /claude-(opus|sonnet)-5-5(?:-(low|medium|high))?$/.test(lower));
|
|
23990
24207
|
}
|
|
23991
24208
|
function appendClaudeThinkingHint(payload, hint = CLAUDE_INTERLEAVED_THINKING_HINT) {
|
|
23992
24209
|
const existing = payload.systemInstruction;
|
|
@@ -24487,7 +24704,7 @@ var GEMINI_3_FLASH_REGEX = /^gemini-3(?:\.\d+)?-flash/i;
|
|
|
24487
24704
|
var IMAGE_GENERATION_MODELS = /image|imagen/i;
|
|
24488
24705
|
function supportsThinkingTiers(model) {
|
|
24489
24706
|
const lower = model.toLowerCase();
|
|
24490
|
-
return lower.includes("gemini-3") || lower.includes("gemini-2.5") || lower.includes("claude") && lower.includes("thinking");
|
|
24707
|
+
return lower.includes("gemini-3") || lower.includes("gemini-2.5") || lower.includes("claude") && (lower.includes("thinking") || /^claude-(opus|sonnet)-5-5/.test(lower));
|
|
24491
24708
|
}
|
|
24492
24709
|
function extractThinkingTierFromModel(model) {
|
|
24493
24710
|
if (!supportsThinkingTiers(model)) {
|
|
@@ -24524,7 +24741,7 @@ function isGemini35FlashModel(model) {
|
|
|
24524
24741
|
function resolveGemini35FlashAntigravityModel(tier) {
|
|
24525
24742
|
return getGemini35FlashAntigravityModel(tier);
|
|
24526
24743
|
}
|
|
24527
|
-
function getAgyGeminiFlashThinkingBudget(tier, highBudget =
|
|
24744
|
+
function getAgyGeminiFlashThinkingBudget(tier, highBudget = -1) {
|
|
24528
24745
|
switch (tier) {
|
|
24529
24746
|
case "low":
|
|
24530
24747
|
return 1e3;
|
|
@@ -24535,7 +24752,7 @@ function getAgyGeminiFlashThinkingBudget(tier, highBudget = 1e4) {
|
|
|
24535
24752
|
}
|
|
24536
24753
|
}
|
|
24537
24754
|
function getAgyGemini31ProModel(tier) {
|
|
24538
|
-
return tier === "high" ? "gemini-pro-
|
|
24755
|
+
return tier === "high" ? "gemini-3.1-pro-high" : "gemini-3.1-pro-low";
|
|
24539
24756
|
}
|
|
24540
24757
|
function getAgyGemini31ProThinkingBudget(tier) {
|
|
24541
24758
|
return tier === "high" ? 10001 : 1001;
|
|
@@ -24550,6 +24767,29 @@ function resolveModelWithTier(requestedModel, options = {}) {
|
|
|
24550
24767
|
const preferGeminiCli = options.cli_first === true && !isAntigravity && !isImageModel && !isClaudeModel2;
|
|
24551
24768
|
const quotaPreference = preferGeminiCli ? "gemini-cli" : "antigravity";
|
|
24552
24769
|
const explicitQuota = isAntigravity || isImageModel;
|
|
24770
|
+
const native = getAgyNativeModel(modelWithoutQuota);
|
|
24771
|
+
const groupedGemini35Tier = isAntigravity && /^gemini-3\.5-flash-(low|medium|high)$/i.test(modelWithoutQuota);
|
|
24772
|
+
if (native && quotaPreference === "antigravity" && !groupedGemini35Tier) {
|
|
24773
|
+
return {
|
|
24774
|
+
actualModel: modelWithoutQuota,
|
|
24775
|
+
thinkingBudget: native.supportsAdaptiveThinking ? 0 : native.thinkingBudget,
|
|
24776
|
+
isThinkingModel: native.supportsThinking ?? false,
|
|
24777
|
+
...isImageModel ? { isImageModel: true } : {},
|
|
24778
|
+
tier,
|
|
24779
|
+
quotaPreference,
|
|
24780
|
+
explicitQuota
|
|
24781
|
+
};
|
|
24782
|
+
}
|
|
24783
|
+
if (/^claude-(opus|sonnet)-5-5$/i.test(modelWithoutQuota)) {
|
|
24784
|
+
return {
|
|
24785
|
+
actualModel: `${modelWithoutQuota}-low`,
|
|
24786
|
+
thinkingBudget: 0,
|
|
24787
|
+
isThinkingModel: true,
|
|
24788
|
+
tier: "low",
|
|
24789
|
+
quotaPreference,
|
|
24790
|
+
explicitQuota
|
|
24791
|
+
};
|
|
24792
|
+
}
|
|
24553
24793
|
const isGemini3 = modelWithoutQuota.toLowerCase().startsWith("gemini-3");
|
|
24554
24794
|
const skipAlias = isAntigravity && isGemini3;
|
|
24555
24795
|
const isGemini3Pro = isGemini3ProModel(modelWithoutQuota);
|
|
@@ -24583,7 +24823,7 @@ function resolveModelWithTier(requestedModel, options = {}) {
|
|
|
24583
24823
|
if (isGemini36Flash && quotaPreference === "antigravity") {
|
|
24584
24824
|
return {
|
|
24585
24825
|
actualModel: getGemini36FlashAntigravityModel(tier ?? "medium"),
|
|
24586
|
-
thinkingBudget: getAgyGeminiFlashThinkingBudget(tier),
|
|
24826
|
+
thinkingBudget: getAgyGeminiFlashThinkingBudget(tier, -1),
|
|
24587
24827
|
tier: tier ?? "medium",
|
|
24588
24828
|
isThinkingModel: true,
|
|
24589
24829
|
quotaPreference,
|
|
@@ -38793,6 +39033,8 @@ function getImageModelLocalTitle(input2, init) {
|
|
|
38793
39033
|
}
|
|
38794
39034
|
}
|
|
38795
39035
|
function getAgyMaxOutputTokens(model) {
|
|
39036
|
+
const native = getAgyNativeModel(model);
|
|
39037
|
+
if (native) return native.maxOutputTokens;
|
|
38796
39038
|
const lower = model.toLowerCase();
|
|
38797
39039
|
if (lower === "gemini-3.5-flash-low" || lower === "gemini-3.5-flash-extra-low" || lower === "gemini-3-flash-agent" || lower === "gemini-3.6-flash-low" || lower === "gemini-3.6-flash-medium" || lower === "gemini-3.6-flash-high" || lower === "gemini-3.7-flash-low" || lower === "gemini-3.7-flash-medium" || lower === "gemini-3.7-flash-high" || lower === "gemini-3.8-flash-low" || lower === "gemini-3.8-flash-medium" || lower === "gemini-3.8-flash-high") {
|
|
38798
39040
|
return 65536;
|
|
@@ -38812,6 +39054,10 @@ function applyAgyGenerationDefaults(model, generationConfig, headerStyle) {
|
|
|
38812
39054
|
if (headerStyle !== "antigravity") {
|
|
38813
39055
|
return;
|
|
38814
39056
|
}
|
|
39057
|
+
if (getAgyNativeModel(model)) {
|
|
39058
|
+
applyAgyNativeGenerationConfig(model, generationConfig);
|
|
39059
|
+
return;
|
|
39060
|
+
}
|
|
38815
39061
|
const maxOutputTokens = getAgyMaxOutputTokens(model);
|
|
38816
39062
|
if (maxOutputTokens !== void 0) {
|
|
38817
39063
|
generationConfig.maxOutputTokens = maxOutputTokens;
|
|
@@ -39717,6 +39963,11 @@ function prepareAntigravityRequestIn(wire, input2, init, accessToken, projectId,
|
|
|
39717
39963
|
const wireRequest = requestObjects.at(-1);
|
|
39718
39964
|
if (wireRequest) {
|
|
39719
39965
|
if (headerStyle === "antigravity") {
|
|
39966
|
+
const generationConfig = wireRequest.generationConfig;
|
|
39967
|
+
const config = generationConfig && typeof generationConfig === "object" && !Array.isArray(generationConfig) ? generationConfig : {};
|
|
39968
|
+
applyAgyNativeGenerationConfig(effectiveModel, config);
|
|
39969
|
+
if (Object.keys(config).length > 0)
|
|
39970
|
+
wireRequest.generationConfig = config;
|
|
39720
39971
|
const metadata = buildAgyAgentRequestMetadata(
|
|
39721
39972
|
options?.agySession ?? DEFAULT_AGY_REQUEST_SESSION,
|
|
39722
39973
|
wireRequest,
|
|
@@ -39752,7 +40003,7 @@ function prepareAntigravityRequestIn(wire, input2, init, accessToken, projectId,
|
|
|
39752
40003
|
`[ThinkingResolution] rawModel=${rawModel} resolvedModel=${effectiveModel} resolvedTier=${tierThinkingLevel ?? "none"} variantLevel=${variantConfig?.thinkingLevel ?? "none"} variantBudget=${variantConfig?.thinkingBudget ?? "none"} providerOptions.google=${JSON.stringify(requestPayload.providerOptions?.google ?? null)} generationConfig.thinkingConfig=${JSON.stringify(rawGenerationConfig?.thinkingConfig ?? null)}`
|
|
39753
40004
|
);
|
|
39754
40005
|
delete requestPayload.providerOptions;
|
|
39755
|
-
if (variantConfig?.thinkingLevel && isGemini3) {
|
|
40006
|
+
if (variantConfig?.thinkingLevel && (isGemini3 || getAgyNativeModel(effectiveModel)?.supportsAdaptiveThinking)) {
|
|
39756
40007
|
const variantModelBase = rawModel.replace(/-preview-customtools$/i, "").replace(/-preview$/i, "").replace(/-(minimal|low|medium|high)$/i, "");
|
|
39757
40008
|
const variantResolved = resolveModelForHeaderStyle(
|
|
39758
40009
|
`${variantModelBase}-${variantConfig.thinkingLevel}`,
|
|
@@ -40179,6 +40430,11 @@ function prepareAntigravityRequestIn(wire, input2, init, accessToken, projectId,
|
|
|
40179
40430
|
stripInjectedDebugFromRequestPayload(requestPayload);
|
|
40180
40431
|
sanitizeRequestPayloadForAntigravity(requestPayload);
|
|
40181
40432
|
if (headerStyle === "antigravity") {
|
|
40433
|
+
const generationConfig = requestPayload.generationConfig;
|
|
40434
|
+
const config = generationConfig && typeof generationConfig === "object" && !Array.isArray(generationConfig) ? generationConfig : {};
|
|
40435
|
+
applyAgyNativeGenerationConfig(effectiveModel, config);
|
|
40436
|
+
if (Object.keys(config).length > 0)
|
|
40437
|
+
requestPayload.generationConfig = config;
|
|
40182
40438
|
stripUnsupportedAntigravityFields(requestPayload);
|
|
40183
40439
|
configureAntigravityToolCalling(requestPayload);
|
|
40184
40440
|
normalizeNativeFunctionResponseRoles(requestPayload);
|
|
@@ -40289,7 +40545,10 @@ function buildThinkingWarmupBody(bodyText, isClaudeThinking) {
|
|
|
40289
40545
|
return null;
|
|
40290
40546
|
}
|
|
40291
40547
|
const warmupPrompt = "Warmup request for thinking signature.";
|
|
40292
|
-
const
|
|
40548
|
+
const candidate = typeof parsed.model === "string" ? parsed.model : "";
|
|
40549
|
+
if (candidate && isRetiredAgyModel(candidate)) return null;
|
|
40550
|
+
const wireModel = candidate || "claude-sonnet-5-5-low";
|
|
40551
|
+
parsed.model = wireModel;
|
|
40293
40552
|
const requestObjects = [];
|
|
40294
40553
|
const updateRequest = (req) => {
|
|
40295
40554
|
req.contents = [{ role: "user", parts: [{ text: warmupPrompt }] }];
|
|
@@ -40300,7 +40559,8 @@ function buildThinkingWarmupBody(bodyText, isClaudeThinking) {
|
|
|
40300
40559
|
includeThoughts: true,
|
|
40301
40560
|
thinkingBudget: AGY_CLAUDE_THINKING_BUDGET
|
|
40302
40561
|
};
|
|
40303
|
-
generationConfig.maxOutputTokens
|
|
40562
|
+
generationConfig.maxOutputTokens ??= generationConfig.max_output_tokens ?? getAgyMaxOutputTokens(wireModel) ?? computeClaudeMaxOutputTokens(AGY_CLAUDE_THINKING_BUDGET);
|
|
40563
|
+
applyAgyNativeGenerationConfig(wireModel, generationConfig);
|
|
40304
40564
|
req.generationConfig = generationConfig;
|
|
40305
40565
|
requestObjects.push(req);
|
|
40306
40566
|
};
|
|
@@ -42850,7 +43110,8 @@ function routeTitleModel(url) {
|
|
|
42850
43110
|
const model = extractModelFromUrl(url);
|
|
42851
43111
|
if (model === null) return url;
|
|
42852
43112
|
const registered = Object.hasOwn(getPublicModelDefinitions(), model) || Object.hasOwn(getResolverAliasMap(), model);
|
|
42853
|
-
if (registered && !isImageGenerationModel(model)
|
|
43113
|
+
if (registered && !isImageGenerationModel(model) && !isRetiredAgyModel(model))
|
|
43114
|
+
return url;
|
|
42854
43115
|
return url.replace(`/models/${model}`, `/models/${TITLE_FALLBACK_MODEL}`);
|
|
42855
43116
|
}
|
|
42856
43117
|
function agyMetadataIdentity(identity, kind) {
|
|
@@ -43052,6 +43313,19 @@ function createRequestExecutor(deps) {
|
|
|
43052
43313
|
if (kind === "title") {
|
|
43053
43314
|
input2 = routeTitleModel(input2);
|
|
43054
43315
|
}
|
|
43316
|
+
const selectedModel = extractModelFromUrl(input2);
|
|
43317
|
+
if (selectedModel && isRetiredAgyModel(selectedModel)) {
|
|
43318
|
+
return new Response(
|
|
43319
|
+
JSON.stringify({
|
|
43320
|
+
error: {
|
|
43321
|
+
code: 412,
|
|
43322
|
+
status: "FAILED_PRECONDITION",
|
|
43323
|
+
message: RETIRED_AGY_MODEL_MESSAGE
|
|
43324
|
+
}
|
|
43325
|
+
}),
|
|
43326
|
+
{ status: 412, headers: { "Content-Type": "application/json" } }
|
|
43327
|
+
);
|
|
43328
|
+
}
|
|
43055
43329
|
const transport = options.transport ?? defaultTransport2;
|
|
43056
43330
|
const requestSessionIdentity = options.session ?? extractOpenCodeSessionIdentity(init?.headers);
|
|
43057
43331
|
const agyRequestScope = agySessionRegistry.beginRequest(
|
|
@@ -43591,9 +43865,7 @@ function createRequestExecutor(deps) {
|
|
|
43591
43865
|
if (!warmupState.trackAttempt(prepared.sessionId)) return;
|
|
43592
43866
|
const warmupBody = wire.buildThinkingWarmupBody(
|
|
43593
43867
|
typeof prepared.init.body === "string" ? prepared.init.body : void 0,
|
|
43594
|
-
|
|
43595
|
-
prepared.effectiveModel?.toLowerCase().includes("claude") && prepared.effectiveModel?.toLowerCase().includes("thinking")
|
|
43596
|
-
)
|
|
43868
|
+
isClaudeThinkingModel(prepared.effectiveModel ?? "")
|
|
43597
43869
|
);
|
|
43598
43870
|
if (!warmupBody) return;
|
|
43599
43871
|
const warmupUrl = toWarmupStreamUrl(prepared.request);
|