diff --git a/routstr/upstream/base.py b/routstr/upstream/base.py index 576ade2f..84673860 100644 --- a/routstr/upstream/base.py +++ b/routstr/upstream/base.py @@ -143,7 +143,6 @@ class BaseUpstreamProvider: # Explicitly define the list of supported compression encodings headers["accept-encoding"] = "gzip, deflate, br, identity" - logger.debug( "Headers prepared for upstream", extra={ @@ -512,7 +511,7 @@ class BaseUpstreamProvider: ) await finalize_without_usage() raise - + # Remove inaccurate encoding headers from upstream response response_headers = dict(response.headers) response_headers.pop("content-encoding", None) @@ -521,7 +520,7 @@ class BaseUpstreamProvider: return StreamingResponse( stream_with_cost(max_cost_for_model), status_code=response.status_code, - headers=response_headers, + headers=response_headers, ) async def handle_non_streaming_chat_completion( diff --git a/tests/integration/test_general_info_endpoints.py b/tests/integration/test_general_info_endpoints.py index 41250f66..4c7af5f1 100644 --- a/tests/integration/test_general_info_endpoints.py +++ b/tests/integration/test_general_info_endpoints.py @@ -379,4 +379,4 @@ async def test_info_endpoints_response_consistency( # Model IDs should be the same first_ids = {m["id"] for m in first_models} response_ids = {m["id"] for m in models} - assert first_ids == response_ids \ No newline at end of file + assert first_ids == response_ids