This commit is contained in:
Timothy Jaeryang Baek
2026-07-27 02:42:36 -04:00
parent 12974c9e4e
commit 0576e8eeb5
2 changed files with 8 additions and 6 deletions
+1 -3
View File
@@ -1928,9 +1928,7 @@ async def generate_messages(
if isinstance(response, StreamingResponse):
# Streaming response: wrap the generator to convert SSE format
return StreamingResponse(
openai_stream_to_anthropic_stream(
response.body_iterator, model=requested_model, input_tokens=input_tokens or 0
),
openai_stream_to_anthropic_stream(response.body_iterator, model=requested_model, input_tokens=input_tokens),
media_type='text/event-stream',
headers={
'Cache-Control': 'no-cache',