[FEATURE] InputValidationError in sub-agent execution when using custom ANTHROPIC_BASE_URL
Resolved 💬 3 comments Opened Dec 24, 2025 by erniu3 Closed Dec 27, 2025
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
I am encountering an issue when using Claude Agent SDK with a custom ANTHROPIC_BASE_URL and model
While the main conversation loop functions correctly, the Sub-Agent (e.g., Explore) crashes.
The root cause appears to be strict schema validation in the sub-agent's tool definition. It enforces an Enum check on the model parameter, accepting only ['sonnet', 'opus', 'haiku']. Since I am using a custom model (qwen3-max), the validation fails.
Proposed Solution
Could you please remove the strict enum validation on the model parameter for sub-agents?
Alternative Solutions
_No response_
Priority
Critical - Blocking my work
Feature Category
Developer tools/SDK
Use Case Example
_No response_
Additional Context
{
"round":4,
"session_id":"20251223_175114",
"message_type":"UserMessage",
"message":{
"parent_tool_use_id":null,
"uuid":"da69a48d-9f57-4f1f-a0a3-0309aa4a3054",
"content":[
{
"tool_use_id":"call_d32dc053b6424cec868932ca",
"is_error":true,
"content":"<tool_use_error>InputValidationError: [{\"received\":\"qwen3-max\",\"code\":\"invalid_enum_value\",\"options\":[\"sonnet\",\"opus\",\"haiku\"],\"path\":[\"model\"],\"message\":\"Invalid enum value. Expected 'sonnet' | 'opus' | 'haiku', received 'qwen3-max'\"}]</tool_use_error>"
}
]
},
"timestamp":"2025-12-23T17:51:24.784456"
}
content:
[
{
"received": "qwen3-max",
"code": "invalid_enum_value",
"options": [
"sonnet",
"opus",
"haiku"
],
"path": [
"model"
],
"message": "Invalid enum value. Expected 'sonnet' | 'opus' | 'haiku', received 'qwen3-max'"
}
]This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗