fix(proxy): say a forwarded streaming error came from the provider

The old line, "Forwarding upstream streaming error status=429", read to
a user as if the proxy might have made the 429 itself. Name the provider
as the source and say the error goes to the client. Fields are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Garm
2026-11-04 09:28:57 +01:00
co-authored by Claude Opus 5.5
parent 5c8772b721
commit 226ff6fa63
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1479,7 +1479,7 @@ class StreamingMixin:
if upstream_response.status_code >= 400:
logger.warning(
"[%s] Forwarding upstream streaming error status=%s url=%s",
"[%s] Upstream provider returned an error; forwarding it to the client status=%s url=%s",
request_id,
upstream_response.status_code,
url,
@@ -493,7 +493,7 @@ class TestStreamingRatelimitHeaderForwarding:
assert result.body == b'{"error":{"message":"capacity exhausted"}}'
assert result.headers.get("content-encoding") is None
fake_logger.warning.assert_any_call(
"[%s] Forwarding upstream streaming error status=%s url=%s",
"[%s] Upstream provider returned an error; forwarding it to the client status=%s url=%s",
"test-http-error",
503,
"https://api.anthropic.com/v1/messages",