Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

Update open-sse/executors/antigravity.ts

Diego Rodrigues de Sa e Souzac39faba2b5c5
diff --git a/open-sse/executors/antigravity.ts b/open-sse/executors/antigravity.ts
index 4e03453a66..ad5fdaae67 100644
--- a/open-sse/executors/antigravity.ts
+++ b/open-sse/executors/antigravity.ts
@@ -36,14 +36,16 @@ export class AntigravityExecutor extends BaseExecutor {
}
transformRequest(model, body, stream, credentials) {
- const hasRealProject = !!credentials?.projectId;
- const projectId = credentials?.projectId || this.generateProjectId();
+ const bodyProjectId = body?.project;
+ const credentialsProjectId = credentials?.projectId;
+ const hasExplicitProject = !!(bodyProjectId || credentialsProjectId);
+ const projectId = bodyProjectId || credentialsProjectId || this.generateProjectId();
- if (!hasRealProject) {
+ if (!hasExplicitProject) {
console.warn(
- `[Antigravity] ⚠️ No projectId in credentials — using generated fallback "${projectId}". ` +
+ `[Antigravity] ⚠️ No projectId provided via body or credentials — using generated fallback "${projectId}". ` +
`This may cause 404 errors if the account has no active GCP project. ` +
- `Ensure the OAuth token includes a valid project.`
+ `Ensure the OAuth token includes a valid project or the request includes a project field.`
);
}