1 Commits

Author SHA1 Message Date
b8641b5f8c fix(litellm): guard args map against nil arguments 2026-05-23 08:13:48 +00:00

View File

@@ -233,6 +233,9 @@ func oaiChoiceToContent(choice oaiChoice) *genai.Content {
for _, tc := range msg.ToolCalls {
var args map[string]any
_ = json.Unmarshal([]byte(tc.Function.Arguments), &args)
if args == nil {
args = map[string]any{}
}
parts = append(parts, &genai.Part{
FunctionCall: &genai.FunctionCall{
ID: tc.ID,