Skip to content

feat(delegate): add task-tier profiles with per-task reasoning_effort and pool validation - #9255

Closed
MestreY0d4-Uninter wants to merge 1 commit into
NousResearch:mainfrom
MestreY0d4-Uninter:feat/delegate-task-tiers
Closed

feat(delegate): add task-tier profiles with per-task reasoning_effort and pool validation#9255
MestreY0d4-Uninter wants to merge 1 commit into
NousResearch:mainfrom
MestreY0d4-Uninter:feat/delegate-task-tiers

Conversation

@MestreY0d4-Uninter

Copy link
Copy Markdown
Contributor

Summary

Unified delegation tier system combining named task profiles (model/routing/reasoning/iterations per tier) with optional model pool validation. Addresses open issues #3719, #6306 and supersedes the tier concept from stale PR #5692.

What this adds

5 named tierslight, heavy, review, planning, research — each configuring model, provider, reasoning_effort, and max_iterations:

delegation:
  default_tier: heavy
  tiers:
    light:    {model: gpt-5.4-mini, reasoning_effort: low,  max_iterations: 25}
    heavy:    {model: gpt-5.4,      reasoning_effort: medium, max_iterations: 50}
    review:   {model: gpt-5.4,      reasoning_effort: xhigh, max_iterations: 60}
    planning: {model: xiaomi/mimo-v2-pro, provider: nous, reasoning_effort: high, max_iterations: 60}
    research: {model: gpt-5.4,      reasoning_effort: high, max_iterations: 60}

Reasoning floor guardrails prevent silent degradation:

  • heavy/research → reasoning ≥ medium
  • planning/review → reasoning ≥ high

Per-task tier in batch mode:

delegate_task(tasks=[
    {"goal": "Quick lookup", "tier": "light"},    # cheap/fast
    {"goal": "Code review", "tier": "review"},    # high reasoning
])

Optional model pool for validation (inspired by PR #5229):

delegation:
  pool:
    - model: gpt-5.4-mini, strengths: quick lookups
    - model: gpt-5.4, provider: openai-codex, strengths: coding, debugging

Resolution order

task.tier → top-level tierdefault_tier → flat config → parent inherit

Files changed

File Change
tools/delegate_tool.py resolve_tier_config(), _validate_pool_model(), _build_pool_description(), override_reasoning_effort in _build_child_agent(), per-task tier in batch loop, schema updates
cli-config.yaml.example Documented tiers, pool, reasoning_effort with examples
tests/tools/test_delegate_tiers.py 56 unit tests: tier resolution, reasoning floors, pool validation, schema, integration, comparative, backward compat, edge cases
tests/tools/test_delegate_tiers_real.py 7 real integration tests with cost comparison

Test results

  • 128 total delegate tests passing (67 existing + 56 new tier tests + 5 toolset scope)
  • 7 real integration tests passing (comparative cost analysis, schema, pool, backward compat)
  • All existing tests pass unchanged (backward compatible)

Related issues

Breaking changes

None. Without tiers configured, behavior is identical to before.

… reasoning_effort

Unified implementation combining tier profiles (from stale PR NousResearch#5692)
with model pool validation (inspired by PR NousResearch#5229).

Features:
- 5 named tiers: light, heavy, review, planning, research
- Each tier configures model, provider, reasoning_effort, max_iterations
- Reasoning floor guardrails prevent silent degradation:
  heavy/research >= medium, planning/review >= high
- Per-task tier in batch mode overrides top-level tier
- Optional delegation pool for model validation
- override_reasoning_effort in _build_child_agent
- resolve_tier_config() merges tier over flat base config
- Schema updated with tier enum at top-level and per-task

Resolution order:
  task.tier > top-level tier > default_tier > flat config > parent

Config example:
  delegation:
    default_tier: heavy
    tiers:
      light:   {model: gpt-5.4-mini, reasoning_effort: low, max_iterations: 25}
      review:  {model: gpt-5.4, reasoning_effort: xhigh, max_iterations: 60}
    pool:
      - model: gpt-5.4, strengths: coding, debugging

Tests:
- 56 new unit tests (test_delegate_tiers.py)
- 7 real integration tests (test_delegate_tiers_real.py)
- 128 total delegate tests passing
- Backward compatibility verified (flat configs work unchanged)
@MestreY0d4-Uninter

Copy link
Copy Markdown
Contributor Author

Closing — needs more real-world testing and calibration before submission. Will reopen with comprehensive data.

@MestreY0d4-Uninter
MestreY0d4-Uninter deleted the feat/delegate-task-tiers branch April 14, 2026 00:06
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.

Feature: Allow per-task model selection in delegate_task

1 participant