refactor: Simplify logging in RemoteAPIChat HTTP requests

- Removed header printing from the chatWithRawHTTP method to streamline logging.
- Updated log message to focus on endpoint and model name, enhancing clarity while reducing verbosity.
This commit is contained in:
wizardchen
2026-04-23 11:22:44 +08:00
parent 7dd6ed47c1
commit 9f916181db
+2 -7
View File
@@ -368,13 +368,8 @@ func (c *RemoteAPIChat) chatWithRawHTTP(ctx context.Context, endpoint string, cu
httpReq.Header.Set("Authorization", "Bearer "+c.apiKey)
}
// print headers
headers, err := json.Marshal(httpReq.Header)
if err != nil {
return nil, fmt.Errorf("marshal headers: %w", err)
}
logger.Infof(ctx, "[LLM Request] Remote HTTP, endpoint=%s, model=%s, headers: %s",
endpoint, c.modelName, string(headers))
logger.Infof(ctx, "[LLM Request] Remote HTTP, endpoint=%s, model=%s",
endpoint, c.modelName)
resp, err := rawHTTPClient.Do(httpReq)
if err != nil {