Repository navigation
fix(OMN-15180): make backend_id pin reachable from the wire model + register local-coder-mlx in routing tiers - #1904
Merged
Conversation
…egister local-coder-mlx in routing tiers Closes both halves of the OMN-15180 gap surfaced by the OMN-15159 build lane: 1. ModelDelegateSkillRequest gains an optional backend_id: str | None = None field (additive, frozen/extra=forbid preserved) and HandlerDelegateSkill.handle() threads it to dispatch_port.dispatch(backend_id=...), reusing the OMN-15156 pin LocalDelegationDispatchPort already implements (resolve_delegation_backend(task_type, backend_id=...)). Previously the pin was unreachable from any wire-level caller (e.g. steel LlmBusDelegationClient, OMN-15159). ProtocolDelegationDispatchPort and RuntimeDelegationDispatchPort were updated to match the new keyword; the deployed bus path has no backend_id field on omnibase_core ModelDelegationRequest and no pin support in HandlerDelegationWorkflow, so a non-None pin there fails loudly (NotImplementedError) instead of being silently dropped -- extending the pin across the bus boundary is a cross-repo change out of this ticket's scope. 2. routing_tiers.yaml's local tier models[] gains a local-coder-mlx entry (mirroring the sibling local-coder pattern) so task_type-based tier selection (first_eligible_tier -> backend_id_for_tier -> _select_model_for_task) can reach the .200:8401 MLX endpoint registered by OMN-15155 too, not just the explicit backend_id pin. Unblocks OMN-15170 (steel-side driver test proving a live call reaches .200:8401). Tests: wire-model round-trip with/without backend_id + frozen/extra=forbid preserved (test_models.py); handler-to-port pin propagation + None-default regression (test_handler.py); RuntimeDelegationDispatchPort fail-loud on a non-None pin (test_runtime_dispatch_port.py); full wire->handler->port-> resolve_delegation_backend pin selecting local-coder-mlx, including a tier-bypass assertion (test_wire_backend_id_reaches_local_coder_mlx_omn15180.py); routing_tiers.yaml local-coder-mlx membership (test_routing_tiers_contract.py).
📝 WalkthroughWalkthroughChangesBackend Pin Reachability
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Caller
participant HandlerDelegateSkill
participant LocalDelegationDispatchPort
participant RecordingEffect
Caller->>HandlerDelegateSkill: Submit request with backend_id
HandlerDelegateSkill->>LocalDelegationDispatchPort: Forward backend_id
LocalDelegationDispatchPort->>RecordingEffect: Call pinned local-coder-mlx backend
RecordingEffect-->>LocalDelegationDispatchPort: Return delegation result
LocalDelegationDispatchPort-->>HandlerDelegateSkill: Return response
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
✅ Architectural Review — PASSEDErrors: 0 What this checks
No architectural violations found. Static architectural lint — no model inference (OMN-14176). |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/omnimarket/configs/routing_tiers.yaml`:
- Around line 100-116: Update the routing-tier configuration around
local-coder-mlx so unpinned task-based selection can actually choose this
backend rather than leaving it pin-only. Add an explicit priority or task-class
policy that takes precedence for the intended tasks, and add a resolution-level
assertion covering unpinned selection; otherwise revise the surrounding
ordering/comments to accurately state the supported behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: ac90b2e5-f2c6-4abe-b4e2-6f3a8fd9693d
📒 Files selected for processing (11)
src/omnimarket/configs/routing_tiers.yamlsrc/omnimarket/models/delegation/wire/model_delegate_skill_request.pysrc/omnimarket/nodes/node_delegate_skill_orchestrator/handlers/handler_delegate_skill.pysrc/omnimarket/nodes/node_delegate_skill_orchestrator/ports/port_runtime_delegation_dispatch.pytests/test_golden_chain_node_delegate_skill_orchestrator.pytests/test_routing_tiers_contract.pytests/unit/nodes/node_delegate_skill_orchestrator/test_handler.pytests/unit/nodes/node_delegate_skill_orchestrator/test_models.pytests/unit/nodes/node_delegate_skill_orchestrator/test_runtime_dispatch_port.pytests/unit/nodes/node_delegate_skill_orchestrator/test_tenant_carry_response_to_projection_omn14485.pytests/unit/nodes/node_delegate_skill_orchestrator/test_wire_backend_id_reaches_local_coder_mlx_omn15180.py
✅ Hostile Reviewer — PASSEDBlocking findings (critical/error): 0 Gate semantics
Powered by omniintelligence.review_pairing.cli_review — node-based adversarial review via HandlerLlmCliSubprocess (OMN-8524) |
… (CodeRabbit) CodeRabbit review on PR #1904 correctly flagged that appending local-coder-mlx to routing_tiers.yaml local tier models[] does not make it the DEFAULT (first-choice) unpinned selection for code_generation/refactor/document -- _select_model_for_task is first-match-wins in file declaration order, and local-coder/local-reasoner/local-heavy-reasoning already claim those task types (mirrors the pre-existing local-ds-v4-flash entry, which has the exact same characteristic and is not a new defect). The real task_type-based-tier-selection reachability the registration provides is the OMN-14402 same-tier backend fallback (sibling_backend_available_in_tier, wired into HandlerDelegationWorkflow.handle_inference_response on the deployed bus path): once local-coder (and, for code_generation, local-ds-v4-flash) fails with a transport error, the orchestrator retries local-coder-mlx in the SAME tier before escalating cross-tier to cheap_cloud. Adds the resolution-level assert CodeRabbit requested (test_local_coder_mlx_same_tier_fallback_omn15180.py), proven against the REAL committed routing_tiers.yaml + task_class_contracts.v1.yaml (only the bifrost endpoint config is a hermetic local fixture), and corrects the routing_tiers.yaml comment to describe the actual reachability mechanism instead of implying first-choice selection.
This was referenced Jul 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes both halves of OMN-15180 (filed by the OMN-15159 build lane; blocks OMN-15170). Plan:
omni_home/docs/plans/2026-07-26-steel-node-dispatch-integration-plan.md.Wire-model pin reachability.
ModelDelegateSkillRequestgains an optionalbackend_id: str | None = Nonefield (additive;frozen=True, extra="forbid"preserved) andHandlerDelegateSkill.handle()threads it todispatch_port.dispatch(backend_id=...), reusing the OMN-15156 pinLocalDelegationDispatchPortalready implements (resolve_delegation_backend(task_type, backend_id=...), merged feat(OMN-15156): thread optional backend_id pin through LocalDelegationDispatchPort.dispatch() #1897). Before this PR the pin was unreachable from any wire-level caller (e.g. steel'sLlmBusDelegationClient, OMN-15159).ProtocolDelegationDispatchPortandRuntimeDelegationDispatchPort(the deployed-bus dispatch port) were updated to accept the new keyword so the shared handler call doesn'tTypeErroron the bus path.backend_idfield on omnibase_core'sModelDelegationRequestand no pin support inHandlerDelegationWorkflow(node_delegation_orchestrator) — threading the pin across the bus boundary is a cross-repo change out of this ticket's scope. A non-None pin on that path now fails loudly withNotImplementedErrorinstead of being silently dropped (the exact "pin drops at a hop" defect class this ticket exists to close).routing_tiers.yaml registration.
local-coder-mlx(registered as abifrost_delegation.yamlbackend by OMN-15155, merged omnimarket#1898) is added to thelocaltier'smodels[], mirroring the siblinglocal-coder/local-ds-v4-flashentries, so task_type-based tier selection (first_eligible_tier→backend_id_for_tier→_select_model_for_task) can reach it too — not just the explicitbackend_idpin. Declared afterlocal-coderin file order so unpinned auto-selection is unchanged (verified by regression test).Unblocks OMN-15170 (steel-side driver test proving a live call reaches
.200:8401).Every hop the pin traverses
Separately, routing_tiers.yaml half:
src/omnimarket/configs/routing_tiers.yamllocal tiermodels[](new entry, mirrorslocal-coder) → parsed byparse_delegation_config_yaml→ consumed byfirst_eligible_tier/backend_id_for_tier/_select_model_for_taskinnode_delegation_routing_reducer.Tests
tests/unit/nodes/node_delegate_skill_orchestrator/test_models.py— wire-model round-trip with/withoutbackend_id;frozen/extra="forbid"preserved after the widening.tests/unit/nodes/node_delegate_skill_orchestrator/test_handler.py— handler propagates a non-None pin to the dispatch port;Nonereaches the port when unset (regression).tests/unit/nodes/node_delegate_skill_orchestrator/test_runtime_dispatch_port.py—RuntimeDelegationDispatchPortfails loudly (NotImplementedError) on a non-None pin, never publishes to the bus.tests/unit/nodes/node_delegate_skill_orchestrator/test_wire_backend_id_reaches_local_coder_mlx_omn15180.py(new) — fullwire model -> HandlerDelegateSkill -> LocalDelegationDispatchPort -> resolve_delegation_backendchain selectslocal-coder-mlxexactly, and bypasses tier-order selection (first_eligible_tierasserted never consulted).tests/test_routing_tiers_contract.py—local-coder-mlxmembership in the local tiermodels[].Test plan
ruff check/ruff format --checkon changed files (.200)mypy --strict src/omnimarket/(.200) — 0 errorspre-commit run --files <changed>(.200,OMNIBASE_INFRA_PATHset) — all hooks passtests/unit/nodes/node_delegate_skill_orchestrator/,tests/unit/delegation/,tests/unit/routing/,tests/test_routing_tiers_contract.py,tests/test_no_ambiguous_duplicate_model_ids.py, golden-chain + integration delegate-skill tests — 879 passed, 2 skipped (.200)gh pr checks)Not merging — Codex lands via the merge queue per repo policy.
Summary by CodeRabbit
New Features
Tests
Evidence-Source: OCC#4963
Evidence-Ticket: OMN-15180
Evidence-Commit: 0ec5e7db12ef2658c866e57e443699fd03cb9204