@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/server.js
CHANGED
|
@@ -14084,7 +14084,8 @@ function jsonBytes(bytes) {
|
|
|
14084
14084
|
}
|
|
14085
14085
|
async function syncFile(path5) {
|
|
14086
14086
|
await secureRead(path5);
|
|
14087
|
-
const
|
|
14087
|
+
const access = process.platform === "win32" ? constants.O_RDWR : constants.O_RDONLY;
|
|
14088
|
+
const handle = await open(path5, access | constants.O_NOFOLLOW);
|
|
14088
14089
|
try {
|
|
14089
14090
|
await handle.sync();
|
|
14090
14091
|
} finally {
|
|
@@ -17199,8 +17200,8 @@ function createAccountRepositoryFactory(modules, factoryOptions = {}) {
|
|
|
17199
17200
|
|
|
17200
17201
|
// ../core/dist/fingerprint.js
|
|
17201
17202
|
import * as crypto from "node:crypto";
|
|
17202
|
-
var AGY_CLI_VERSION = "1.
|
|
17203
|
-
var AGY_CLI_CHANGE_LIST = "
|
|
17203
|
+
var AGY_CLI_VERSION = "1.3.3";
|
|
17204
|
+
var AGY_CLI_CHANGE_LIST = "996823801";
|
|
17204
17205
|
var ANTIGRAVITY_API_CLIENT = "antigravity-cli";
|
|
17205
17206
|
var MAX_FINGERPRINT_HISTORY = 5;
|
|
17206
17207
|
function normalizeHarnessPlatform(platform = process.platform) {
|
|
@@ -17272,7 +17273,7 @@ function buildFingerprintHeaders(fingerprint) {
|
|
|
17272
17273
|
return {};
|
|
17273
17274
|
}
|
|
17274
17275
|
return {
|
|
17275
|
-
"User-Agent":
|
|
17276
|
+
"User-Agent": buildAntigravityHarnessUserAgent()
|
|
17276
17277
|
};
|
|
17277
17278
|
}
|
|
17278
17279
|
var sessionFingerprint = null;
|
|
@@ -17303,7 +17304,227 @@ function defineModel(id, model) {
|
|
|
17303
17304
|
...model
|
|
17304
17305
|
};
|
|
17305
17306
|
}
|
|
17307
|
+
var AGY_NATIVE_MODEL_DEFINITIONS = {
|
|
17308
|
+
"gemini-3.8-flash-high": {
|
|
17309
|
+
displayName: "Gemini 3.8 Flash (High)",
|
|
17310
|
+
maxTokens: 1048576,
|
|
17311
|
+
maxOutputTokens: 65536,
|
|
17312
|
+
model: "MODEL_PLACEHOLDER_M318",
|
|
17313
|
+
thinkingBudget: -1,
|
|
17314
|
+
supportsThinking: true
|
|
17315
|
+
},
|
|
17316
|
+
"gemini-3.8-flash-medium": {
|
|
17317
|
+
displayName: "Gemini 3.8 Flash (Medium)",
|
|
17318
|
+
maxTokens: 1048576,
|
|
17319
|
+
maxOutputTokens: 65536,
|
|
17320
|
+
model: "MODEL_PLACEHOLDER_M319",
|
|
17321
|
+
thinkingBudget: 4e3,
|
|
17322
|
+
supportsThinking: true
|
|
17323
|
+
},
|
|
17324
|
+
"gemini-3.8-flash-low": {
|
|
17325
|
+
displayName: "Gemini 3.8 Flash (Low)",
|
|
17326
|
+
maxTokens: 1048576,
|
|
17327
|
+
maxOutputTokens: 65536,
|
|
17328
|
+
model: "MODEL_PLACEHOLDER_M320",
|
|
17329
|
+
thinkingBudget: 1e3,
|
|
17330
|
+
supportsThinking: true
|
|
17331
|
+
},
|
|
17332
|
+
"gemini-3.7-flash-high": {
|
|
17333
|
+
displayName: "Gemini 3.7 Flash (High)",
|
|
17334
|
+
maxTokens: 1048576,
|
|
17335
|
+
maxOutputTokens: 65536,
|
|
17336
|
+
model: "MODEL_PLACEHOLDER_M298",
|
|
17337
|
+
thinkingBudget: -1,
|
|
17338
|
+
supportsThinking: true
|
|
17339
|
+
},
|
|
17340
|
+
"gemini-3.7-flash-medium": {
|
|
17341
|
+
displayName: "Gemini 3.7 Flash (Medium)",
|
|
17342
|
+
maxTokens: 1048576,
|
|
17343
|
+
maxOutputTokens: 65536,
|
|
17344
|
+
model: "MODEL_PLACEHOLDER_M299",
|
|
17345
|
+
thinkingBudget: 4e3,
|
|
17346
|
+
supportsThinking: true
|
|
17347
|
+
},
|
|
17348
|
+
"gemini-3.7-flash-low": {
|
|
17349
|
+
displayName: "Gemini 3.7 Flash (Low)",
|
|
17350
|
+
maxTokens: 1048576,
|
|
17351
|
+
maxOutputTokens: 65536,
|
|
17352
|
+
model: "MODEL_PLACEHOLDER_M300",
|
|
17353
|
+
thinkingBudget: 1e3,
|
|
17354
|
+
supportsThinking: true
|
|
17355
|
+
},
|
|
17356
|
+
"gemini-3.6-flash-high": {
|
|
17357
|
+
displayName: "Gemini 3.6 Flash (High)",
|
|
17358
|
+
maxTokens: 1048576,
|
|
17359
|
+
maxOutputTokens: 65536,
|
|
17360
|
+
model: "MODEL_PLACEHOLDER_M71",
|
|
17361
|
+
thinkingBudget: -1,
|
|
17362
|
+
supportsThinking: true
|
|
17363
|
+
},
|
|
17364
|
+
"gemini-3.6-flash-medium": {
|
|
17365
|
+
displayName: "Gemini 3.6 Flash (Medium)",
|
|
17366
|
+
maxTokens: 1048576,
|
|
17367
|
+
maxOutputTokens: 65536,
|
|
17368
|
+
model: "MODEL_PLACEHOLDER_M72",
|
|
17369
|
+
thinkingBudget: 4e3,
|
|
17370
|
+
supportsThinking: true
|
|
17371
|
+
},
|
|
17372
|
+
"gemini-3.6-flash-low": {
|
|
17373
|
+
displayName: "Gemini 3.6 Flash (Low)",
|
|
17374
|
+
maxTokens: 1048576,
|
|
17375
|
+
maxOutputTokens: 65536,
|
|
17376
|
+
model: "MODEL_PLACEHOLDER_M73",
|
|
17377
|
+
thinkingBudget: 1e3,
|
|
17378
|
+
supportsThinking: true
|
|
17379
|
+
},
|
|
17380
|
+
"gemini-3.1-pro-high": {
|
|
17381
|
+
displayName: "Gemini 3.1 Pro (High)",
|
|
17382
|
+
maxTokens: 1048576,
|
|
17383
|
+
maxOutputTokens: 65535,
|
|
17384
|
+
model: "MODEL_PLACEHOLDER_M37",
|
|
17385
|
+
thinkingBudget: 10001,
|
|
17386
|
+
supportsThinking: true
|
|
17387
|
+
},
|
|
17388
|
+
"gemini-3.1-pro-low": {
|
|
17389
|
+
displayName: "Gemini 3.1 Pro (Low)",
|
|
17390
|
+
maxTokens: 1048576,
|
|
17391
|
+
maxOutputTokens: 65535,
|
|
17392
|
+
model: "MODEL_PLACEHOLDER_M36",
|
|
17393
|
+
thinkingBudget: 1001,
|
|
17394
|
+
supportsThinking: true
|
|
17395
|
+
},
|
|
17396
|
+
"claude-opus-5-5-low": {
|
|
17397
|
+
displayName: "Claude Opus 5.5 (Low)",
|
|
17398
|
+
maxTokens: 1e6,
|
|
17399
|
+
maxOutputTokens: 128e3,
|
|
17400
|
+
model: "MODEL_PLACEHOLDER_M400",
|
|
17401
|
+
thinkingLevel: 1,
|
|
17402
|
+
supportsThinking: true,
|
|
17403
|
+
supportsAdaptiveThinking: true,
|
|
17404
|
+
vertexModelId: "claude-opus-5-5@default"
|
|
17405
|
+
},
|
|
17406
|
+
"claude-opus-5-5-medium": {
|
|
17407
|
+
displayName: "Claude Opus 5.5 (Medium)",
|
|
17408
|
+
maxTokens: 1e6,
|
|
17409
|
+
maxOutputTokens: 128e3,
|
|
17410
|
+
model: "MODEL_PLACEHOLDER_M401",
|
|
17411
|
+
thinkingLevel: 2,
|
|
17412
|
+
supportsThinking: true,
|
|
17413
|
+
supportsAdaptiveThinking: true,
|
|
17414
|
+
vertexModelId: "claude-opus-5-5@default"
|
|
17415
|
+
},
|
|
17416
|
+
"claude-opus-5-5-high": {
|
|
17417
|
+
displayName: "Claude Opus 5.5 (High)",
|
|
17418
|
+
maxTokens: 1e6,
|
|
17419
|
+
maxOutputTokens: 128e3,
|
|
17420
|
+
model: "MODEL_PLACEHOLDER_M402",
|
|
17421
|
+
thinkingLevel: 3,
|
|
17422
|
+
supportsThinking: true,
|
|
17423
|
+
supportsAdaptiveThinking: true,
|
|
17424
|
+
vertexModelId: "claude-opus-5-5@default"
|
|
17425
|
+
},
|
|
17426
|
+
"claude-sonnet-5-5-low": {
|
|
17427
|
+
displayName: "Claude Sonnet 5.5 (Low)",
|
|
17428
|
+
maxTokens: 1e6,
|
|
17429
|
+
maxOutputTokens: 128e3,
|
|
17430
|
+
model: "MODEL_PLACEHOLDER_M403",
|
|
17431
|
+
thinkingLevel: 1,
|
|
17432
|
+
supportsThinking: true,
|
|
17433
|
+
supportsAdaptiveThinking: true,
|
|
17434
|
+
vertexModelId: "claude-sonnet-5-5@default"
|
|
17435
|
+
},
|
|
17436
|
+
"claude-sonnet-5-5-medium": {
|
|
17437
|
+
displayName: "Claude Sonnet 5.5 (Medium)",
|
|
17438
|
+
maxTokens: 1e6,
|
|
17439
|
+
maxOutputTokens: 128e3,
|
|
17440
|
+
model: "MODEL_PLACEHOLDER_M404",
|
|
17441
|
+
thinkingLevel: 2,
|
|
17442
|
+
supportsThinking: true,
|
|
17443
|
+
supportsAdaptiveThinking: true,
|
|
17444
|
+
vertexModelId: "claude-sonnet-5-5@default"
|
|
17445
|
+
},
|
|
17446
|
+
"claude-sonnet-5-5-high": {
|
|
17447
|
+
displayName: "Claude Sonnet 5.5 (High)",
|
|
17448
|
+
maxTokens: 1e6,
|
|
17449
|
+
maxOutputTokens: 128e3,
|
|
17450
|
+
model: "MODEL_PLACEHOLDER_M405",
|
|
17451
|
+
thinkingLevel: 3,
|
|
17452
|
+
supportsThinking: true,
|
|
17453
|
+
supportsAdaptiveThinking: true,
|
|
17454
|
+
vertexModelId: "claude-sonnet-5-5@default"
|
|
17455
|
+
},
|
|
17456
|
+
"gpt-oss-120b-medium": {
|
|
17457
|
+
displayName: "GPT-OSS 120B (Medium)",
|
|
17458
|
+
maxTokens: 131072,
|
|
17459
|
+
maxOutputTokens: 32768,
|
|
17460
|
+
model: "MODEL_OPENAI_GPT_OSS_120B_MEDIUM",
|
|
17461
|
+
thinkingBudget: 8192,
|
|
17462
|
+
supportsThinking: true,
|
|
17463
|
+
vertexModelId: "openai/gpt-oss-120b-maas"
|
|
17464
|
+
},
|
|
17465
|
+
"gemini-3.5-flash-extra-low": {
|
|
17466
|
+
displayName: "Gemini 3.5 Flash (Low)",
|
|
17467
|
+
maxTokens: 1048576,
|
|
17468
|
+
maxOutputTokens: 65536,
|
|
17469
|
+
model: "MODEL_PLACEHOLDER_M187",
|
|
17470
|
+
thinkingBudget: 1e3,
|
|
17471
|
+
supportsThinking: true
|
|
17472
|
+
},
|
|
17473
|
+
"gemini-3.5-flash-low": {
|
|
17474
|
+
displayName: "Gemini 3.5 Flash (Medium)",
|
|
17475
|
+
maxTokens: 1048576,
|
|
17476
|
+
maxOutputTokens: 65536,
|
|
17477
|
+
model: "MODEL_PLACEHOLDER_M20",
|
|
17478
|
+
thinkingBudget: 4e3,
|
|
17479
|
+
supportsThinking: true
|
|
17480
|
+
},
|
|
17481
|
+
"gemini-3-flash-agent": {
|
|
17482
|
+
displayName: "Gemini 3.5 Flash (High)",
|
|
17483
|
+
maxTokens: 1048576,
|
|
17484
|
+
maxOutputTokens: 65536,
|
|
17485
|
+
model: "MODEL_PLACEHOLDER_M84",
|
|
17486
|
+
thinkingBudget: -1,
|
|
17487
|
+
supportsThinking: true
|
|
17488
|
+
},
|
|
17489
|
+
"gemini-3.1-flash-image": {
|
|
17490
|
+
displayName: "Gemini 3.1 Flash Image",
|
|
17491
|
+
model: "MODEL_PLACEHOLDER_M21"
|
|
17492
|
+
},
|
|
17493
|
+
"gemini-pro-agent": {
|
|
17494
|
+
displayName: "Gemini 3.1 Pro (High)",
|
|
17495
|
+
maxTokens: 1048576,
|
|
17496
|
+
maxOutputTokens: 65535,
|
|
17497
|
+
model: "MODEL_PLACEHOLDER_M16",
|
|
17498
|
+
thinkingBudget: 10001,
|
|
17499
|
+
supportsThinking: true
|
|
17500
|
+
}
|
|
17501
|
+
};
|
|
17502
|
+
function getAgyNativeModel(model) {
|
|
17503
|
+
return AGY_NATIVE_MODEL_DEFINITIONS[model.toLowerCase()];
|
|
17504
|
+
}
|
|
17505
|
+
var RETIRED_AGY_MODEL_MESSAGE = "This Antigravity model is no longer offered. Choose another model.";
|
|
17506
|
+
function isRetiredAgyModel(model) {
|
|
17507
|
+
const route = model.toLowerCase().replace(/^antigravity-/, "").replace(/^gemini-(?=claude-)/, "");
|
|
17508
|
+
return /^claude-(opus|sonnet)-4-6(?:-thinking)?(?:-(?:minimal|low|medium|high))?$/.test(route) && getAgyNativeModel(route) === void 0;
|
|
17509
|
+
}
|
|
17306
17510
|
var ALL_MODEL_DEFINITIONS = {
|
|
17511
|
+
"antigravity-gemini-3.5-flash": defineModel("antigravity-gemini-3.5-flash", {
|
|
17512
|
+
name: "Gemini 3.5 Flash (Antigravity)",
|
|
17513
|
+
reasoning: true,
|
|
17514
|
+
limit: { context: 1048576, output: 65536 },
|
|
17515
|
+
modalities: DEFAULT_MODALITIES,
|
|
17516
|
+
variants: {
|
|
17517
|
+
low: { thinkingLevel: "low" },
|
|
17518
|
+
medium: { thinkingLevel: "medium" },
|
|
17519
|
+
high: { thinkingLevel: "high" }
|
|
17520
|
+
}
|
|
17521
|
+
}),
|
|
17522
|
+
"antigravity-gemini-3.1-flash-image": defineModel("antigravity-gemini-3.1-flash-image", {
|
|
17523
|
+
name: "Gemini 3.1 Flash Image (Antigravity)",
|
|
17524
|
+
reasoning: false,
|
|
17525
|
+
limit: { context: 66e3, output: 33e3 },
|
|
17526
|
+
modalities: { input: ["text", "image"], output: ["text", "image"] }
|
|
17527
|
+
}),
|
|
17307
17528
|
"antigravity-gemini-3.1-pro": defineModel("antigravity-gemini-3.1-pro", {
|
|
17308
17529
|
name: "Gemini 3.1 Pro (Antigravity)",
|
|
17309
17530
|
reasoning: true,
|
|
@@ -17321,6 +17542,7 @@ var ALL_MODEL_DEFINITIONS = {
|
|
|
17321
17542
|
modalities: DEFAULT_MODALITIES,
|
|
17322
17543
|
variants: {
|
|
17323
17544
|
low: { thinkingLevel: "low" },
|
|
17545
|
+
medium: { thinkingLevel: "medium" },
|
|
17324
17546
|
high: { thinkingLevel: "high" }
|
|
17325
17547
|
}
|
|
17326
17548
|
}),
|
|
@@ -17331,6 +17553,7 @@ var ALL_MODEL_DEFINITIONS = {
|
|
|
17331
17553
|
modalities: DEFAULT_MODALITIES,
|
|
17332
17554
|
variants: {
|
|
17333
17555
|
low: { thinkingLevel: "low" },
|
|
17556
|
+
medium: { thinkingLevel: "medium" },
|
|
17334
17557
|
high: { thinkingLevel: "high" }
|
|
17335
17558
|
}
|
|
17336
17559
|
}),
|
|
@@ -17341,46 +17564,30 @@ var ALL_MODEL_DEFINITIONS = {
|
|
|
17341
17564
|
modalities: DEFAULT_MODALITIES,
|
|
17342
17565
|
variants: {
|
|
17343
17566
|
low: { thinkingLevel: "low" },
|
|
17567
|
+
medium: { thinkingLevel: "medium" },
|
|
17344
17568
|
high: { thinkingLevel: "high" }
|
|
17345
17569
|
}
|
|
17346
17570
|
}),
|
|
17347
|
-
"antigravity-
|
|
17348
|
-
name: "
|
|
17571
|
+
"antigravity-claude-sonnet-5-5": defineModel("antigravity-claude-sonnet-5-5", {
|
|
17572
|
+
name: "Claude Sonnet 5.5 (Antigravity)",
|
|
17349
17573
|
reasoning: true,
|
|
17350
|
-
limit: { context:
|
|
17574
|
+
limit: { context: 1e6, output: 128e3 },
|
|
17351
17575
|
modalities: DEFAULT_MODALITIES,
|
|
17352
17576
|
variants: {
|
|
17353
17577
|
low: { thinkingLevel: "low" },
|
|
17578
|
+
medium: { thinkingLevel: "medium" },
|
|
17354
17579
|
high: { thinkingLevel: "high" }
|
|
17355
17580
|
}
|
|
17356
17581
|
}),
|
|
17357
|
-
"antigravity-claude-
|
|
17358
|
-
name: "Claude
|
|
17582
|
+
"antigravity-claude-opus-5-5": defineModel("antigravity-claude-opus-5-5", {
|
|
17583
|
+
name: "Claude Opus 5.5 (Antigravity)",
|
|
17359
17584
|
reasoning: true,
|
|
17360
|
-
limit: { context:
|
|
17585
|
+
limit: { context: 1e6, output: 128e3 },
|
|
17361
17586
|
modalities: DEFAULT_MODALITIES,
|
|
17362
17587
|
variants: {
|
|
17363
|
-
low: {
|
|
17364
|
-
|
|
17365
|
-
|
|
17366
|
-
}),
|
|
17367
|
-
"antigravity-claude-opus-4-6-thinking": defineModel("antigravity-claude-opus-4-6-thinking", {
|
|
17368
|
-
name: "Claude Opus 4.6 Thinking (Antigravity)",
|
|
17369
|
-
reasoning: true,
|
|
17370
|
-
limit: { context: 25e4, output: 64e3 },
|
|
17371
|
-
modalities: DEFAULT_MODALITIES,
|
|
17372
|
-
variants: {
|
|
17373
|
-
low: { disabled: true },
|
|
17374
|
-
high: { disabled: true }
|
|
17375
|
-
}
|
|
17376
|
-
}),
|
|
17377
|
-
"antigravity-gemini-3.1-flash-image": defineModel("antigravity-gemini-3.1-flash-image", {
|
|
17378
|
-
name: "Gemini 3.1 Flash Image (Antigravity)",
|
|
17379
|
-
reasoning: false,
|
|
17380
|
-
limit: { context: 66e3, output: 33e3 },
|
|
17381
|
-
modalities: {
|
|
17382
|
-
input: ["text", "image"],
|
|
17383
|
-
output: ["text", "image"]
|
|
17588
|
+
low: { thinkingLevel: "low" },
|
|
17589
|
+
medium: { thinkingLevel: "medium" },
|
|
17590
|
+
high: { thinkingLevel: "high" }
|
|
17384
17591
|
}
|
|
17385
17592
|
}),
|
|
17386
17593
|
"antigravity-gpt-oss-120b-medium": defineModel("antigravity-gpt-oss-120b-medium", {
|
|
@@ -17462,6 +17669,7 @@ var RESOLVER_ALIASES = {
|
|
|
17462
17669
|
"gemini-3.8-flash-low": "gemini-3.8-flash",
|
|
17463
17670
|
"gemini-3.8-flash-medium": "gemini-3.8-flash",
|
|
17464
17671
|
"gemini-3.8-flash-high": "gemini-3.8-flash",
|
|
17672
|
+
// Historical parsing does not authorize serving: admission rejects retired routes.
|
|
17465
17673
|
"gemini-claude-opus-4-6-thinking-low": "claude-opus-4-6-thinking",
|
|
17466
17674
|
"gemini-claude-opus-4-6-thinking-medium": "claude-opus-4-6-thinking",
|
|
17467
17675
|
"gemini-claude-opus-4-6-thinking-high": "claude-opus-4-6-thinking",
|
|
@@ -17544,10 +17752,10 @@ var ANTIGRAVITY_OPENCODE_MODEL_IDS = [
|
|
|
17544
17752
|
"antigravity-gemini-3.7-flash",
|
|
17545
17753
|
"antigravity-gemini-3.6-flash",
|
|
17546
17754
|
"antigravity-gemini-3.5-flash",
|
|
17547
|
-
"antigravity-gemini-3.1-pro",
|
|
17548
|
-
"antigravity-claude-sonnet-4-6-thinking",
|
|
17549
|
-
"antigravity-claude-opus-4-6-thinking",
|
|
17550
17755
|
"antigravity-gemini-3.1-flash-image",
|
|
17756
|
+
"antigravity-gemini-3.1-pro",
|
|
17757
|
+
"antigravity-claude-sonnet-5-5",
|
|
17758
|
+
"antigravity-claude-opus-5-5",
|
|
17551
17759
|
"antigravity-gpt-oss-120b-medium"
|
|
17552
17760
|
];
|
|
17553
17761
|
function pickModelDefinitions(ids) {
|
|
@@ -21442,26 +21650,6 @@ var AGY_REQUEST_FIELD_ORDER = [
|
|
|
21442
21650
|
"generationConfig",
|
|
21443
21651
|
"sessionId"
|
|
21444
21652
|
];
|
|
21445
|
-
var AGY_MODEL_ENUM_BY_WIRE_MODEL = {
|
|
21446
|
-
"gemini-3.5-flash-extra-low": "MODEL_PLACEHOLDER_M187",
|
|
21447
|
-
"gemini-3.5-flash-low": "MODEL_PLACEHOLDER_M20",
|
|
21448
|
-
"gemini-3-flash-agent": "MODEL_PLACEHOLDER_M84",
|
|
21449
|
-
"gemini-3.6-flash-low": "MODEL_PLACEHOLDER_M73",
|
|
21450
|
-
"gemini-3.6-flash-medium": "MODEL_PLACEHOLDER_M72",
|
|
21451
|
-
"gemini-3.6-flash-high": "MODEL_PLACEHOLDER_M71",
|
|
21452
|
-
"gemini-3.7-flash-low": "MODEL_PLACEHOLDER_M300",
|
|
21453
|
-
"gemini-3.7-flash-medium": "MODEL_PLACEHOLDER_M299",
|
|
21454
|
-
"gemini-3.7-flash-high": "MODEL_PLACEHOLDER_M298",
|
|
21455
|
-
"gemini-3.8-flash-low": "MODEL_PLACEHOLDER_M320",
|
|
21456
|
-
"gemini-3.8-flash-medium": "MODEL_PLACEHOLDER_M319",
|
|
21457
|
-
"gemini-3.8-flash-high": "MODEL_PLACEHOLDER_M318",
|
|
21458
|
-
"gemini-3.1-pro-low": "MODEL_PLACEHOLDER_M36",
|
|
21459
|
-
"gemini-pro-agent": "MODEL_PLACEHOLDER_M16",
|
|
21460
|
-
"claude-sonnet-4-6": "MODEL_PLACEHOLDER_M35",
|
|
21461
|
-
"claude-opus-4-6-thinking": "MODEL_PLACEHOLDER_M26",
|
|
21462
|
-
"gemini-3.1-flash-image": "MODEL_PLACEHOLDER_M21",
|
|
21463
|
-
"gpt-oss-120b-medium": "MODEL_OPENAI_GPT_OSS_120B_MEDIUM"
|
|
21464
|
-
};
|
|
21465
21653
|
function fnv1a64Signed(input2) {
|
|
21466
21654
|
let hash2 = FNV1A_64_OFFSET_BASIS;
|
|
21467
21655
|
for (const byte of Buffer2.from(input2, "utf8")) {
|
|
@@ -21553,8 +21741,13 @@ var AgyRequestSessionStore = class {
|
|
|
21553
21741
|
}
|
|
21554
21742
|
}
|
|
21555
21743
|
};
|
|
21744
|
+
var HISTORICAL_AGY_MODEL_ENUMS = {
|
|
21745
|
+
"claude-sonnet-4-6": "MODEL_PLACEHOLDER_M35",
|
|
21746
|
+
"claude-opus-4-6-thinking": "MODEL_PLACEHOLDER_M26"
|
|
21747
|
+
};
|
|
21556
21748
|
function getAgyModelEnum(model) {
|
|
21557
|
-
|
|
21749
|
+
const lower = model.toLowerCase();
|
|
21750
|
+
return getAgyNativeModel(lower)?.model ?? HISTORICAL_AGY_MODEL_ENUMS[lower];
|
|
21558
21751
|
}
|
|
21559
21752
|
function orderAgyRequestPayloadInPlace(payload) {
|
|
21560
21753
|
const ordered = {};
|
|
@@ -23974,6 +24167,30 @@ async function defaultTransport(url, init, options) {
|
|
|
23974
24167
|
return fetchWithActiveTimeout(url, init, { timeoutMs: options.timeoutMs });
|
|
23975
24168
|
}
|
|
23976
24169
|
|
|
24170
|
+
// ../core/dist/transform/agy-generation.js
|
|
24171
|
+
var ADAPTIVE_LEVELS = {
|
|
24172
|
+
1: "LOW",
|
|
24173
|
+
2: "MEDIUM",
|
|
24174
|
+
3: "HIGH"
|
|
24175
|
+
};
|
|
24176
|
+
function applyAgyNativeGenerationConfig(wireModel, generationConfig) {
|
|
24177
|
+
const native = getAgyNativeModel(wireModel);
|
|
24178
|
+
if (!native)
|
|
24179
|
+
return;
|
|
24180
|
+
const output2 = generationConfig.max_output_tokens ?? native.maxOutputTokens;
|
|
24181
|
+
if (generationConfig.maxOutputTokens === void 0 && output2 !== void 0) {
|
|
24182
|
+
generationConfig.maxOutputTokens = output2;
|
|
24183
|
+
}
|
|
24184
|
+
delete generationConfig.max_output_tokens;
|
|
24185
|
+
if (native.supportsAdaptiveThinking && native.thinkingLevel !== void 0) {
|
|
24186
|
+
generationConfig.thinkingConfig = {
|
|
24187
|
+
includeThoughts: true,
|
|
24188
|
+
thinkingBudget: 0,
|
|
24189
|
+
thinkingLevel: ADAPTIVE_LEVELS[native.thinkingLevel]
|
|
24190
|
+
};
|
|
24191
|
+
}
|
|
24192
|
+
}
|
|
24193
|
+
|
|
23977
24194
|
// ../core/dist/transform/claude.js
|
|
23978
24195
|
var CLAUDE_THINKING_MAX_OUTPUT_TOKENS = 64e3;
|
|
23979
24196
|
function computeClaudeMaxOutputTokens(thinkingBudget) {
|
|
@@ -23988,7 +24205,7 @@ function isClaudeModel(model) {
|
|
|
23988
24205
|
}
|
|
23989
24206
|
function isClaudeThinkingModel(model) {
|
|
23990
24207
|
const lower = model.toLowerCase();
|
|
23991
|
-
return lower.includes("claude") && (lower.includes("thinking") || lower.endsWith("claude-sonnet-4-6"));
|
|
24208
|
+
return lower.includes("claude") && (lower.includes("thinking") || lower.endsWith("claude-sonnet-4-6") || /claude-(opus|sonnet)-5-5(?:-(low|medium|high))?$/.test(lower));
|
|
23992
24209
|
}
|
|
23993
24210
|
function appendClaudeThinkingHint(payload, hint = CLAUDE_INTERLEAVED_THINKING_HINT) {
|
|
23994
24211
|
const existing = payload.systemInstruction;
|
|
@@ -24489,7 +24706,7 @@ var GEMINI_3_FLASH_REGEX = /^gemini-3(?:\.\d+)?-flash/i;
|
|
|
24489
24706
|
var IMAGE_GENERATION_MODELS = /image|imagen/i;
|
|
24490
24707
|
function supportsThinkingTiers(model) {
|
|
24491
24708
|
const lower = model.toLowerCase();
|
|
24492
|
-
return lower.includes("gemini-3") || lower.includes("gemini-2.5") || lower.includes("claude") && lower.includes("thinking");
|
|
24709
|
+
return lower.includes("gemini-3") || lower.includes("gemini-2.5") || lower.includes("claude") && (lower.includes("thinking") || /^claude-(opus|sonnet)-5-5/.test(lower));
|
|
24493
24710
|
}
|
|
24494
24711
|
function extractThinkingTierFromModel(model) {
|
|
24495
24712
|
if (!supportsThinkingTiers(model)) {
|
|
@@ -24526,7 +24743,7 @@ function isGemini35FlashModel(model) {
|
|
|
24526
24743
|
function resolveGemini35FlashAntigravityModel(tier) {
|
|
24527
24744
|
return getGemini35FlashAntigravityModel(tier);
|
|
24528
24745
|
}
|
|
24529
|
-
function getAgyGeminiFlashThinkingBudget(tier, highBudget =
|
|
24746
|
+
function getAgyGeminiFlashThinkingBudget(tier, highBudget = -1) {
|
|
24530
24747
|
switch (tier) {
|
|
24531
24748
|
case "low":
|
|
24532
24749
|
return 1e3;
|
|
@@ -24537,7 +24754,7 @@ function getAgyGeminiFlashThinkingBudget(tier, highBudget = 1e4) {
|
|
|
24537
24754
|
}
|
|
24538
24755
|
}
|
|
24539
24756
|
function getAgyGemini31ProModel(tier) {
|
|
24540
|
-
return tier === "high" ? "gemini-pro-
|
|
24757
|
+
return tier === "high" ? "gemini-3.1-pro-high" : "gemini-3.1-pro-low";
|
|
24541
24758
|
}
|
|
24542
24759
|
function getAgyGemini31ProThinkingBudget(tier) {
|
|
24543
24760
|
return tier === "high" ? 10001 : 1001;
|
|
@@ -24552,6 +24769,29 @@ function resolveModelWithTier(requestedModel, options = {}) {
|
|
|
24552
24769
|
const preferGeminiCli = options.cli_first === true && !isAntigravity && !isImageModel && !isClaudeModel2;
|
|
24553
24770
|
const quotaPreference = preferGeminiCli ? "gemini-cli" : "antigravity";
|
|
24554
24771
|
const explicitQuota = isAntigravity || isImageModel;
|
|
24772
|
+
const native = getAgyNativeModel(modelWithoutQuota);
|
|
24773
|
+
const groupedGemini35Tier = isAntigravity && /^gemini-3\.5-flash-(low|medium|high)$/i.test(modelWithoutQuota);
|
|
24774
|
+
if (native && quotaPreference === "antigravity" && !groupedGemini35Tier) {
|
|
24775
|
+
return {
|
|
24776
|
+
actualModel: modelWithoutQuota,
|
|
24777
|
+
thinkingBudget: native.supportsAdaptiveThinking ? 0 : native.thinkingBudget,
|
|
24778
|
+
isThinkingModel: native.supportsThinking ?? false,
|
|
24779
|
+
...isImageModel ? { isImageModel: true } : {},
|
|
24780
|
+
tier,
|
|
24781
|
+
quotaPreference,
|
|
24782
|
+
explicitQuota
|
|
24783
|
+
};
|
|
24784
|
+
}
|
|
24785
|
+
if (/^claude-(opus|sonnet)-5-5$/i.test(modelWithoutQuota)) {
|
|
24786
|
+
return {
|
|
24787
|
+
actualModel: `${modelWithoutQuota}-low`,
|
|
24788
|
+
thinkingBudget: 0,
|
|
24789
|
+
isThinkingModel: true,
|
|
24790
|
+
tier: "low",
|
|
24791
|
+
quotaPreference,
|
|
24792
|
+
explicitQuota
|
|
24793
|
+
};
|
|
24794
|
+
}
|
|
24555
24795
|
const isGemini3 = modelWithoutQuota.toLowerCase().startsWith("gemini-3");
|
|
24556
24796
|
const skipAlias = isAntigravity && isGemini3;
|
|
24557
24797
|
const isGemini3Pro = isGemini3ProModel(modelWithoutQuota);
|
|
@@ -24585,7 +24825,7 @@ function resolveModelWithTier(requestedModel, options = {}) {
|
|
|
24585
24825
|
if (isGemini36Flash && quotaPreference === "antigravity") {
|
|
24586
24826
|
return {
|
|
24587
24827
|
actualModel: getGemini36FlashAntigravityModel(tier ?? "medium"),
|
|
24588
|
-
thinkingBudget: getAgyGeminiFlashThinkingBudget(tier),
|
|
24828
|
+
thinkingBudget: getAgyGeminiFlashThinkingBudget(tier, -1),
|
|
24589
24829
|
tier: tier ?? "medium",
|
|
24590
24830
|
isThinkingModel: true,
|
|
24591
24831
|
quotaPreference,
|
|
@@ -34062,6 +34302,8 @@ function getImageModelLocalTitle(input2, init) {
|
|
|
34062
34302
|
}
|
|
34063
34303
|
}
|
|
34064
34304
|
function getAgyMaxOutputTokens(model) {
|
|
34305
|
+
const native = getAgyNativeModel(model);
|
|
34306
|
+
if (native) return native.maxOutputTokens;
|
|
34065
34307
|
const lower = model.toLowerCase();
|
|
34066
34308
|
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") {
|
|
34067
34309
|
return 65536;
|
|
@@ -34081,6 +34323,10 @@ function applyAgyGenerationDefaults(model, generationConfig, headerStyle) {
|
|
|
34081
34323
|
if (headerStyle !== "antigravity") {
|
|
34082
34324
|
return;
|
|
34083
34325
|
}
|
|
34326
|
+
if (getAgyNativeModel(model)) {
|
|
34327
|
+
applyAgyNativeGenerationConfig(model, generationConfig);
|
|
34328
|
+
return;
|
|
34329
|
+
}
|
|
34084
34330
|
const maxOutputTokens = getAgyMaxOutputTokens(model);
|
|
34085
34331
|
if (maxOutputTokens !== void 0) {
|
|
34086
34332
|
generationConfig.maxOutputTokens = maxOutputTokens;
|
|
@@ -34986,6 +35232,11 @@ function prepareAntigravityRequestIn(wire, input2, init, accessToken, projectId,
|
|
|
34986
35232
|
const wireRequest = requestObjects.at(-1);
|
|
34987
35233
|
if (wireRequest) {
|
|
34988
35234
|
if (headerStyle === "antigravity") {
|
|
35235
|
+
const generationConfig = wireRequest.generationConfig;
|
|
35236
|
+
const config = generationConfig && typeof generationConfig === "object" && !Array.isArray(generationConfig) ? generationConfig : {};
|
|
35237
|
+
applyAgyNativeGenerationConfig(effectiveModel, config);
|
|
35238
|
+
if (Object.keys(config).length > 0)
|
|
35239
|
+
wireRequest.generationConfig = config;
|
|
34989
35240
|
const metadata = buildAgyAgentRequestMetadata(
|
|
34990
35241
|
options?.agySession ?? DEFAULT_AGY_REQUEST_SESSION,
|
|
34991
35242
|
wireRequest,
|
|
@@ -35021,7 +35272,7 @@ function prepareAntigravityRequestIn(wire, input2, init, accessToken, projectId,
|
|
|
35021
35272
|
`[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)}`
|
|
35022
35273
|
);
|
|
35023
35274
|
delete requestPayload.providerOptions;
|
|
35024
|
-
if (variantConfig?.thinkingLevel && isGemini3) {
|
|
35275
|
+
if (variantConfig?.thinkingLevel && (isGemini3 || getAgyNativeModel(effectiveModel)?.supportsAdaptiveThinking)) {
|
|
35025
35276
|
const variantModelBase = rawModel.replace(/-preview-customtools$/i, "").replace(/-preview$/i, "").replace(/-(minimal|low|medium|high)$/i, "");
|
|
35026
35277
|
const variantResolved = resolveModelForHeaderStyle(
|
|
35027
35278
|
`${variantModelBase}-${variantConfig.thinkingLevel}`,
|
|
@@ -35448,6 +35699,11 @@ function prepareAntigravityRequestIn(wire, input2, init, accessToken, projectId,
|
|
|
35448
35699
|
stripInjectedDebugFromRequestPayload(requestPayload);
|
|
35449
35700
|
sanitizeRequestPayloadForAntigravity(requestPayload);
|
|
35450
35701
|
if (headerStyle === "antigravity") {
|
|
35702
|
+
const generationConfig = requestPayload.generationConfig;
|
|
35703
|
+
const config = generationConfig && typeof generationConfig === "object" && !Array.isArray(generationConfig) ? generationConfig : {};
|
|
35704
|
+
applyAgyNativeGenerationConfig(effectiveModel, config);
|
|
35705
|
+
if (Object.keys(config).length > 0)
|
|
35706
|
+
requestPayload.generationConfig = config;
|
|
35451
35707
|
stripUnsupportedAntigravityFields(requestPayload);
|
|
35452
35708
|
configureAntigravityToolCalling(requestPayload);
|
|
35453
35709
|
normalizeNativeFunctionResponseRoles(requestPayload);
|
|
@@ -35558,7 +35814,10 @@ function buildThinkingWarmupBody(bodyText, isClaudeThinking) {
|
|
|
35558
35814
|
return null;
|
|
35559
35815
|
}
|
|
35560
35816
|
const warmupPrompt = "Warmup request for thinking signature.";
|
|
35561
|
-
const
|
|
35817
|
+
const candidate = typeof parsed.model === "string" ? parsed.model : "";
|
|
35818
|
+
if (candidate && isRetiredAgyModel(candidate)) return null;
|
|
35819
|
+
const wireModel = candidate || "claude-sonnet-5-5-low";
|
|
35820
|
+
parsed.model = wireModel;
|
|
35562
35821
|
const requestObjects = [];
|
|
35563
35822
|
const updateRequest = (req) => {
|
|
35564
35823
|
req.contents = [{ role: "user", parts: [{ text: warmupPrompt }] }];
|
|
@@ -35569,7 +35828,8 @@ function buildThinkingWarmupBody(bodyText, isClaudeThinking) {
|
|
|
35569
35828
|
includeThoughts: true,
|
|
35570
35829
|
thinkingBudget: AGY_CLAUDE_THINKING_BUDGET
|
|
35571
35830
|
};
|
|
35572
|
-
generationConfig.maxOutputTokens
|
|
35831
|
+
generationConfig.maxOutputTokens ??= generationConfig.max_output_tokens ?? getAgyMaxOutputTokens(wireModel) ?? computeClaudeMaxOutputTokens(AGY_CLAUDE_THINKING_BUDGET);
|
|
35832
|
+
applyAgyNativeGenerationConfig(wireModel, generationConfig);
|
|
35573
35833
|
req.generationConfig = generationConfig;
|
|
35574
35834
|
requestObjects.push(req);
|
|
35575
35835
|
};
|
|
@@ -36802,7 +37062,8 @@ function routeTitleModel(url) {
|
|
|
36802
37062
|
const model = extractModelFromUrl(url);
|
|
36803
37063
|
if (model === null) return url;
|
|
36804
37064
|
const registered = Object.hasOwn(getPublicModelDefinitions(), model) || Object.hasOwn(getResolverAliasMap(), model);
|
|
36805
|
-
if (registered && !isImageGenerationModel(model)
|
|
37065
|
+
if (registered && !isImageGenerationModel(model) && !isRetiredAgyModel(model))
|
|
37066
|
+
return url;
|
|
36806
37067
|
return url.replace(`/models/${model}`, `/models/${TITLE_FALLBACK_MODEL}`);
|
|
36807
37068
|
}
|
|
36808
37069
|
function agyMetadataIdentity(identity, kind) {
|
|
@@ -37004,6 +37265,19 @@ function createRequestExecutor(deps) {
|
|
|
37004
37265
|
if (kind === "title") {
|
|
37005
37266
|
input2 = routeTitleModel(input2);
|
|
37006
37267
|
}
|
|
37268
|
+
const selectedModel = extractModelFromUrl(input2);
|
|
37269
|
+
if (selectedModel && isRetiredAgyModel(selectedModel)) {
|
|
37270
|
+
return new Response(
|
|
37271
|
+
JSON.stringify({
|
|
37272
|
+
error: {
|
|
37273
|
+
code: 412,
|
|
37274
|
+
status: "FAILED_PRECONDITION",
|
|
37275
|
+
message: RETIRED_AGY_MODEL_MESSAGE
|
|
37276
|
+
}
|
|
37277
|
+
}),
|
|
37278
|
+
{ status: 412, headers: { "Content-Type": "application/json" } }
|
|
37279
|
+
);
|
|
37280
|
+
}
|
|
37007
37281
|
const transport = options.transport ?? defaultTransport2;
|
|
37008
37282
|
const requestSessionIdentity = options.session ?? extractOpenCodeSessionIdentity(init?.headers);
|
|
37009
37283
|
const agyRequestScope = agySessionRegistry.beginRequest(
|
|
@@ -37543,9 +37817,7 @@ function createRequestExecutor(deps) {
|
|
|
37543
37817
|
if (!warmupState.trackAttempt(prepared.sessionId)) return;
|
|
37544
37818
|
const warmupBody = wire.buildThinkingWarmupBody(
|
|
37545
37819
|
typeof prepared.init.body === "string" ? prepared.init.body : void 0,
|
|
37546
|
-
|
|
37547
|
-
prepared.effectiveModel?.toLowerCase().includes("claude") && prepared.effectiveModel?.toLowerCase().includes("thinking")
|
|
37548
|
-
)
|
|
37820
|
+
isClaudeThinkingModel(prepared.effectiveModel ?? "")
|
|
37549
37821
|
);
|
|
37550
37822
|
if (!warmupBody) return;
|
|
37551
37823
|
const warmupUrl = toWarmupStreamUrl(prepared.request);
|