hermes - 💡(How to fix) Fix bug: NameError '_pool_may_recover_from_rate_limit' in conversation_loop.py on rate limit (v0.14.0)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

After upgrading to v0.14.0, Hermes crashes with a NameError when a 429 rate limit error is encountered from a provider.

Error Message

Error: name '_pool_may_recover_from_rate_limit' is not defined

Root Cause

agent/conversation_loop.py imports run_agent as a module at line 81:

import run_agent

But at line 2254, _pool_may_recover_from_rate_limit is called without the module prefix:

pool_may_recover = _pool_may_recover_from_rate_limit(
    agent._credential_pool,
    provider=agent.provider,
    base_url=getattr(agent, "base_url", None),
)

This causes a NameError because the function is defined in run_agent.py, not in scope of conversation_loop.py.

Fix Action

Fix

pool_may_recover = run_agent._pool_may_recover_from_rate_limit(
    agent._credential_pool,
    provider=agent.provider,
    base_url=getattr(agent, "base_url", None),
)

Code Example

Error: name '_pool_may_recover_from_rate_limit' is not defined

---

import run_agent

---

pool_may_recover = _pool_may_recover_from_rate_limit(
    agent._credential_pool,
    provider=agent.provider,
    base_url=getattr(agent, "base_url", None),
)

---

pool_may_recover = run_agent._pool_may_recover_from_rate_limit(
    agent._credential_pool,
    provider=agent.provider,
    base_url=getattr(agent, "base_url", None),
)
RAW_BUFFERClick to expand / collapse

Description

After upgrading to v0.14.0, Hermes crashes with a NameError when a 429 rate limit error is encountered from a provider.

Error

Error: name '_pool_may_recover_from_rate_limit' is not defined

Root Cause

agent/conversation_loop.py imports run_agent as a module at line 81:

import run_agent

But at line 2254, _pool_may_recover_from_rate_limit is called without the module prefix:

pool_may_recover = _pool_may_recover_from_rate_limit(
    agent._credential_pool,
    provider=agent.provider,
    base_url=getattr(agent, "base_url", None),
)

This causes a NameError because the function is defined in run_agent.py, not in scope of conversation_loop.py.

Fix

pool_may_recover = run_agent._pool_may_recover_from_rate_limit(
    agent._credential_pool,
    provider=agent.provider,
    base_url=getattr(agent, "base_url", None),
)

Steps to Reproduce

  1. Configure a provider that hits a 429 rate limit (e.g. ollama-cloud weekly quota exhaustion)
  2. Trigger a conversation — Hermes fails with NameError instead of falling back to the next provider

Environment

  • Hermes v0.14.0 (2026.5.16)
  • Python 3.11.15

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix bug: NameError '_pool_may_recover_from_rate_limit' in conversation_loop.py on rate limit (v0.14.0)