fix chat_options in kwargs error path in responses client (#483)

This commit is contained in:
peterychang
2025-08-25 12:52:42 -04:00
committed by GitHub
Unverified
parent 32c26c3c25
commit 7942a52ca1
3 changed files with 9 additions and 12 deletions
@@ -499,6 +499,7 @@ class ChatClientBase(AFBaseModel, ABC):
Returns:
A chat response from the model.
"""
# Should we merge chat options instead of ignoring the input params?
if "chat_options" in kwargs:
chat_options = kwargs.pop("chat_options")
if not isinstance(chat_options, ChatOptions):
@@ -579,6 +580,7 @@ class ChatClientBase(AFBaseModel, ABC):
Yields:
A stream representing the response(s) from the LLM.
"""
# Should we merge chat options instead of ignoring the input params?
if "chat_options" in kwargs:
chat_options = kwargs.pop("chat_options")
if not isinstance(chat_options, ChatOptions):