Skip to content

Fix preserved state across OpenAI requests when backend_body / backend_params are used #236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/guidellm/backend/openai.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import base64
import copy
import json
import time
from collections.abc import AsyncGenerator
Expand Down Expand Up @@ -428,9 +429,9 @@ def _extra_body(self, endpoint_type: EndpointType) -> dict[str, Any]:
or MODELS in self.extra_body
or TEXT_COMPLETIONS in self.extra_body
):
return self.extra_body.get(endpoint_type, {})
return copy.deepcopy(self.extra_body.get(endpoint_type, {}))

return self.extra_body
return copy.deepcopy(self.extra_body)

def _completions_payload(
self,
Expand Down