Skip to content

fix: forward request_overrides to cron jobs and subagents - #714

Open
hashbender wants to merge 1 commit into
mainfrom
mirror/pr-56876
Open

fix: forward request_overrides to cron jobs and subagents#714
hashbender wants to merge 1 commit into
mainfrom
mirror/pr-56876

Conversation

@hashbender

Copy link
Copy Markdown
Owner

Summary

Forward provider-derived request_overrides through two remaining async paths:

  • cron jobs created from an agent session now preserve the runtime provider's request overrides
  • delegated subagents inherit parent request overrides unless an explicit provider/runtime override supplies its own request overrides

This keeps custom-provider extra_body / extra_headers behavior consistent for scheduled jobs and delegate_task children.

Why

resolve_runtime_provider() can attach provider-specific request overrides, but cron job creation and subagent construction were dropping them. That means a configured provider can behave correctly in the parent conversation while losing its request overrides in cron/subagent calls.

Prior art / non-duplication check

Related open PRs cover adjacent paths but not these files:

This PR intentionally stays narrow to cron/scheduler.py and tools/delegate_tool.py.

Tests

PYTHONPATH="$PWD" /opt/hermes/.venv/bin/python -m pytest -q -o 'addopts=' \
  tests/cron/test_cron_request_overrides.py \
  tests/tools/test_delegate_request_overrides.py
# 4 passed

PYTHONPATH="$PWD" /opt/hermes/.venv/bin/python -m py_compile \
  cron/scheduler.py \
  tools/delegate_tool.py \
  tests/cron/test_cron_request_overrides.py \
  tests/tools/test_delegate_request_overrides.py

git diff --cached --check

Mirror-of: NousResearch#56876
NousResearch#56876

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant