feat: add named delegation routing profiles#7201
Conversation
36df89e to
a3bd7c8
Compare
a3bd7c8 to
9c02f8f
Compare
|
Orb Code Review (powered by GLM 5.1 on Orb Cloud) PR #7201 — feat: add named delegation routing profilesWhat it doesReplaces the flat Observations✅ Excellent design
✅ Strong validation and error messages
✅ Comprehensive test coverage
if parent_provider == "openai-codex" and "/" in configured_model:This handles one specific case. Other providers may have similar constraints. Consider making this more general or documenting why only openai-codex needs this check.
Both must stay in sync. A comment cross-referencing them would help future maintainers. Summary: Well-designed feature with thorough migration, validation, and test coverage. Named routing profiles are a significant improvement over flat delegation config. Minor notes about the narrow provider validation and dual normalization paths. Assessment: approve |
9c02f8f to
8de4a7f
Compare
|
Follow-up after reviewing the current PR comments and re-validating the refreshed branch:
Validation after the follow-up commit:
The incremental follow-up commit is PR-scoped only and touches:
|
Description
Refreshes PR #7201 onto the current
mainline and keeps the scope limited to named delegation routing profiles only.This PR now contains ONLY these files:
tools/delegate_tool.pyhermes_cli/config.pytests/tools/test_delegate.pytests/hermes_cli/test_config.pyThe earlier accidental Matrix history has been removed from the branch.
What this adds
delegation.routesdelegation.routedelegate_task(..., routing_profile=...)delegation.routes.defaultConfig shape
Behavior
Route precedence is:
routing_profilerouting_profiledelegation.routedefaultLegacy configs like:
are normalized/migrated to:
Validation
This PR adds validation for:
delegationbeing a dictdelegation.routesbeing a dictmodel,provider,base_url,api_key)delegation.routetype and missing-route warningsdelegation.route: autodelegation.max_iterationsbeing a positive integerHow to test
Targeted:
Additional relevant slice:
Local results
tests/tools/test_delegate.py tests/hermes_cli/test_config.py→ 128 passedtests/tools/test_delegate_toolset_scope.py→ 5 passedNote on current upstream baseline
tests/hermes_cli/test_runtime_provider_resolution.py::test_named_custom_provider_uses_providers_dict_when_list_missingcurrently fails on clean
origin/mainas well, so it is not introduced by this PR refresh.