hermes-agent/agent
Teknium a7f7e87070
fix: preserve credential_pool through smart routing and defer eager fallback on 429 (#4361)
Three bugs prevented credential pool rotation from working when multiple
Codex OAuth tokens were configured:

1. credential_pool was dropped during smart model turn routing.
   resolve_turn_route() constructed runtime dicts without it, so the
   AIAgent was created without pool access. Fixed in smart_model_routing.py
   (no-route and fallback paths), cli.py, and gateway/run.py.

2. Eager fallback fired before pool rotation on 429. The rate-limit
   handler at line ~7180 switched to a fallback provider immediately,
   before _recover_with_credential_pool got a chance to rotate to the
   next credential. Now deferred when the pool still has credentials.

3. (Non-issue) Retry budget was reported as too small, but successful
   pool rotations already skip retry_count increment — no change needed.

Reported by community member Schinsly who identified all three root
causes and verified the fix locally with multiple Codex accounts.
2026-04-01 01:02:34 -07:00
..
__init__.py Refactor Terminal and AIAgent cleanup 2026-02-21 22:31:43 -08:00
anthropic_adapter.py feat(auth): same-provider credential pools with rotation, custom endpoint support, and interactive CLI (#2647) 2026-03-31 03:10:01 -07:00
auxiliary_client.py feat(auth): same-provider credential pools with rotation, custom endpoint support, and interactive CLI (#2647) 2026-03-31 03:10:01 -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(security): add .config/gh to read protection for @file references (#4327) 2026-03-31 12:48:30 -07:00
copilot_acp_client.py fix(acp): preserve leading whitespace in streaming chunks 2026-03-20 09:38:13 -07:00
credential_pool.py fix: preserve credential_pool through smart routing and defer eager fallback on 429 (#4361) 2026-04-01 01:02:34 -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 feat: add Fireworks context length detection support (#4158) 2026-03-30 20:37:08 -07:00
models_dev.py feat: add Fireworks context length detection support (#4158) 2026-03-30 20:37:08 -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
redact.py fix(security): add missing GitHub OAuth token patterns and snapshot redact flag 2026-03-31 10:30:48 -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 fix: preserve credential_pool through smart routing and defer eager fallback on 429 (#4361) 2026-04-01 01:02:34 -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