Conversation
Rebase the runtime footer extension onto current main: provider/account/ context/quota fields, underline support, credential-scoped quota cache, DeepSeek balance lookup, Anthropic runtime-key preference, run.py wiring, docs, and regression tests.
Add an opt-in `reasoning` footer field that renders the live turn effort as a compact label (off/min/low/med/high/xhi/max/ult), wired from the agent reasoning_config including /reasoning overrides.
Resolve footer config and quota usage inside the routed profile scope, then pass only the resolved snapshot/config to final rendering. This avoids cross-profile config/auth reads in multiplexed gateways and keeps raw API credentials out of agent_result. Replace synchronous cache misses with profile- and credential-scoped stale-while-revalidate: cold/stale entries schedule one daemon refresh and return immediately, transient failures preserve the last valid snapshot, and the cache is bounded to 64 entries.
API `primary_window` is no longer always 5 h; derive the compact label (`5h` / `7d` / `15d` / `17h` / …) from the real `limit_window_seconds` returned by the Codex usage endpoint instead of guessing from position. - New helper `_codex_window_label(window, fallback)` reads the field, converts to an integral compact label, and falls back only when the field is missing or unusual. - `_fetch_codex_account_usage` labels windows through the helper. - `_quota_label` tightens label-matching to exact-set membership so labels that just contain "5" or "7" (e.g. `15d`, `17h`) are not mis-displayed as 5h/7d. - Removed unused provider-text variable from `_quota_label`.
12 tasks
Author
|
This is the current-main replacement review target for #18188. The original branch cannot be refreshed from The refreshed branch keeps the same runtime-footer/quota scope and includes the hardening from the closed fork PR #1. Focused validation is 82 passed, with ruff, py_compile, and Please review #98180 when convenient, or let us know if you prefer the original #18188 branch to remain canonical. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This is a refreshed replacement for NousResearch/hermes-agent#18188, rebased onto the current upstream
main.It extends the opt-in runtime footer with model/reasoning metadata and provider account/quota information while preserving the legacy default footer. Quota refresh is non-blocking and uses stale-while-revalidate behavior so a slow or unavailable provider does not block message delivery.
The branch also carries the hardening originally proposed in lancecheney/hermes-agent#1: routed-profile and credential-scoped cache isolation, in-flight deduplication, stale preservation on transient failures, bounded cache size, and removal of raw credentials from
agent_result.The original #18188 branch belongs to
lancecheney, so it cannot be rebased from this account. This PR keeps the original open and provides a current-main review target without force-pushing another user's branch.Scope
model,context_pct, andcwd.Changes
limit_window_seconds.Validation
Rebased branch validation on Linux:
Focused command:
Review request
Please review this refreshed current-main branch as a replacement review target for #18188. If maintainers prefer to keep #18188 as the canonical PR, its owner can transfer or refresh that branch and close this replacement.