Skip to content

[Bug] delegate_task ignores delegation.base_url — subagent always inherits parent model #27294

@zhangmingmm

Description

@zhangmingmm

Environment

  • Hermes Agent: latest (install.sh)
  • OS: macOS 12.7.6
  • Python: 3.11

Config (delegation section)

delegation:
  api_key: <custom_api_key>
  base_url: https://ark.cn-beijing.volces.com/api/v3
  model: ep-20260516214802-kvxlt

Expected

When delegation.base_url is set, subagents use that endpoint instead of inheriting parent model.

Actual

Subagents always use parent model (deepseek-v4-pro). Logs: provider=deepseek base_url=https://api.deepseek.com/v1

Debugging

  • load_config() correctly reads delegation config
  • _resolve_delegation_credentials() returns provider="custom" with correct creds
  • build_child_agent() receives correct override* params
  • No env var interference
  • Gateway force-reinstalled, pycache cleared
  • Tested provider="" / "openai" / "custom:doubao" — all ignored
  • Direct API call to doubao works (execute_code), proving endpoint is reachable

Workaround

Using execute_code with direct urllib calls, but bypasses subagent toolset/session.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existscomp/agentCore agent loop, run_agent.py, prompt builderduplicateThis issue or pull request already existssweeper:implemented-on-mainSweeper: behavior already present on current maintool/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