feature: Improves schema flattening and tool use handling

Updates schema flattening logic to handle multiple non-null types, providing a more descriptive "Accepts" hint.

Removes redundant tracking of the current tool name in `Params` as it's no longer needed for streaming limits, simplifying the structure.
This commit is contained in:
이대희
2025-12-17 17:30:23 +09:00
parent 27734a23b1
commit aea337cfe2
3 changed files with 35 additions and 8 deletions

View File

@@ -25,8 +25,7 @@ type Params struct {
HasFirstResponse bool
ResponseType int
ResponseIndex int
HasContent bool // Tracks whether any content (text, thinking, or tool use) has been output
CurrentToolName string // Tracks the current function name for streaming limits
HasContent bool // Tracks whether any content (text, thinking, or tool use) has been output
}
// toolUseIDCounter provides a process-wide unique counter for tool use identifiers.
@@ -234,7 +233,6 @@ func ConvertGeminiResponseToClaude(_ context.Context, _ string, originalRequestR
}
(*param).(*Params).ResponseType = 3
(*param).(*Params).HasContent = true
(*param).(*Params).CurrentToolName = fcName
}
}
}