fix(moa): route auxiliary calls through concrete providers - #53801
Closed
ildunari wants to merge 1 commit into
Closed
fix(moa): route auxiliary calls through concrete providers#53801ildunari wants to merge 1 commit into
ildunari wants to merge 1 commit into
Conversation
|
Confirming this on Hermes 0.17.0. MoA preset with Codex as the aggregator (Grok + DeepSeek references) reliably fails... references return fine but the Codex aggregator hits HTTP 403 / Cloudflare HTML, so the whole MoA response either breaks or stalls to the 600s timeout. Workaround for now is keeping Codex OAuth as main only and using API-style providers in MoA slots. Looks like this PR addresses exactly that routing path. |
Contributor
|
Already on |
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.
What does this PR do?
Fixes two MoA auxiliary-routing edge cases:
provider: moanow resolve to the active preset's concrete aggregator provider/model instead of trying to construct a client for the virtualmoaprovider.openai-codexMoA reference slots no longer receive raw runtimebase_url/api_keyvalues fromresolve_runtime_provider(). That bypasses the Codex auxiliary wrapper and can hit ChatGPT/Cloudflare HTML even though the normal Codex auxiliary route works. The slot now stays asprovider=openai-codex, model=..., socall_llm()uses the existing Codex auxiliary client path.This keeps MoA's provider-aware slot resolution for normal API/custom providers, while preserving specialized adapter behavior for Codex.
Related Issue
No linked issue. Found while testing a MoA preset with:
openai-codex:gpt-5.5,zai:glm-5.2custom:vibe-proxy:claude-opus-4-8Type of Change
Changes Made
agent/auxiliary_client.pyprovider="moa"auxiliary calls through the active MoA preset aggregator.moa://..., virtual API key, MoA api mode) from leaking into concrete aggregator resolution.agent/moa_loop.pyopenai-codexslots so Codex uses its existing auxiliary wrapper.tests/agent/test_auxiliary_client.pytests/run_agent/test_moa_loop_mode.pyopenai-codexMoA slots using the auxiliary wrapper path.How to Test
python -m py_compile agent/auxiliary_client.py agent/moa_loop.pypytest -q tests/run_agent/test_moa_loop_mode.py tests/agent/test_auxiliary_client.py::TestResolveProviderClientMoA tests/gateway/test_moa_one_shot_restore.py tests/cli/test_moa_command.pypytest -q tests/agent/test_auxiliary_client.py tests/run_agent/test_moa_loop_mode.pyResults locally:
py_compile: passed19 passed259 passedI also tried
scripts/run_tests.shper the contributing guide, but this worktree's repovenvdoes not have pytest installed, so the wrapper failed before exercising this patch with repeatedNo module named pytesterrors. Direct pytest in the active development environment passed the affected suites above.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs
Observed local smoke before the fix: MoA with an
openai-codex:gpt-5.5reference could produce:After the fix, the same MoA preset completed without that warning.