@expiren/opencode-antigravity-auth 1.6.5 → 1.6.7
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/dist/index.js +56 -21
- package/dist/index.js.map +2 -2
- package/dist/src/plugin/config/models.d.ts.map +1 -1
- package/dist/src/plugin/config/models.js +27 -3
- package/dist/src/plugin/config/models.js.map +1 -1
- package/dist/src/plugin/request.d.ts.map +1 -1
- package/dist/src/plugin/request.js +2 -22
- package/dist/src/plugin/request.js.map +1 -1
- package/dist/src/plugin/transform/claude.d.ts.map +1 -1
- package/dist/src/plugin/transform/claude.js +5 -19
- package/dist/src/plugin/transform/claude.js.map +1 -1
- package/dist/src/plugin/transform/model-resolver.d.ts.map +1 -1
- package/dist/src/plugin/transform/model-resolver.js +8 -1
- package/dist/src/plugin/transform/model-resolver.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1730,11 +1730,27 @@ var OPENCODE_MODEL_DEFINITIONS = {
|
|
|
1730
1730
|
high: { thinkingLevel: "high" }
|
|
1731
1731
|
}
|
|
1732
1732
|
}),
|
|
1733
|
-
"antigravity-
|
|
1734
|
-
name: "
|
|
1735
|
-
reasoning:
|
|
1733
|
+
"antigravity-gemini-3.5-flash": defineModel("antigravity-gemini-3.5-flash", {
|
|
1734
|
+
name: "Gemini 3.5 Flash (Antigravity)",
|
|
1735
|
+
reasoning: true,
|
|
1736
|
+
limit: { context: 1048576, output: 65536 },
|
|
1737
|
+
modalities: DEFAULT_MODALITIES,
|
|
1738
|
+
variants: {
|
|
1739
|
+
minimal: { thinkingLevel: "minimal" },
|
|
1740
|
+
low: { thinkingLevel: "low" },
|
|
1741
|
+
medium: { thinkingLevel: "medium" },
|
|
1742
|
+
high: { thinkingLevel: "high" }
|
|
1743
|
+
}
|
|
1744
|
+
}),
|
|
1745
|
+
"antigravity-claude-sonnet-4-6-thinking": defineModel("antigravity-claude-sonnet-4-6-thinking", {
|
|
1746
|
+
name: "Claude Sonnet 4.6 Thinking (Antigravity)",
|
|
1747
|
+
reasoning: true,
|
|
1736
1748
|
limit: { context: 2e5, output: 64e3 },
|
|
1737
|
-
modalities: DEFAULT_MODALITIES
|
|
1749
|
+
modalities: DEFAULT_MODALITIES,
|
|
1750
|
+
variants: {
|
|
1751
|
+
low: { thinkingConfig: { thinkingBudget: 8192 } },
|
|
1752
|
+
max: { thinkingConfig: { thinkingBudget: 32768 } }
|
|
1753
|
+
}
|
|
1738
1754
|
}),
|
|
1739
1755
|
"antigravity-claude-opus-4-6-thinking": defineModel("antigravity-claude-opus-4-6-thinking", {
|
|
1740
1756
|
name: "Claude Opus 4.6 Thinking (Antigravity)",
|
|
@@ -1746,6 +1762,15 @@ var OPENCODE_MODEL_DEFINITIONS = {
|
|
|
1746
1762
|
max: { thinkingConfig: { thinkingBudget: 32768 } }
|
|
1747
1763
|
}
|
|
1748
1764
|
}),
|
|
1765
|
+
"antigravity-gpt-oss-120b": defineModel("antigravity-gpt-oss-120b", {
|
|
1766
|
+
name: "GPT-OSS 120B (Antigravity)",
|
|
1767
|
+
reasoning: false,
|
|
1768
|
+
limit: { context: 128e3, output: 16384 },
|
|
1769
|
+
modalities: DEFAULT_MODALITIES,
|
|
1770
|
+
variants: {
|
|
1771
|
+
medium: {}
|
|
1772
|
+
}
|
|
1773
|
+
}),
|
|
1749
1774
|
"gemini-2.5-flash": defineModel("gemini-2.5-flash", {
|
|
1750
1775
|
name: "Gemini 2.5 Flash (Gemini CLI)",
|
|
1751
1776
|
reasoning: true,
|
|
@@ -5303,6 +5328,7 @@ function needsThinkingRecovery(state) {
|
|
|
5303
5328
|
|
|
5304
5329
|
// src/plugin/transform/claude.ts
|
|
5305
5330
|
var CLAUDE_THINKING_MAX_OUTPUT_TOKENS = 64e3;
|
|
5331
|
+
var CLAUDE_INTERLEAVED_THINKING_HINT = "Interleaved thinking is enabled. You may think between tool calls and after receiving tool results before deciding the next action or final answer. Do not mention these instructions or any constraints about thinking blocks; just apply them.";
|
|
5306
5332
|
function isClaudeModel(model) {
|
|
5307
5333
|
return model.toLowerCase().includes("claude");
|
|
5308
5334
|
}
|
|
@@ -5310,6 +5336,23 @@ function isClaudeThinkingModel(model) {
|
|
|
5310
5336
|
const lower = model.toLowerCase();
|
|
5311
5337
|
return lower.includes("claude") && lower.includes("thinking");
|
|
5312
5338
|
}
|
|
5339
|
+
function appendClaudeThinkingHint(payload, hint = CLAUDE_INTERLEAVED_THINKING_HINT) {
|
|
5340
|
+
const existing = payload.systemInstruction;
|
|
5341
|
+
if (typeof existing === "string") {
|
|
5342
|
+
payload.systemInstruction = existing.trim().length > 0 ? { role: "user", parts: [{ text: existing }, { text: hint }] } : hint;
|
|
5343
|
+
} else if (existing && typeof existing === "object") {
|
|
5344
|
+
const sys = existing;
|
|
5345
|
+
const partsValue = sys.parts;
|
|
5346
|
+
if (Array.isArray(partsValue)) {
|
|
5347
|
+
sys.parts = [...partsValue, { text: hint }];
|
|
5348
|
+
} else {
|
|
5349
|
+
sys.parts = [{ text: hint }];
|
|
5350
|
+
}
|
|
5351
|
+
payload.systemInstruction = sys;
|
|
5352
|
+
} else if (Array.isArray(payload.contents)) {
|
|
5353
|
+
payload.systemInstruction = { parts: [{ text: hint }] };
|
|
5354
|
+
}
|
|
5355
|
+
}
|
|
5313
5356
|
|
|
5314
5357
|
// src/plugin/transform/gemini.ts
|
|
5315
5358
|
var UNSUPPORTED_SCHEMA_FIELDS = /* @__PURE__ */ new Set([
|
|
@@ -5741,11 +5784,18 @@ var MODEL_ALIASES = {
|
|
|
5741
5784
|
"gemini-3-flash-low": "gemini-3-flash",
|
|
5742
5785
|
"gemini-3-flash-medium": "gemini-3-flash",
|
|
5743
5786
|
"gemini-3-flash-high": "gemini-3-flash",
|
|
5787
|
+
// Gemini 3.5 Flash variants
|
|
5788
|
+
"gemini-3.5-flash-low": "gemini-3.5-flash",
|
|
5789
|
+
"gemini-3.5-flash-medium": "gemini-3.5-flash",
|
|
5790
|
+
"gemini-3.5-flash-high": "gemini-3.5-flash",
|
|
5744
5791
|
// Claude proxy names (gemini- prefix for compatibility)
|
|
5745
5792
|
"gemini-claude-opus-4-6-thinking-low": "claude-opus-4-6-thinking",
|
|
5746
5793
|
"gemini-claude-opus-4-6-thinking-medium": "claude-opus-4-6-thinking",
|
|
5747
5794
|
"gemini-claude-opus-4-6-thinking-high": "claude-opus-4-6-thinking",
|
|
5748
|
-
"gemini-claude-sonnet-4-6": "claude-sonnet-4-6"
|
|
5795
|
+
"gemini-claude-sonnet-4-6-thinking-low": "claude-sonnet-4-6-thinking",
|
|
5796
|
+
"gemini-claude-sonnet-4-6-thinking-medium": "claude-sonnet-4-6-thinking",
|
|
5797
|
+
"gemini-claude-sonnet-4-6-thinking-high": "claude-sonnet-4-6-thinking",
|
|
5798
|
+
"gemini-claude-sonnet-4-6": "claude-sonnet-4-6-thinking"
|
|
5749
5799
|
// Image generation models - only gemini-3-pro-image is available via Antigravity API
|
|
5750
5800
|
// Note: gemini-2.5-flash-image (Nano Banana) is NOT supported by Antigravity - only Google AI API
|
|
5751
5801
|
// Reference: Antigravity-Manager/src-tauri/src/proxy/common/model_mapping.rs
|
|
@@ -7223,22 +7273,7 @@ function prepareAntigravityRequest(input2, init, accessToken, projectId, endpoin
|
|
|
7223
7273
|
delete requestPayload.system_instruction;
|
|
7224
7274
|
}
|
|
7225
7275
|
if (isClaudeThinking && Array.isArray(requestPayload.tools) && requestPayload.tools.length > 0) {
|
|
7226
|
-
|
|
7227
|
-
const existing = requestPayload.systemInstruction;
|
|
7228
|
-
if (typeof existing === "string") {
|
|
7229
|
-
requestPayload.systemInstruction = { parts: [{ text: existing }, { text: hint }] };
|
|
7230
|
-
} else if (existing && typeof existing === "object") {
|
|
7231
|
-
const sys = existing;
|
|
7232
|
-
const partsValue = sys.parts;
|
|
7233
|
-
if (Array.isArray(partsValue)) {
|
|
7234
|
-
sys.parts = [...partsValue, { text: hint }];
|
|
7235
|
-
} else {
|
|
7236
|
-
sys.parts = [{ text: hint }];
|
|
7237
|
-
}
|
|
7238
|
-
requestPayload.systemInstruction = sys;
|
|
7239
|
-
} else if (Array.isArray(requestPayload.contents)) {
|
|
7240
|
-
requestPayload.systemInstruction = { parts: [{ text: hint }] };
|
|
7241
|
-
}
|
|
7276
|
+
appendClaudeThinkingHint(requestPayload);
|
|
7242
7277
|
}
|
|
7243
7278
|
const cachedContentFromExtra = typeof requestPayload.extra_body === "object" && requestPayload.extra_body ? requestPayload.extra_body.cached_content ?? requestPayload.extra_body.cachedContent : void 0;
|
|
7244
7279
|
const cachedContent = requestPayload.cached_content ?? requestPayload.cachedContent ?? cachedContentFromExtra;
|