This commit is contained in:
decolua
2026-03-30 17:27:15 +07:00
parent 054facb08b
commit 01787a3d5b
3 changed files with 26 additions and 24 deletions

View File

@@ -70,7 +70,9 @@ export function geminiToOpenAIResponse(chunk, state) {
// Emit function call, attaching the best available thoughtSignature
if (hasFunctionCall) {
const fcName = part.functionCall.name;
const rawName = part.functionCall.name;
// Restore original tool name from mapping (AG cloaking)
const fcName = state.toolNameMap?.get(rawName) || rawName;
const fcArgs = part.functionCall.args || {};
const toolCallIndex = state.functionIndex++;
// Use signature from this part, or the one carried from a preceding part