Skip to content

[harness][subagents] Custom subagent model accepts blank strings #2545

@hetaoBackend

Description

@hetaoBackend

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions