Problem
CustomSubagentConfig.model accepts an empty string. Later, the executor treats a present model value as an override and passes it to model creation, which can fail at runtime with a confusing provider/model error.
Impact
A simple config typo produces a late runtime failure instead of a clear validation error.
Suggested Fix
Validate model as either absent/None, a reserved inherit value if supported, or a non-blank string. Use Pydantic validation such as min_length=1 plus trimming.
Tests
- Blank model string fails config validation with a clear error.
- Missing model continues to inherit parent behavior.
- Valid model string continues to work.
References
backend/packages/harness/deerflow/config/subagents_config.py:55
backend/packages/harness/deerflow/subagents/executor.py:123
backend/packages/harness/deerflow/models/factory.py:61
Problem
CustomSubagentConfig.modelaccepts an empty string. Later, the executor treats a present model value as an override and passes it to model creation, which can fail at runtime with a confusing provider/model error.Impact
A simple config typo produces a late runtime failure instead of a clear validation error.
Suggested Fix
Validate
modelas either absent/None, a reserved inherit value if supported, or a non-blank string. Use Pydantic validation such asmin_length=1plus trimming.Tests
References
backend/packages/harness/deerflow/config/subagents_config.py:55backend/packages/harness/deerflow/subagents/executor.py:123backend/packages/harness/deerflow/models/factory.py:61