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

fix(gemini): emit signaturelessToolCallMode:text for GEMINI format models (#2801)

Hernan Javier Ardila Sanchez0e9aed4d0398
diff --git a/open-sse/translator/request/openai-to-gemini.ts b/open-sse/translator/request/openai-to-gemini.ts
index 1413ef9d20..adfa76c274 100644
--- a/open-sse/translator/request/openai-to-gemini.ts
+++ b/open-sse/translator/request/openai-to-gemini.ts
@@ -523,7 +523,10 @@ export function openaiToGeminiRequest(
model: string,
body: Record<string, unknown>,
stream: boolean,
- credentials: Record<string, unknown> | null = null
+ credentials: Record<string, unknown> | null = null,
+ options: {
+ signaturelessToolCallMode?: "native" | "text";
+ } = {}
) {
// Thread the signature namespace so a thinking model's thoughtSignature (cached on the
// response turn under `<connectionId>:<toolCallId>`) is found and re-attached to the
@@ -533,7 +536,10 @@ export function openaiToGeminiRequest(
credentials && typeof credentials._signatureNamespace === "string"
? credentials._signatureNamespace
: null;
- return openaiToGeminiBase(model, body, stream, { signatureNamespace });
+ return openaiToGeminiBase(model, body, stream, {
+ signatureNamespace,
+ signaturelessToolCallMode: options.signaturelessToolCallMode,
+ });
}
// OpenAI -> Gemini CLI (Cloud Code Assist)
@@ -695,7 +701,15 @@ export function openaiToAntigravityRequest(model, body, stream, credentials = nu
}
// Register
-register(FORMATS.OPENAI, FORMATS.GEMINI, openaiToGeminiRequest, null);
+register(
+ FORMATS.OPENAI,
+ FORMATS.GEMINI,
+ (model, body, stream = false, credentials = null) =>
+ openaiToGeminiRequest(model, body, stream, credentials, {
+ signaturelessToolCallMode: "text",
+ }),
+ null
+);
register(
FORMATS.OPENAI,
FORMATS.GEMINI_CLI,