We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa2be6f commit 794924bCopy full SHA for 794924b
autogen/oai/client.py
@@ -639,8 +639,11 @@ def _create_or_parse(*args, **kwargs):
639
warnings.warn(
640
f"The {params.get('model')} model does not support streaming. The stream will be set to False."
641
)
642
- if params.get("tools", False):
643
- raise ModelToolNotSupportedError(params.get("model"))
+ if "tools" in params:
+ if params["tools"]: # If tools exist, raise as unsupported
644
+ raise ModelToolNotSupportedError(params.get("model"))
645
+ else:
646
+ params.pop("tools") # Remove empty tools list
647
self._process_reasoning_model_params(params)
648
params["stream"] = False
649
response = create_or_parse(**params)
0 commit comments