From f62b104fbed293e2ed0e58807c004a66d1ad7fa6 Mon Sep 17 00:00:00 2001 From: Kunal Karmakar Date: Sat, 28 Mar 2026 03:10:30 +0000 Subject: [PATCH] Revert "Add logging for request and response" This reverts commit 6a933287852ad16e84980daa0b2a326deef8dc4b. --- pkg/providers/azure/provider.go | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/pkg/providers/azure/provider.go b/pkg/providers/azure/provider.go index ea72dc9a0..093b976c6 100644 --- a/pkg/providers/azure/provider.go +++ b/pkg/providers/azure/provider.go @@ -5,7 +5,6 @@ import ( "context" "encoding/json" "fmt" - "io" "net/http" "net/url" "strings" @@ -14,7 +13,6 @@ import ( "github.com/openai/openai-go/v3" "github.com/openai/openai-go/v3/responses" - "github.com/sipeed/picoclaw/pkg/logger" "github.com/sipeed/picoclaw/pkg/providers/common" orc "github.com/sipeed/picoclaw/pkg/providers/openai_responses_common" "github.com/sipeed/picoclaw/pkg/providers/protocoltypes" @@ -139,11 +137,6 @@ func (p *Provider) Chat( return nil, fmt.Errorf("failed to marshal request: %w", err) } - logger.InfoCF("provider.azure", "Responses API request", map[string]any{ - "url": requestURL, - "body": string(jsonData), - }) - req, err := http.NewRequestWithContext(ctx, "POST", requestURL, bytes.NewReader(jsonData)) if err != nil { return nil, fmt.Errorf("failed to create request: %w", err) @@ -164,17 +157,7 @@ func (p *Provider) Chat( return nil, common.HandleErrorResponse(resp, p.apiBase) } - respBody, err := io.ReadAll(resp.Body) - if err != nil { - return nil, fmt.Errorf("failed to read response body: %w", err) - } - - logger.InfoCF("provider.azure", "Responses API response", map[string]any{ - "status": resp.StatusCode, - "body": string(respBody), - }) - - return orc.ParseResponseBody(bytes.NewReader(respBody), &p.lastResponseID) + return orc.ParseResponseBody(resp.Body, &p.lastResponseID) } // GetDefaultModel returns an empty string as Azure deployments are user-configured.