Skip to content

fix: use _ra() accessor for _pool_may_recover_from_rate_limit#27532

Closed
bynguts wants to merge 1 commit into
NousResearch:mainfrom
bynguts:main
Closed

fix: use _ra() accessor for _pool_may_recover_from_rate_limit#27532
bynguts wants to merge 1 commit into
NousResearch:mainfrom
bynguts:main

Conversation

@bynguts

@bynguts bynguts commented May 17, 2026

Copy link
Copy Markdown

Fix NameError when rate limit recovery triggers.

In agent/conversation_loop.py line 2254, _pool_may_recover_from_rate_limit was called directly but defined in run_agent.py. Changed to _ra()._pool_may_recover_from_rate_limit() to match the pattern used for other run_agent functions:

# Before
pool_may_recover = _pool_may_recover_from_rate_limit(...)

# After
pool_may_recover = _ra()._pool_may_recover_from_rate_limit(...)

Fixes NameError: name "_pool_may_recover_from_rate_limit" is not defined

The function is defined in run_agent.py but was being called directly
in conversation_loop.py, causing NameError: name '_pool_may_recover_from_rate_limit'
is not defined. Changed to _ra()._pool_may_recover_from_rate_limit to match
the pattern used for other run_agent functions.
Copilot AI review requested due to automatic review settings May 17, 2026 17:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Routes the _pool_may_recover_from_rate_limit call through the lazy _ra() accessor so test/runtime patches applied to the run_agent module are honored at this call site.

Changes:

  • Replace direct reference to _pool_may_recover_from_rate_limit with _ra()._pool_may_recover_from_rate_limit.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Labels

comp/agent Core agent loop, run_agent.py, prompt builder duplicate This issue or pull request already exists P1 High — major feature broken, no workaround type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants