This commit is contained in:
decolua
2026-03-30 12:21:24 +07:00
parent abbf8ec86f
commit e6299eef56
6 changed files with 241 additions and 5 deletions

View File

@@ -59,7 +59,9 @@ export function geminiToOpenAIResponse(chunk, state) {
}
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++;
@@ -107,7 +109,9 @@ export function geminiToOpenAIResponse(chunk, state) {
// Function call
if (part.functionCall) {
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++;