feat(api): add support for Gemini API format and enhance channel configuration

This commit is contained in:
HouYunFei
2026-06-17 10:24:55 +08:00
parent 6300f5fb26
commit 8cbe00e348
8 changed files with 347 additions and 17 deletions
@@ -1056,7 +1056,7 @@ function isResponseToolCall(value: unknown): value is ResponseToolCall {
}
function toolCallToResponseInput(call: ResponseToolCall): ResponseInputMessage {
return { type: "function_call", call_id: call.id, name: call.function.name, arguments: call.function.arguments };
return { type: "function_call", call_id: call.id, name: call.function.name, arguments: call.function.arguments, ...(call.thoughtSignature ? { thoughtSignature: call.thoughtSignature } : {}) };
}
function summarizeToolCalls(calls: ResponseToolCall[]) {