Skip to content

fix(delegate_tool): address PR #43134 multi-provider review feedback#43185

Open
rafaumeu wants to merge 2 commits into
NousResearch:mainfrom
rafaumeu:fix/pr43134-review-feedback
Open

fix(delegate_tool): address PR #43134 multi-provider review feedback#43185
rafaumeu wants to merge 2 commits into
NousResearch:mainfrom
rafaumeu:fix/pr43134-review-feedback

Conversation

@rafaumeu

Copy link
Copy Markdown

Summary

Addresses all actionable items from the 8-reviewer multi-provider code review on PR #43134 (by @ricardocamiloconsir).

This PR is a follow-up to #43134. It includes the original feature PLUS all review fixes.

Fixes Applied

Priority Item Fix
BLOCKER Stale creds reference in override_acp_command creds.get("command")task_creds.get("command")
SHOULD FIX Broad except Exception swallows unexpected errors Split into ValueError, (KeyError, LookupError), and catch-all with logger.exception()
SHOULD FIX Undocumented fail-fast batch abort Added inline comment explaining semantics
NICE TO HAVE Whitespace-only model/provider strings pass truthiness Added .strip() to both inputs

New Tests

  • TestStaleCredsReferenceRegression::test_task_creds_used_for_acp_command_fallback — verifies ACP command comes from per-task creds
  • TestStaleCredsReferenceRegression::test_whitespace_model_stripped_before_resolution — verifies " " treated as empty

16/16 tests passing (14 original + 2 regression).

Reviewer Scorecard Addressed

  • xAI/Grok: stale creds reference bug → FIXED
  • DeepSeek: except Exception blocking → FIXED (narrowed + logging)
  • Google/Gemini: whitespace input validation → FIXED (.strip())
  • GitHub/GPT-4.1: orphaned child agents → DOCUMENTED
  • Anthropic/Claude: dict | str return type → NOT CHANGED (follow-up item)
  • All 8: fail-fast abort → DOCUMENTED

Closes #18591. Supersedes #43134.

SquadOps AI added 2 commits June 9, 2026 19:55
Add optional model and provider fields to individual tasks in delegate_tool batch mode. Fallback chain: per-task field > delegation config > parent model.

Closes NousResearch#18591
Fixes from 8-reviewer multi-provider code review (ricardocamiloconsir):

1. [BLOCKER] Fix stale `creds` reference in override_acp_command
   - Changed `creds.get('command')` to `task_creds.get('command')`
   - When per-task provider override is used, ACP command now comes from
     the correct per-task credentials, not the delegation-level ones
   - Regression test added (TestStaleCredsReferenceRegression)

2. [SHOULD FIX] Narrow broad `except Exception` in _resolve_task_credentials
   - Split into ValueError, (KeyError, LookupError), and catch-all
   - Added logger.exception() for unexpected errors (was silent before)
   - Preserves full tracebacks in observability tooling

3. [SHOULD FIX] Document fail-fast batch abort semantics
   - Added inline comment explaining that credential resolution failure
     for task N aborts the entire batch
   - References PR NousResearch#43134 review discussion for future improvement

4. [NICE TO HAVE] Add .strip() to model/provider inputs
   - Guards against whitespace-only strings like '  '
   - Test added (test_whitespace_model_stripped_before_resolution)

16 tests passing (14 original + 2 regression).
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have tool/delegate Subagent delegation labels Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low — cosmetic, nice to have tool/delegate Subagent delegation type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Per-task model override for delegate_task subagents

2 participants