Skip to content

delegation.model override ignored — subagents always inherit parent model #31155

@scottrad

Description

@scottrad

Summary

delegation.model in config.yaml is ignored — subagents always run on the parent agent's model instead of the configured delegation model.

Steps to reproduce

  1. Configure delegation with a different model than the parent:
delegation:
  model: deepseek-v4-flash
  provider: deepseek
  1. Parent agent runs on deepseek-v4-pro

  2. Call delegate_task — the subagent reports model: "deepseek-v4-pro" instead of "deepseek-v4-flash"

Expected behavior

Subagents use delegation.model (deepseek-v4-flash).

Actual behavior

Subagents always use the parent's model (deepseek-v4-pro), ignoring the delegation config.

Investigation notes

  • _resolve_delegation_credentials() correctly returns creds["model"] = "deepseek-v4-flash"
  • _build_child_agent() passes model="deepseek-v4-flash" to AIAgent()
  • AIAgent.__init__ / init_agent sets agent.model = "deepseek-v4-flash"
  • agent._primary_runtime["model"] is correctly "deepseek-v4-flash"
  • But after run_conversation(), child.model reads as "deepseek-v4-pro" (the parent's model)
  • The child shares the parent's credential pool (_resolve_child_credential_pool returns parent pool when provider matches)
  • Suspect: something in the conversation loop or credential pool rotation overwrites agent.model from the pool's primary model

Related

This interacts with the DeepSeek iteration enforcement feature (PR #___). The enforcement detects "flash" in model name to inject a shorter prompt for Flash models — but since subagents never actually run as Flash, the Flash-specific enforcement path is never triggered.

Environment

  • Hermes Agent version: latest main
  • Parent model: deepseek-v4-pro
  • Delegation config model: deepseek-v4-flash
  • Provider: deepseek

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existscomp/agentCore agent loop, run_agent.py, prompt buildertool/delegateSubagent delegationtype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions