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

Merge PR #885 antigravity-audit into release/v3.4.2

diegosouzapwb5389cadc847
diff --cc open-sse/executors/antigravity.ts
index f831da14fc,beb7439e71..ab8208779a
--- a/open-sse/executors/antigravity.ts
+++ b/open-sse/executors/antigravity.ts
@@@ -209,11 -318,16 +321,21 @@@ export class AntigravityExecutor extend
const MAX_AUTO_RETRIES = 3;
const retryAttemptsByUrl = {}; // Track retry attempts per URL
+ // Always stream upstream — buildUrl always returns the streaming endpoint.
+ // For non-streaming clients, we collect the SSE below and return a synthetic
+ // non-streaming Response so chatCore's non-streaming path stays unchanged.
+ const upstreamStream = true;
+
for (let urlIndex = 0; urlIndex < fallbackCount; urlIndex++) {
- const url = this.buildUrl(model, stream, urlIndex);
- const headers = this.buildHeaders(credentials, stream);
+ const url = this.buildUrl(model, upstreamStream, urlIndex);
+ const headers = this.buildHeaders(credentials, upstreamStream);
mergeUpstreamExtraHeaders(headers, upstreamExtraHeaders);
- const transformedBody = await this.transformRequest(model, body, stream, credentials);
- const transformedBody = this.transformRequest(model, body, upstreamStream, credentials);
++ const transformedBody = await this.transformRequest(
++ model,
++ body,
++ upstreamStream,
++ credentials
++ );
// Initialize retry counter for this URL
if (!retryAttemptsByUrl[urlIndex]) {