hermes-agent/agent
Teknium 1ddb03b76f
feat: per-model rate limit handler with stepped cooldown (inspired by OpenClaw)
Add agent/rate_limiter.py — a thread-safe per-model rate limit handler
with a stepped cooldown ladder:
  1st hit: 30s cooldown
  2nd hit: 60s cooldown
  3rd+ hits: 5min cooldown
  Resets after 10min of no hits

Wired into run_agent.py's API error handling. When a 429 is caught and
no fallback provider is available, the rate limiter kicks in with
escalating backoff instead of immediately failing.

23 new tests.
2026-03-30 01:15:26 -07:00
..
__init__.py Refactor Terminal and AIAgent cleanup 2026-02-21 22:31:43 -08:00
anthropic_adapter.py fix(anthropic): use model-native output limits instead of hardcoded 16K (#3426) 2026-03-27 13:02:52 -07:00
auxiliary_client.py fix: add INFO-level logging for auxiliary provider resolution (#3866) 2026-03-29 21:29:00 -07:00
context_compressor.py fix: cap percentage displays at 100% in stats, gateway, and memory tool (#3599) 2026-03-28 14:55:18 -07:00
context_references.py fix: add timeout to subprocess calls in context_references (#3469) 2026-03-27 17:51:14 -07:00
copilot_acp_client.py fix(acp): preserve leading whitespace in streaming chunks 2026-03-20 09:38:13 -07:00
display.py feat(display): configurable tool preview length -- show full paths by default (#3841) 2026-03-29 18:02:42 -07:00
insights.py chore: fix 154 f-strings, simplify getattr/URL patterns, remove dead code (#3119) 2026-03-25 19:47:58 -07:00
model_metadata.py fix(agent): support full context length resolution for direct Gemini API endpoints (#3876) 2026-03-29 21:56:07 -07:00
models_dev.py fix: write models.dev disk cache atomically (#3588) 2026-03-28 14:20:30 -07:00
prompt_builder.py feat(skills): support external skill directories via config (#3678) 2026-03-29 00:33:30 -07:00
prompt_caching.py fix(prompt-caching): skip top-level cache_control on role:tool for OpenRouter 2026-03-21 16:54:43 -07:00
rate_limiter.py feat: per-model rate limit handler with stepped cooldown (inspired by OpenClaw) 2026-03-30 01:15:26 -07:00
redact.py fix(redact): safely handle non-string inputs 2026-03-21 16:55:02 -07:00
skill_commands.py feat(skills): support external skill directories via config (#3678) 2026-03-29 00:33:30 -07:00
skill_utils.py feat(skills): support external skill directories via config (#3678) 2026-03-29 00:33:30 -07:00
smart_model_routing.py feat: integrate GitHub Copilot providers across Hermes 2026-03-17 23:40:22 -07:00
title_generator.py feat(agent): configurable timeouts for auxiliary LLM calls via config.yaml (#3597) 2026-03-28 14:35:28 -07:00
trajectory.py Refactor Terminal and AIAgent cleanup 2026-02-21 22:31:43 -08:00
usage_pricing.py fix: status bar shows 26K instead of 260K for token counts with trailing zeros (#3024) 2026-03-25 12:45:58 -07:00