agentscope-ai / agentscope-ai/agentscope
[Bug]: `qwen3.5-35b-a3b` with a `structured_model` raise `openai.BadRequestError`
- 主要语言
- Python
- 星标
- 31.6k
- 派生
- 3.5k
- 平均合并
- 1 天 16 小时
- 30 天内合并 PR
- 103
描述
**Describe the bug**
By calling an agent in the following common pattern with a `structured_model`:
```py
agent = ReActAgent(
name="Vanilla",
sys_prompt=prompt.metadata.get(
"sys_prompt", "You're a helpful assistant named Vanilla."
),
model=OpenAIChatModel(
model_name=model,
api_key=api_key,
stream=stream,
client_kwargs={
"base_url": base_url,
"timeout": timeout,
"max_retries": max_retries,
},
generate_kwargs={
"max_tokens": max_tokens,
"temperature": temperature,
},
),
formatter=OpenAIChatFormatter(),
)
return await agent(prompt, structured_model=prompt.metadata.get("structured_model"))
```
When the `model` is set to `qwen3.5-35b-a3b`, a conflict about thinking mode and tool choice emerges:
```bash
openai.BadRequestError: Error code: 400 - {'error': {'message': '<400> ***.***.InvalidParameter: The tool_choice parameter does not support being set to required or object in thinking mode', 'type': 'invalid_request_error', 'param': '', 'code': 'invalid_parameter_error'}}
```
**To Reproduce**
Design any `structured_model` and pass it to a vanilla agent, whose model should be set to `qwen3.5-35b-a3b`.
**Expected behavior**
The `structured_model` parameter can be used with `qwen3.5-35b-a3b` without throwing exceptions.
**Error messages**
Refer to the above description.
**Environment (please complete the following information):**
- AgentScope Version: 1.0.16
- Python Version: 3.10
- OS: Ubuntu 22.04
**Additional context**
None
贡献指南
评估
这个 Issue 还没有评估数据。