refactor(openai_compat): replace log.Printf with structured logger

This commit is contained in:
程智超0668000959
2026-06-14 23:41:48 +08:00
parent cf67dd3851
commit 97039b259e
+4 -2
View File
@@ -7,7 +7,6 @@ import (
"encoding/json"
"fmt"
"io"
"log"
"maps"
"net/http"
"net/url"
@@ -769,7 +768,10 @@ func parseStreamResponse(
raw := acc.argsJSON.String()
if raw != "" {
if err := json.Unmarshal([]byte(raw), &args); err != nil {
log.Printf("openai_compat stream: failed to decode tool call arguments for %q: %v", acc.name, err)
logger.WarnCF("openai_compat", "stream: failed to decode tool call arguments", map[string]any{
"tool": acc.name,
"error": err.Error(),
})
args["raw"] = raw
}
}