Skip to content

Commit da956b2

Browse files
committed
Update proxy_plugin.py
1 parent a5e3588 commit da956b2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

optillm/plugins/proxy_plugin.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,17 @@ def run(system_prompt: str, initial_query: str, client, model: str,
204204
if not supports_system_messages:
205205
logger.info(f"Using fallback message formatting for {model} (no system message support)")
206206

207+
# Strip stream parameter to force complete response
208+
# server.py will handle converting to SSE streaming format if needed
209+
api_config = dict(request_config or {})
210+
api_config.pop('stream', None)
211+
207212
response = proxy_client.chat.completions.create(
208213
model=model,
209214
messages=messages,
210-
**(request_config or {})
215+
**api_config
211216
)
212-
217+
213218
# Return full response dict to preserve all usage information
214219
response_dict = response.model_dump() if hasattr(response, 'model_dump') else response
215220
return response_dict, 0

0 commit comments

Comments
 (0)