fix: preserve runtime tool schemas in Claude tool output

This commit is contained in:
shern-point
2026-04-29 01:59:24 +08:00
parent a550de30af
commit 48c4f0df9f
5 changed files with 11 additions and 25 deletions

View File

@@ -52,6 +52,7 @@ func (s *claudeStreamRuntime) finalize(stopReason string) {
detected = toolcall.ParseStandaloneToolCalls(finalThinking, s.toolNames)
}
if len(detected) > 0 {
detected = toolcall.NormalizeParsedToolCallsForSchemas(detected, s.toolsRaw)
stopReason = "tool_use"
for i, tc := range detected {
idx := s.nextBlockIndex + i