Skip to content

Commit 9f605e2

Browse files
committed
Update gemini_fix.py
1 parent 71c6727 commit 9f605e2

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/converter/gemini_fix.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,10 @@ async def normalize_gemini_request(
785785
# 1. 安全设置覆盖
786786
if "tools" in result:
787787
result["tools"] = _normalize_tools_for_internal_api(result.get("tools"))
788-
result["tools"] = _ensure_empty_tool_schema_for_claude(result.get("tools"), model)
788+
# _ensure_empty_tool_schema_for_claude wraps tools in {"custom": ...} which is
789+
# only understood by the GeminiCLI internal API, not Vertex AI (antigravity mode).
790+
if mode == "geminicli":
791+
result["tools"] = _ensure_empty_tool_schema_for_claude(result.get("tools"), model)
789792

790793
if "lite" in model.lower():
791794
result["safetySettings"] = LITE_SAFETY_SETTINGS

0 commit comments

Comments
 (0)