Open
Description
Please read this first
- Have you read the custom model provider docs, including the 'Common issues' section? Model provider docs
- Have you searched for related issues? Others may have faced similar issues.
Describe the question
A clear and concise description of what the question or bug is.
Debug information
- Agents SDK version: (e.g.
v0.0.3
) - Python version (e.g. Python 3.10)
Repro steps
Ideally provide a minimal python script that can be run to reproduce the issue.
Expected behavior
A clear and concise description of what you expected to happen.
Currently, I have only changed all the models in the example financial_research_agent to qwen3-32b. However, in the case of the writer_agent, it used two other agents as tools to pass them in, which caused an error in the qwen3 model.
The change is as follows:
custom_client = AsyncOpenAI(
base_url="xxxx",
api_key="xxxxx"
)
model_name = 'qwen/qwen3-32b'
set_default_openai_client(custom_client)
set_tracing_disabled(disabled=True)
The error is as follows:
openai.BadRequestError: Error code: 400 - {'error': {'message': 'Provider returned error', 'code': 400, 'metadata': {'raw': '{"message":"\\"tools\\" is incompatible with
\\"response_format\\"","type":"invalid_request_error","param":"tools","code":"wrong_api_format"}', 'provider_name': 'Cerebras'}},