mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-18 06:15:51 +00:00
feat: 添加gemini协议适配 (#125)
* feat: 添加gemini协议适配 * Remove unrelated local files from Gemini PR
This commit is contained in:
@@ -2249,10 +2249,13 @@ export function normalizeMessagesForAPI(
|
||||
}
|
||||
}
|
||||
|
||||
// When tool search is NOT enabled, explicitly construct tool_use
|
||||
// block with only standard API fields to avoid sending fields like
|
||||
// 'caller' that may be stored in sessions from tool search runs
|
||||
// When tool search is NOT enabled, strip tool-search-only fields
|
||||
// like 'caller', but preserve other provider metadata attached to
|
||||
// the block (for example Gemini thought signatures on tool_use).
|
||||
const { caller: _caller, ...toolUseRest } = block as ToolUseBlock &
|
||||
Record<string, unknown> & { caller?: unknown }
|
||||
return {
|
||||
...toolUseRest,
|
||||
type: 'tool_use' as const,
|
||||
id: toolUseBlk.id,
|
||||
name: canonicalName,
|
||||
|
||||
Reference in New Issue
Block a user