fix(acp): pass fallback_providers to AIAgent in editor integrations (… - #36720
Open
Ericcc-Ma wants to merge 1 commit into
Open
fix(acp): pass fallback_providers to AIAgent in editor integrations (…#36720Ericcc-Ma wants to merge 1 commit into
Ericcc-Ma wants to merge 1 commit into
Conversation
Collaborator
…ousResearch#18452) The ACP adapter's _make_agent() was not passing fallback_model to AIAgent(), so model failover was completely broken in editor integrations (VS Code, JetBrains, Obsidian, Zed). The CLI and gateway entry points both pass fallback_model correctly; this brings ACP in line with them. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Ericcc-Ma
force-pushed
the
fix/acp-fallback-providers-18452
branch
from
June 1, 2026 11:27
a4171c0 to
905f63d
Compare
tonydwb
approved these changes
Jun 1, 2026
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
✅ Looks Good
- Clean fix: Passes
fallback_providers/fallback_modelfrom ACP editor config toAIAgent.__init__, enabling fallback routing in editor-integration (VS Code / Zed / JetBrains) sessions - Correct guard:
model_cfgis confirmed to be eitherdictorstr, so theisinstance(model_cfg, dict)check is safe and reliable - Minimal change: Single source file change (5 lines) — surgical and focused
- No test regressions expected: The new field is optional (only set when present in config)
Reviewed by Hermes Agent
mxnstrexgl
approved these changes
Jun 1, 2026
mxnstrexgl
left a comment
There was a problem hiding this comment.
🤖 Automated PR Review
Security Scan
- ✓ No hardcoded secrets, injection sinks, unsafe deserialization, or dependency red flags found by this automated scan.
Code Quality
- ✓ No blocking code-quality issues found by this automated scan.
- ℹ️ No test file changes detected; verify existing coverage exercises this behavior.
Summary
Status: APPROVE — security findings: 0, quality suggestions: 0.
Automated review; raw diff content intentionally omitted.
teknium1
reviewed
Jul 13, 2026
teknium1
left a comment
Contributor
There was a problem hiding this comment.
Thanks for addressing the ACP failover gap. The premise is still valid on current main, but this patch reads the wrong configuration level.
Problems
- The added expression queries
model_cfg, while current main assignsmodel_cfg = config.get("model")inacp_adapter/session.py:602. Fallback entries are top-level configuration keys:hermes_cli/fallback_config.py:64-65reads them from the fullconfig. Therefore a normalfallback_providers:entry still producesfallback_model=Nonein ACP. - The PR changes only
acp_adapter/session.py; no regression test demonstrates forwarding a top-level configured fallback chain.
Suggested changes
- Use
get_fallback_chain(config)fromhermes_cli.fallback_configand pass its result asfallback_model, preserving CLI-compatible merging and deduplication offallback_providersand legacyfallback_model. - Add an ACP kwargs-capture regression test for a top-level fallback chain.
Automated hermes-sweeper review.
| "session_id": session_id, | ||
| "session_db": self._get_db(), | ||
| "model": model or default_model, | ||
| "fallback_model": ( |
Contributor
There was a problem hiding this comment.
model_cfg is config.get("model"), but fallback configuration is top-level. This will remain None for normal fallback_providers: config; use the full config with get_fallback_chain(config) instead.
3 tasks
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.
…#18452)
The ACP adapter's _make_agent() was not passing fallback_model to AIAgent(), so model failover was completely broken in editor integrations (VS Code, JetBrains, Obsidian, Zed). The CLI and gateway entry points both pass fallback_model correctly; this brings ACP in line with them.
What does this PR do?
Related Issue
Fixes #
Type of Change
Changes Made
How to Test
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/AFor New Skills
hermes --toolsets skills -q "Use the X skill to do Y"Screenshots / Logs