@anthonyhaussman/opencode-agy-auth 1.2.7-alpha.0 → 1.2.7-alpha.2

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 CHANGED
@@ -268,7 +268,7 @@ function createAgyActivityRequestId() {
268
268
  import os from "os";
269
269
 
270
270
  // src/sdk/agy-cli-version.ts
271
- var AGY_CLI_VERSION = "1.2.6";
271
+ var AGY_CLI_VERSION = "1.2.7";
272
272
 
273
273
  // src/sdk/user-agent.ts
274
274
  var cachedUserAgent = null;
@@ -16060,6 +16060,7 @@ var models_default = {
16060
16060
  }
16061
16061
  },
16062
16062
  experimentIds: [
16063
+ 106738697,
16063
16064
  106329234,
16064
16065
  106519115,
16065
16066
  105979552,
@@ -16168,7 +16169,7 @@ var models_default = {
16168
16169
  modelProvider: "MODEL_PROVIDER_ANTHROPIC",
16169
16170
  quotaInfo: {
16170
16171
  remainingFraction: 1,
16171
- resetTime: "2026-09-18T16:07:34Z"
16172
+ resetTime: "2026-09-19T15:08:03Z"
16172
16173
  },
16173
16174
  recommended: true,
16174
16175
  supportedMimeTypes: {
@@ -16207,7 +16208,7 @@ var models_default = {
16207
16208
  modelProvider: "MODEL_PROVIDER_ANTHROPIC",
16208
16209
  quotaInfo: {
16209
16210
  remainingFraction: 1,
16210
- resetTime: "2026-09-18T16:07:34Z"
16211
+ resetTime: "2026-09-19T15:08:03Z"
16211
16212
  },
16212
16213
  recommended: true,
16213
16214
  supportedMimeTypes: {
@@ -16243,8 +16244,8 @@ var models_default = {
16243
16244
  },
16244
16245
  modelProvider: "MODEL_PROVIDER_GOOGLE",
16245
16246
  quotaInfo: {
16246
- remainingFraction: 0.7753168,
16247
- resetTime: "2026-09-18T11:38:10Z"
16247
+ remainingFraction: 0.964089,
16248
+ resetTime: "2026-09-19T14:53:58Z"
16248
16249
  },
16249
16250
  recommended: true,
16250
16251
  supportedMimeTypes: {
@@ -16326,8 +16327,8 @@ var models_default = {
16326
16327
  },
16327
16328
  modelProvider: "MODEL_PROVIDER_GOOGLE",
16328
16329
  quotaInfo: {
16329
- remainingFraction: 0.7753168,
16330
- resetTime: "2026-09-18T11:38:10Z"
16330
+ remainingFraction: 0.964089,
16331
+ resetTime: "2026-09-19T14:53:58Z"
16331
16332
  },
16332
16333
  recommended: true,
16333
16334
  supportedMimeTypes: {
@@ -16409,8 +16410,8 @@ var models_default = {
16409
16410
  },
16410
16411
  modelProvider: "MODEL_PROVIDER_GOOGLE",
16411
16412
  quotaInfo: {
16412
- remainingFraction: 0.7753168,
16413
- resetTime: "2026-09-18T11:38:10Z"
16413
+ remainingFraction: 0.964089,
16414
+ resetTime: "2026-09-19T14:53:58Z"
16414
16415
  },
16415
16416
  recommended: true,
16416
16417
  supportedMimeTypes: {
@@ -16489,8 +16490,8 @@ var models_default = {
16489
16490
  },
16490
16491
  modelProvider: "MODEL_PROVIDER_GOOGLE",
16491
16492
  quotaInfo: {
16492
- remainingFraction: 0.7753168,
16493
- resetTime: "2026-09-18T11:38:10Z"
16493
+ remainingFraction: 0.964089,
16494
+ resetTime: "2026-09-19T14:53:58Z"
16494
16495
  },
16495
16496
  recommended: true,
16496
16497
  requiresImageOutputOutsideFunctionResponses: true,
@@ -16570,8 +16571,8 @@ var models_default = {
16570
16571
  },
16571
16572
  modelProvider: "MODEL_PROVIDER_GOOGLE",
16572
16573
  quotaInfo: {
16573
- remainingFraction: 0.7753168,
16574
- resetTime: "2026-09-18T11:38:10Z"
16574
+ remainingFraction: 0.964089,
16575
+ resetTime: "2026-09-19T14:53:58Z"
16575
16576
  },
16576
16577
  recommended: true,
16577
16578
  supportedMimeTypes: {
@@ -16675,8 +16676,8 @@ var models_default = {
16675
16676
  },
16676
16677
  modelProvider: "MODEL_PROVIDER_GOOGLE",
16677
16678
  quotaInfo: {
16678
- remainingFraction: 0.7753168,
16679
- resetTime: "2026-09-18T11:38:10Z"
16679
+ remainingFraction: 0.964089,
16680
+ resetTime: "2026-09-19T14:53:58Z"
16680
16681
  },
16681
16682
  recommended: true,
16682
16683
  supportedMimeTypes: {
@@ -16745,8 +16746,8 @@ var models_default = {
16745
16746
  model: "MODEL_PLACEHOLDER_M21",
16746
16747
  modelProvider: "MODEL_PROVIDER_GOOGLE",
16747
16748
  quotaInfo: {
16748
- remainingFraction: 0.7753168,
16749
- resetTime: "2026-09-18T11:38:10Z"
16749
+ remainingFraction: 0.964089,
16750
+ resetTime: "2026-09-19T14:53:58Z"
16750
16751
  }
16751
16752
  },
16752
16753
  "gemini-3.1-flash-lite": {
@@ -16764,8 +16765,8 @@ var models_default = {
16764
16765
  },
16765
16766
  modelProvider: "MODEL_PROVIDER_GOOGLE",
16766
16767
  quotaInfo: {
16767
- remainingFraction: 0.7753168,
16768
- resetTime: "2026-09-18T11:38:10Z"
16768
+ remainingFraction: 0.964089,
16769
+ resetTime: "2026-09-19T14:53:58Z"
16769
16770
  }
16770
16771
  },
16771
16772
  "gemini-3.1-pro-high": {
@@ -16796,8 +16797,8 @@ var models_default = {
16796
16797
  },
16797
16798
  modelProvider: "MODEL_PROVIDER_GOOGLE",
16798
16799
  quotaInfo: {
16799
- remainingFraction: 0.7753168,
16800
- resetTime: "2026-09-18T11:38:10Z"
16800
+ remainingFraction: 0.964089,
16801
+ resetTime: "2026-09-19T14:53:58Z"
16801
16802
  },
16802
16803
  recommended: true,
16803
16804
  supportedMimeTypes: {
@@ -16887,8 +16888,8 @@ var models_default = {
16887
16888
  },
16888
16889
  modelProvider: "MODEL_PROVIDER_GOOGLE",
16889
16890
  quotaInfo: {
16890
- remainingFraction: 0.7753168,
16891
- resetTime: "2026-09-18T11:38:10Z"
16891
+ remainingFraction: 0.964089,
16892
+ resetTime: "2026-09-19T14:53:58Z"
16892
16893
  },
16893
16894
  recommended: true,
16894
16895
  supportedMimeTypes: {
@@ -16992,8 +16993,8 @@ var models_default = {
16992
16993
  },
16993
16994
  modelProvider: "MODEL_PROVIDER_GOOGLE",
16994
16995
  quotaInfo: {
16995
- remainingFraction: 0.7753168,
16996
- resetTime: "2026-09-18T11:38:10Z"
16996
+ remainingFraction: 0.964089,
16997
+ resetTime: "2026-09-19T14:53:58Z"
16997
16998
  },
16998
16999
  recommended: true,
16999
17000
  supportedMimeTypes: {
@@ -17075,8 +17076,8 @@ var models_default = {
17075
17076
  },
17076
17077
  modelProvider: "MODEL_PROVIDER_GOOGLE",
17077
17078
  quotaInfo: {
17078
- remainingFraction: 0.7753168,
17079
- resetTime: "2026-09-18T11:38:10Z"
17079
+ remainingFraction: 0.964089,
17080
+ resetTime: "2026-09-19T14:53:58Z"
17080
17081
  },
17081
17082
  recommended: true,
17082
17083
  supportedMimeTypes: {
@@ -17182,8 +17183,8 @@ var models_default = {
17182
17183
  },
17183
17184
  modelProvider: "MODEL_PROVIDER_GOOGLE",
17184
17185
  quotaInfo: {
17185
- remainingFraction: 0.7753168,
17186
- resetTime: "2026-09-18T11:38:10Z"
17186
+ remainingFraction: 0.964089,
17187
+ resetTime: "2026-09-19T14:53:58Z"
17187
17188
  },
17188
17189
  recommended: true,
17189
17190
  supportedMimeTypes: {
@@ -17301,8 +17302,8 @@ var models_default = {
17301
17302
  },
17302
17303
  modelProvider: "MODEL_PROVIDER_GOOGLE",
17303
17304
  quotaInfo: {
17304
- remainingFraction: 0.7753168,
17305
- resetTime: "2026-09-18T11:38:10Z"
17305
+ remainingFraction: 0.964089,
17306
+ resetTime: "2026-09-19T14:53:58Z"
17306
17307
  },
17307
17308
  recommended: true,
17308
17309
  supportedMimeTypes: {
@@ -17420,8 +17421,8 @@ var models_default = {
17420
17421
  },
17421
17422
  modelProvider: "MODEL_PROVIDER_GOOGLE",
17422
17423
  quotaInfo: {
17423
- remainingFraction: 0.7753168,
17424
- resetTime: "2026-09-18T11:38:10Z"
17424
+ remainingFraction: 0.964089,
17425
+ resetTime: "2026-09-19T14:53:58Z"
17425
17426
  },
17426
17427
  recommended: true,
17427
17428
  supportedMimeTypes: {
@@ -17539,8 +17540,8 @@ var models_default = {
17539
17540
  },
17540
17541
  modelProvider: "MODEL_PROVIDER_GOOGLE",
17541
17542
  quotaInfo: {
17542
- remainingFraction: 0.7753168,
17543
- resetTime: "2026-09-18T11:38:10Z"
17543
+ remainingFraction: 0.964089,
17544
+ resetTime: "2026-09-19T14:53:58Z"
17544
17545
  },
17545
17546
  recommended: true,
17546
17547
  supportedMimeTypes: {
@@ -17657,8 +17658,8 @@ var models_default = {
17657
17658
  },
17658
17659
  modelProvider: "MODEL_PROVIDER_GOOGLE",
17659
17660
  quotaInfo: {
17660
- remainingFraction: 0.7753168,
17661
- resetTime: "2026-09-18T11:38:10Z"
17661
+ remainingFraction: 0.964089,
17662
+ resetTime: "2026-09-19T14:53:58Z"
17662
17663
  },
17663
17664
  recommended: true,
17664
17665
  supportedMimeTypes: {
@@ -17768,8 +17769,8 @@ var models_default = {
17768
17769
  },
17769
17770
  modelProvider: "MODEL_PROVIDER_GOOGLE",
17770
17771
  quotaInfo: {
17771
- remainingFraction: 0.7753168,
17772
- resetTime: "2026-09-18T11:38:10Z"
17772
+ remainingFraction: 0.964089,
17773
+ resetTime: "2026-09-19T14:53:58Z"
17773
17774
  },
17774
17775
  recommended: true,
17775
17776
  supportedMimeTypes: {
@@ -17881,8 +17882,8 @@ var models_default = {
17881
17882
  },
17882
17883
  modelProvider: "MODEL_PROVIDER_GOOGLE",
17883
17884
  quotaInfo: {
17884
- remainingFraction: 0.7753168,
17885
- resetTime: "2026-09-18T11:38:10Z"
17885
+ remainingFraction: 0.964089,
17886
+ resetTime: "2026-09-19T14:53:58Z"
17886
17887
  },
17887
17888
  recommended: true,
17888
17889
  supportedMimeTypes: {
@@ -17994,8 +17995,8 @@ var models_default = {
17994
17995
  },
17995
17996
  modelProvider: "MODEL_PROVIDER_GOOGLE",
17996
17997
  quotaInfo: {
17997
- remainingFraction: 0.7753168,
17998
- resetTime: "2026-09-18T11:38:10Z"
17998
+ remainingFraction: 0.964089,
17999
+ resetTime: "2026-09-19T14:53:58Z"
17999
18000
  },
18000
18001
  recommended: true,
18001
18002
  supportedMimeTypes: {
@@ -18106,8 +18107,8 @@ var models_default = {
18106
18107
  },
18107
18108
  modelProvider: "MODEL_PROVIDER_GOOGLE",
18108
18109
  quotaInfo: {
18109
- remainingFraction: 0.7753168,
18110
- resetTime: "2026-09-18T11:38:10Z"
18110
+ remainingFraction: 0.964089,
18111
+ resetTime: "2026-09-19T14:53:58Z"
18111
18112
  },
18112
18113
  recommended: true,
18113
18114
  supportedMimeTypes: {
@@ -18217,8 +18218,8 @@ var models_default = {
18217
18218
  },
18218
18219
  modelProvider: "MODEL_PROVIDER_GOOGLE",
18219
18220
  quotaInfo: {
18220
- remainingFraction: 0.7753168,
18221
- resetTime: "2026-09-18T11:38:10Z"
18221
+ remainingFraction: 0.964089,
18222
+ resetTime: "2026-09-19T14:53:58Z"
18222
18223
  },
18223
18224
  recommended: true,
18224
18225
  supportedMimeTypes: {
@@ -18277,8 +18278,6 @@ var models_default = {
18277
18278
  supportsImages: true,
18278
18279
  supportsThinking: true,
18279
18280
  supportsVideo: true,
18280
- tagDescription: "Limited time",
18281
- tagTitle: "Fast",
18282
18281
  thinkingBudget: -1
18283
18282
  },
18284
18283
  "gemini-3.8-flash-low": {
@@ -18330,8 +18329,8 @@ var models_default = {
18330
18329
  },
18331
18330
  modelProvider: "MODEL_PROVIDER_GOOGLE",
18332
18331
  quotaInfo: {
18333
- remainingFraction: 0.7753168,
18334
- resetTime: "2026-09-18T11:38:10Z"
18332
+ remainingFraction: 0.964089,
18333
+ resetTime: "2026-09-19T14:53:58Z"
18335
18334
  },
18336
18335
  recommended: true,
18337
18336
  supportedMimeTypes: {
@@ -18443,8 +18442,8 @@ var models_default = {
18443
18442
  },
18444
18443
  modelProvider: "MODEL_PROVIDER_GOOGLE",
18445
18444
  quotaInfo: {
18446
- remainingFraction: 0.7753168,
18447
- resetTime: "2026-09-18T11:38:10Z"
18445
+ remainingFraction: 0.964089,
18446
+ resetTime: "2026-09-19T14:53:58Z"
18448
18447
  },
18449
18448
  recommended: true,
18450
18449
  supportedMimeTypes: {
@@ -18555,8 +18554,8 @@ var models_default = {
18555
18554
  },
18556
18555
  modelProvider: "MODEL_PROVIDER_GOOGLE",
18557
18556
  quotaInfo: {
18558
- remainingFraction: 0.7753168,
18559
- resetTime: "2026-09-18T11:38:10Z"
18557
+ remainingFraction: 0.964089,
18558
+ resetTime: "2026-09-19T14:53:58Z"
18560
18559
  },
18561
18560
  recommended: true,
18562
18561
  supportedMimeTypes: {
@@ -18645,8 +18644,8 @@ var models_default = {
18645
18644
  },
18646
18645
  modelProvider: "MODEL_PROVIDER_GOOGLE",
18647
18646
  quotaInfo: {
18648
- remainingFraction: 0.7753168,
18649
- resetTime: "2026-09-18T11:38:10Z"
18647
+ remainingFraction: 0.964089,
18648
+ resetTime: "2026-09-19T14:53:58Z"
18650
18649
  },
18651
18650
  recommended: true,
18652
18651
  supportedMimeTypes: {
@@ -18723,7 +18722,7 @@ var models_default = {
18723
18722
  modelProvider: "MODEL_PROVIDER_OPENAI",
18724
18723
  quotaInfo: {
18725
18724
  remainingFraction: 1,
18726
- resetTime: "2026-09-18T16:07:34Z"
18725
+ resetTime: "2026-09-19T15:08:03Z"
18727
18726
  },
18728
18727
  recommended: true,
18729
18728
  supportsThinking: true,
@@ -21085,97 +21084,140 @@ function createV2FetchInterceptor(getAuthSnapshot) {
21085
21084
  };
21086
21085
  }
21087
21086
  async function setupOpenCodeV2(ctx) {
21088
- ctx.catalog.transform(async (editor) => {
21089
- if (!editor) return;
21090
- const resolveVariants = (modelId) => {
21091
- const mapping = TIER_MAPPING[modelId];
21092
- if (!mapping) return void 0;
21093
- const variants = [];
21094
- if (mapping.minimal !== void 0) variants.push({ id: "minimal" });
21095
- if (mapping.low !== void 0) variants.push({ id: "low" });
21096
- if (mapping.medium !== void 0) variants.push({ id: "medium" });
21097
- if (mapping.high !== void 0) variants.push({ id: "high" });
21098
- return variants.length > 0 ? variants : void 0;
21087
+ const resolveVariants = (modelId) => {
21088
+ const mapping = TIER_MAPPING[modelId];
21089
+ if (!mapping) return void 0;
21090
+ const variants = [];
21091
+ if (mapping.minimal !== void 0) variants.push({ id: "minimal" });
21092
+ if (mapping.low !== void 0) variants.push({ id: "low" });
21093
+ if (mapping.medium !== void 0) variants.push({ id: "medium" });
21094
+ if (mapping.high !== void 0) variants.push({ id: "high" });
21095
+ return variants.length > 0 ? variants : void 0;
21096
+ };
21097
+ const updateProviderRecord = (p) => {
21098
+ p.name = "Antigravity CLI";
21099
+ p.activation = "enabled";
21100
+ p.package = "aisdk:@ai-sdk/google";
21101
+ p.description = "Google Gemini Antigravity Code Assist OAuth provider";
21102
+ p.settings = { ...p.settings || {}, apiKey: "dummy" };
21103
+ p.integrationID = AGY_PROVIDER_ID;
21104
+ };
21105
+ const buildModelRecord = (modelId, simple, existingModel) => {
21106
+ const isClaude = modelId.startsWith("claude-");
21107
+ const isGpt = modelId.startsWith("gpt-");
21108
+ const variants = resolveVariants(modelId);
21109
+ return {
21110
+ id: modelId,
21111
+ providerID: AGY_PROVIDER_ID,
21112
+ name: simple.name,
21113
+ description: simple.description,
21114
+ family: modelId.includes("gemini") ? "gemini" : isClaude ? "claude" : isGpt ? "gpt" : "unknown",
21115
+ reasoning: simple.reasoning,
21116
+ attachment: simple.attachment,
21117
+ tool_call: simple.toolCall,
21118
+ limit: {
21119
+ context: simple.maxTokens,
21120
+ output: simple.maxOutputTokens
21121
+ },
21122
+ cost: simple.cost || { input: 0, output: 0 },
21123
+ ...variants ? { variants } : {},
21124
+ ...existingModel || {}
21099
21125
  };
21100
- if (typeof editor?.provider?.update === "function") {
21101
- editor.provider.update(AGY_PROVIDER_ID, (p) => {
21102
- p.name = "Antigravity CLI";
21103
- p.activation = "enabled";
21104
- p.package = "aisdk:@ai-sdk/google";
21105
- p.description = "Google Gemini Antigravity Code Assist OAuth provider";
21106
- p.settings = { ...p.settings || {}, apiKey: "dummy" };
21107
- p.integrationID = AGY_PROVIDER_ID;
21108
- });
21109
- if (typeof editor?.model?.update === "function") {
21126
+ };
21127
+ const updateModelRecord = (m, modelId, simple) => {
21128
+ m.name = simple.name;
21129
+ m.capabilities = {
21130
+ tools: true,
21131
+ input: ["text", "image"],
21132
+ output: ["text"]
21133
+ };
21134
+ m.limit = {
21135
+ context: simple.maxTokens,
21136
+ output: simple.maxOutputTokens
21137
+ };
21138
+ m.family = "gemini";
21139
+ if (simple.cost) {
21140
+ m.cost = simple.cost;
21141
+ }
21142
+ const variants = resolveVariants(modelId);
21143
+ if (variants) {
21144
+ m.variants = variants;
21145
+ }
21146
+ };
21147
+ if (ctx.provider?.transform) {
21148
+ ctx.provider.transform(async (editor) => {
21149
+ if (!editor) return;
21150
+ if (typeof editor.update === "function") {
21151
+ editor.update(AGY_PROVIDER_ID, updateProviderRecord);
21152
+ } else if (typeof editor.set === "function") {
21153
+ const p = { id: AGY_PROVIDER_ID };
21154
+ updateProviderRecord(p);
21155
+ editor.set(AGY_PROVIDER_ID, p);
21156
+ } else if (typeof editor === "object") {
21157
+ const p = editor[AGY_PROVIDER_ID] || { id: AGY_PROVIDER_ID };
21158
+ updateProviderRecord(p);
21159
+ editor[AGY_PROVIDER_ID] = p;
21160
+ }
21161
+ });
21162
+ }
21163
+ if (ctx.model?.transform) {
21164
+ ctx.model.transform(async (editor) => {
21165
+ if (!editor) return;
21166
+ if (typeof editor.update === "function") {
21110
21167
  for (const [modelId, simple] of Object.entries(STATIC_MODELS_SIMPLE)) {
21111
- editor.model.update(AGY_PROVIDER_ID, modelId, (m) => {
21112
- m.name = simple.name;
21113
- m.capabilities = {
21114
- tools: true,
21115
- input: ["text", "image"],
21116
- output: ["text"]
21117
- };
21118
- m.limit = {
21119
- context: simple.maxTokens,
21120
- output: simple.maxOutputTokens
21121
- };
21122
- m.family = "gemini";
21123
- if (simple.cost) {
21124
- m.cost = simple.cost;
21125
- }
21126
- const variants = resolveVariants(modelId);
21127
- if (variants) {
21128
- m.variants = variants;
21129
- }
21130
- });
21168
+ editor.update(AGY_PROVIDER_ID, modelId, (m) => updateModelRecord(m, modelId, simple));
21169
+ }
21170
+ } else if (typeof editor.set === "function") {
21171
+ for (const [modelId, simple] of Object.entries(STATIC_MODELS_SIMPLE)) {
21172
+ const m = buildModelRecord(modelId, simple);
21173
+ editor.set(`${AGY_PROVIDER_ID}:${modelId}`, m);
21174
+ }
21175
+ } else if (typeof editor === "object") {
21176
+ for (const [modelId, simple] of Object.entries(STATIC_MODELS_SIMPLE)) {
21177
+ const key = `${AGY_PROVIDER_ID}:${modelId}`;
21178
+ editor[key] = buildModelRecord(modelId, simple, editor[key]);
21131
21179
  }
21132
21180
  }
21133
- return;
21134
- }
21135
- const catalog = editor;
21136
- catalog.providers = catalog.providers || {};
21137
- catalog.providers[AGY_PROVIDER_ID] = {
21138
- id: AGY_PROVIDER_ID,
21139
- name: "Antigravity CLI",
21140
- npm: "aisdk:@ai-sdk/google",
21141
- settings: { apiKey: "dummy" },
21142
- integrationID: AGY_PROVIDER_ID,
21143
- models: { ...catalog.providers[AGY_PROVIDER_ID]?.models || {} },
21144
- ...catalog.providers[AGY_PROVIDER_ID]
21145
- };
21146
- if (catalog.providers[AGY_PROVIDER_ID].settings) {
21147
- catalog.providers[AGY_PROVIDER_ID].settings = {
21148
- ...catalog.providers[AGY_PROVIDER_ID].settings,
21149
- apiKey: "dummy"
21150
- };
21151
- } else {
21152
- catalog.providers[AGY_PROVIDER_ID].settings = { apiKey: "dummy" };
21153
- }
21154
- catalog.providers[AGY_PROVIDER_ID].integrationID = AGY_PROVIDER_ID;
21155
- const targetModels = catalog.providers[AGY_PROVIDER_ID].models;
21156
- for (const [modelId, simple] of Object.entries(STATIC_MODELS_SIMPLE)) {
21157
- const isClaude = modelId.startsWith("claude-");
21158
- const isGpt = modelId.startsWith("gpt-");
21159
- const variants = resolveVariants(modelId);
21160
- targetModels[modelId] = {
21161
- id: modelId,
21162
- providerID: AGY_PROVIDER_ID,
21163
- name: simple.name,
21164
- description: simple.description,
21165
- family: modelId.includes("gemini") ? "gemini" : isClaude ? "claude" : isGpt ? "gpt" : "unknown",
21166
- reasoning: simple.reasoning,
21167
- attachment: simple.attachment,
21168
- tool_call: simple.toolCall,
21169
- limit: {
21170
- context: simple.maxTokens,
21171
- output: simple.maxOutputTokens
21172
- },
21173
- cost: simple.cost || { input: 0, output: 0 },
21174
- ...variants ? { variants } : {},
21175
- ...targetModels[modelId] || {}
21181
+ });
21182
+ }
21183
+ if (ctx.catalog?.transform) {
21184
+ ctx.catalog.transform(async (editor) => {
21185
+ if (!editor) return;
21186
+ if (typeof editor?.provider?.update === "function") {
21187
+ editor.provider.update(AGY_PROVIDER_ID, updateProviderRecord);
21188
+ if (typeof editor?.model?.update === "function") {
21189
+ for (const [modelId, simple] of Object.entries(STATIC_MODELS_SIMPLE)) {
21190
+ editor.model.update(AGY_PROVIDER_ID, modelId, (m) => updateModelRecord(m, modelId, simple));
21191
+ }
21192
+ }
21193
+ return;
21194
+ }
21195
+ const catalog = editor;
21196
+ catalog.providers = catalog.providers || {};
21197
+ catalog.providers[AGY_PROVIDER_ID] = {
21198
+ id: AGY_PROVIDER_ID,
21199
+ name: "Antigravity CLI",
21200
+ npm: "aisdk:@ai-sdk/google",
21201
+ settings: { apiKey: "dummy" },
21202
+ integrationID: AGY_PROVIDER_ID,
21203
+ models: { ...catalog.providers[AGY_PROVIDER_ID]?.models || {} },
21204
+ ...catalog.providers[AGY_PROVIDER_ID]
21176
21205
  };
21177
- }
21178
- });
21206
+ if (catalog.providers[AGY_PROVIDER_ID].settings) {
21207
+ catalog.providers[AGY_PROVIDER_ID].settings = {
21208
+ ...catalog.providers[AGY_PROVIDER_ID].settings,
21209
+ apiKey: "dummy"
21210
+ };
21211
+ } else {
21212
+ catalog.providers[AGY_PROVIDER_ID].settings = { apiKey: "dummy" };
21213
+ }
21214
+ catalog.providers[AGY_PROVIDER_ID].integrationID = AGY_PROVIDER_ID;
21215
+ const targetModels = catalog.providers[AGY_PROVIDER_ID].models;
21216
+ for (const [modelId, simple] of Object.entries(STATIC_MODELS_SIMPLE)) {
21217
+ targetModels[modelId] = buildModelRecord(modelId, simple, targetModels[modelId]);
21218
+ }
21219
+ });
21220
+ }
21179
21221
  ctx.tool.transform(async (editor) => {
21180
21222
  if (!editor) return;
21181
21223
  const quotaTool = createAgyQuotaTool({