fix(moa): preserve provider identity for anthropic + bedrock slots - #14
Open
hashbender wants to merge 1 commit into
Open
fix(moa): preserve provider identity for anthropic + bedrock slots#14hashbender wants to merge 1 commit into
hashbender wants to merge 1 commit into
Conversation
|
Review Complete Risk: 🟢 Low (8/100) — no findings · 68 LOC across 3 files No issues found. The three changed files (moa_loop.py, release.py, test) pass review with no regressions or security concerns. Files Reviewed (3 files) |
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
MoA reference/aggregator slots for
anthropicandbedrocknow keep their provider identity instead of being flattened to a generic custom endpoint — so OAuth-token / SigV4-signed auth actually fires.Salvages two external PRs (NousResearch#54609 by @jackroofan, NousResearch#54912 by @iizotov), both extending the
_slot_runtimename-preservation set. Closes NousResearch#55452 (duplicate of NousResearch#54609's anthropic fix).Root cause
agent/moa_loop.py::_slot_runtimeresolves a slot throughresolve_runtime_providerand forwardsbase_url/api_keytocall_llm.call_llmtreats an explicitbase_urlas acustomendpoint, which skips the provider branch that adds auth headers / request signing. That's correct for plain OpenAI-compatible targets but wrong for two providers:sk-ant-oat*) requireBearerauth plus theanthropic-beta: oauth-*header, added only by the anthropic provider branch. Forwarded → the token is sent asx-api-key→ Anthropic returns a bare 429.resolve_runtime_providerreturns a placeholderapi_key("aws-sdk"), not a real bearer. Forwarded → unsigned POST → empty/malformedChatCompletion.This is the same class already handled for
{nous, openai-codex, xai-oauth}.Changes
agent/moa_loop.py: addanthropicandbedrockto the_slot_runtimename-preservation set (union of the two PRs), with rationale comments for each.tests/run_agent/test_moa_loop_mode.py: anthropic's dedicated name-preserve test (from fix(moa): route native anthropic OAuth references through provider branch NousResearch/hermes-agent#54609) lands; dropanthropicfrom the pre-existingtest_moa_provider_backed_slot_survives_aux_resolutionparametrize (it asserted the old forward path — now superseded;minimax-oauth/qwen-oauthstill forward and remain).scripts/release.py: AUTHOR_MAP entries for both contributors.Validation
tests/run_agent/test_moa_loop_mode.pyContributor authorship preserved (rebase-merge).
Infographic
Mirror-of: NousResearch#55897
NousResearch#55897