Skip to content

fix: import _pool_may_recover_from_rate_limit via _ra() in conversation_loop.py#28254

Closed
Poeagle wants to merge 1 commit into
NousResearch:mainfrom
Poeagle:fix/missing-import-pool-may-recover-rate-limit
Closed

fix: import _pool_may_recover_from_rate_limit via _ra() in conversation_loop.py#28254
Poeagle wants to merge 1 commit into
NousResearch:mainfrom
Poeagle:fix/missing-import-pool-may-recover-rate-limit

Conversation

@Poeagle

@Poeagle Poeagle commented May 18, 2026

Copy link
Copy Markdown

The run_conversation function was extracted from run_agent.py to the new agent/conversation_loop.py (commit 0530252). During extraction, the call to _pool_may_recover_from_rate_limit() was left as a bare name but the function wasn't imported in the new file.

All other run_agent-level symbols (handle_function_call, _set_interrupt, OpenAI) are accessed via the _ra() lazy-import helper in this file, so this change is consistent with the existing pattern.

Fixes NameError: name '_pool_may_recover_from_rate_limit' is not defined at runtime.

…on_loop.py

The run_conversation function was extracted from run_agent.py to the
new agent/conversation_loop.py (0530252). During extraction, the
call to _pool_may_recover_from_rate_limit() was left as a bare name
but the function wasn't imported in the new file.

All other run_agent-level symbols (handle_function_call, _set_interrupt,
OpenAI) are accessed via the _ra() lazy-import helper in this file, so
this is consistent with the existing pattern.

Fixes NameError: name '_pool_may_recover_from_rate_limit' is not defined
@alt-glitch alt-glitch added type/bug Something isn't working comp/agent Core agent loop, run_agent.py, prompt builder P1 High — major feature broken, no workaround duplicate This issue or pull request already exists labels May 19, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #27359 (fix PR) / #27370 (bug report). This is the same one-line _ra() prefix fix for the NameError on bare _pool_may_recover_from_rate_limit() call in conversation_loop.py after the run_agent.py extraction refactor. 18+ duplicate fix PRs already exist for this issue.

@teknium1

Copy link
Copy Markdown
Contributor

Closing as duplicate of #28159 by @AceWattGit, which has been merged via salvage PR #28345 (commit 25e0f4d). All three of your PRs converged on the same fix (routing the call through `_ra()`), and AceWattGit's version also ships an inspect-based regression test guarding the call shape. Thanks for spotting the NameError — community signal helped triage it fast.

@teknium1 teknium1 closed this May 19, 2026
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.

4 participants