antigravity-claude-proxy 2.2.1 → 2.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antigravity-claude-proxy",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "description": "Proxy server to use Antigravity's Claude models with Claude Code CLI",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -220,17 +220,13 @@ export async function discoverProject(token, projectId = undefined) {
220
220
  let gotSuccessfulResponse = false;
221
221
  let loadCodeAssistData = null;
222
222
 
223
- // Build metadata matching reference: only set duetProject if projectId is truthy
224
- // For loadCodeAssist, reference passes projectId ?? fallbackProjectId
225
- // Reference: opencode-antigravity-auth/src/plugin/project.ts buildMetadata()
226
- const projectIdForLoad = projectId ?? DEFAULT_PROJECT_ID;
227
223
  const metadata = {
228
224
  ideType: 'IDE_UNSPECIFIED',
229
225
  platform: 'PLATFORM_UNSPECIFIED',
230
226
  pluginType: 'GEMINI'
231
227
  };
232
- if (projectIdForLoad) {
233
- metadata.duetProject = projectIdForLoad;
228
+ if (projectId) {
229
+ metadata.duetProject = projectId;
234
230
  }
235
231
 
236
232
  for (const endpoint of LOAD_CODE_ASSIST_ENDPOINTS) {
@@ -282,23 +278,11 @@ export async function discoverProject(token, projectId = undefined) {
282
278
 
283
279
  // If we got a successful response but no project, try onboarding
284
280
  if (gotSuccessfulResponse && loadCodeAssistData) {
285
- // Priority: paidTier > currentTier > allowedTiers (consistent with model-api.js)
286
- let tierId = null;
287
- let tierSource = null;
288
-
289
- if (loadCodeAssistData.paidTier?.id) {
290
- tierId = loadCodeAssistData.paidTier.id;
291
- tierSource = 'paidTier';
292
- } else if (loadCodeAssistData.currentTier?.id) {
293
- tierId = loadCodeAssistData.currentTier.id;
294
- tierSource = 'currentTier';
295
- } else {
296
- tierId = getDefaultTierId(loadCodeAssistData.allowedTiers);
297
- tierSource = 'allowedTiers';
298
- }
299
-
300
- tierId = tierId || 'free-tier';
301
- logger.info(`[AccountManager] Onboarding user with tier: ${tierId} (source: ${tierSource})`);
281
+ // Only use allowedTiers for onboarding (matching opencode-antigravity-auth and oauth.js)
282
+ // Note: paidTier (g1-pro-tier, g1-ultra-tier) is NOT valid for onboardUser API
283
+ // The paidTier is used for subscription detection only, not for onboarding
284
+ const tierId = getDefaultTierId(loadCodeAssistData.allowedTiers) || 'free-tier';
285
+ logger.info(`[AccountManager] Onboarding user with tier: ${tierId}`);
302
286
 
303
287
  // Pass projectId for metadata.duetProject (without fallback, matching reference)
304
288
  // Reference: opencode-antigravity-auth passes parts.projectId (not fallback) to onboardManagedProject