debug: log request body

This commit is contained in:
ashisgreat22 2026-04-15 08:21:24 +00:00
parent 4d2ccfdaaa
commit 35878c0a92

View file

@ -106,7 +106,8 @@ func handleChatCompletions(w http.ResponseWriter, r *http.Request) {
anthropicReq := ConvertOpenAIRequest(&req) anthropicReq := ConvertOpenAIRequest(&req)
anthropicReq.Stream = true // Always stream from upstream for reliability anthropicReq.Stream = true // Always stream from upstream for reliability
log.Printf("[debug] Sending to upstream %s, model=%s", config.UpstreamURL, req.Model) reqBody, _ := json.Marshal(anthropicReq)
log.Printf("[debug] Sending to upstream %s, model=%s, body=%s", config.UpstreamURL, req.Model, string(reqBody))
// Proxy to upstream (always streaming) // Proxy to upstream (always streaming)
resp, err := proxyToUpstream(anthropicReq, apiKey, sessionID, true) resp, err := proxyToUpstream(anthropicReq, apiKey, sessionID, true)