Skip to content

fix(anthropic): guard credential-pool recovery check - #30377

Closed
GirthTender wants to merge 5 commits into
NousResearch:mainfrom
GirthTender:zeke/anthropic-recovery-pool-fix
Closed

fix(anthropic): guard credential-pool recovery check#30377
GirthTender wants to merge 5 commits into
NousResearch:mainfrom
GirthTender:zeke/anthropic-recovery-pool-fix

Conversation

@GirthTender

Copy link
Copy Markdown

This patch adds the missing _pool_may_recover_from_rate_limit helper used by the Anthropic/API-billing recovery path. Without it, the recovery path can crash with NameError after a provider failure. The helper is conservative: it returns false when there is no pool or only one credential, true only when another credential can realistically recover, and otherwise falls back normally. Verified with python -m py_compile agent\conversation_loop.py and targeted helper cases covering no pool, single credential, healthy alternate credential, future cooldown, expired cooldown, and exhausted/no-reset status.

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint duplicate This issue or pull request already exists labels May 22, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #28345 (merged) — _pool_may_recover_from_rate_limit NameError was already fixed by routing through _ra() accessor. This PR redefines the function as a standalone in conversation_loop.py, which is a different approach but the bug is already resolved.

Additionally, this PR bundles unrelated personal account management docs (docs/control/, docs/plans/, docs/qc/) that don't belong in the hermes-agent repository.

@GirthTender

Copy link
Copy Markdown
Author

Closing this because upstream main already carries the fix via merged #28345, and this branch/PR is not a clean minimal delta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants