mirror of
https://github.com/openai/codex.git
synced 2026-05-04 21:32:21 +03:00
Do not double encode request bodies in logging (#6558)
This commit is contained in:
@@ -338,7 +338,7 @@ pub(crate) async fn stream_chat_completions(
|
|||||||
debug!(
|
debug!(
|
||||||
"POST to {}: {}",
|
"POST to {}: {}",
|
||||||
provider.get_full_url(&None),
|
provider.get_full_url(&None),
|
||||||
serde_json::to_string_pretty(&payload).unwrap_or_default()
|
payload.to_string()
|
||||||
);
|
);
|
||||||
|
|
||||||
let mut attempt = 0;
|
let mut attempt = 0;
|
||||||
|
|||||||
@@ -294,10 +294,9 @@ impl ModelClient {
|
|||||||
let auth = auth_manager.as_ref().and_then(|m| m.auth());
|
let auth = auth_manager.as_ref().and_then(|m| m.auth());
|
||||||
|
|
||||||
trace!(
|
trace!(
|
||||||
"POST to {}: {:?}",
|
"POST to {}: {}",
|
||||||
self.provider.get_full_url(&auth),
|
self.provider.get_full_url(&auth),
|
||||||
serde_json::to_string(payload_json)
|
payload_json.to_string()
|
||||||
.unwrap_or("<unable to serialize payload>".to_string())
|
|
||||||
);
|
);
|
||||||
|
|
||||||
let mut req_builder = self
|
let mut req_builder = self
|
||||||
|
|||||||
Reference in New Issue
Block a user