Skip to content

[codex] fail closed provider routing - #2704

Merged
numnx merged 1 commit into
codeux-ai:devfrom
numnx:fix/global-manual-provider-inheritance
Jul 8, 2026
Merged

[codex] fail closed provider routing#2704
numnx merged 1 commit into
codeux-ai:devfrom
numnx:fix/global-manual-provider-inheritance

Conversation

@numnx

@numnx numnx commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Provider routing now fails closed when a selected or inherited provider instance is unavailable instead of silently falling back to another provider. This covers manual routes, agent-inherited routes, empty eligible pools, Jules-unavailable contexts, and CLI-only contexts.

Root Cause

Manual and inherited provider selections were filtered out when the selected provider instance was disabled or otherwise ineligible, then routing continued through fallback logic that could pick another enabled provider. The dashboard then masked the resulting routing failure as a generic Internal Server Error because provider selection errors were plain unexpected errors.

Changes

  • Removed provider fallback behavior from invocation routing and task service dispatch.
  • Added ProviderRoutingError and mapped it to a visible 409 dashboard/API response.
  • Preserved generic masking for unexpected internal server errors.
  • Updated backend coverage for fail-closed routing and visible provider-routing errors.
  • Updated provider routing documentation and public provider/model docs.

Validation

pnpm run lint
pnpm run test:backend
pnpm run build

All passed locally.

Risk / Rollback

Risk is limited to provider-selection behavior becoming stricter. Operators with disabled or unavailable selected providers will now see a clear routing error and must enable the selected provider instance or choose a different route. Rollback is the previous fallback behavior, but that can dispatch work through an unintended provider.

@numnx
numnx marked this pull request as ready for review July 8, 2026 17:37
@numnx
numnx enabled auto-merge July 8, 2026 17:37
@numnx
numnx merged commit cd133ab into codeux-ai:dev Jul 8, 2026
6 checks passed
@numnx numnx mentioned this pull request Jul 8, 2026
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.

1 participant