fix(delegation): honor pinned delegation.provider — no silent parent-fallback substitution - #80465
Conversation
|
This was generated by AI during triage. Summary: Problems:
Solution: Checked against |
૮ >ﻌ< ა ci reviewran on 5516ebe — fix(delegation): honor pinned delegation.provider — no silen
|
…fallback substitution When delegation.provider/model is explicitly pinned, the child no longer inherits the parent's fallback chain: a mid-run auth/429 failure on the pin previously rerouted the quiet-mode child onto parent fallback models with no surfaced signal. Same treatment as the existing override_provider OpenRouter filter-clearing — explicit pins are honored or fail loudly. Also upgrades the pinned delegation.command-missing-from-PATH case from warning + silent transport fallback to a loud spawn refusal, both at credential preflight and in _build_child_agent. Fixes #80450 (tracker #79686 audit item).
ee6b581 to
5516ebe
Compare
Summary
An explicitly pinned
delegation.provider/delegation.modelis now honored for the child's whole run — a mid-run failure on the pin fails loudly instead of silently rerouting the quiet-mode child onto the parent's fallback models.Root cause:
_build_child_agentinheritedparent._fallback_chainunconditionally (delegate_tool.py:1469→1524), sotry_activate_fallbackcould swap the pinned child's model/provider at runtime with no surfaced signal. The siblingoverride_providerguard already cleared parent OpenRouter routing filters for exactly this reason — the fallback chain never got the same treatment.Changes
tools/delegate_tool.py:parent_fallback = Nonewhenoverride_provideris set (pin honored or loud failure); pinneddelegation.commandmissing from PATH now raises at credential preflight AND in_build_child_agent(was:logger.warning+ silent transport fallback);delegate_taskcatches the build-timeValueErrorand returnstool_error.tests/tools/test_delegate.py: 3 regression tests (pin disables chain inheritance, missing pinned command raises in build, missing pinned command rejected at preflight).Validation
delegation.commandnot on PATHtests/tools/test_delegate.pyFixes #80450. Tracker #79686 audit item ("no-silent-fallback model pinning in delegate_task").
Infographic