hermes-agent/infographic
Teknium a84cec61ca
fix(minimax-oauth): refresh short-lived access tokens per request (#30619)
* fix(minimax-oauth): refresh short-lived access tokens per request

MiniMax OAuth issues ~15-minute access tokens. The Anthropic SDK caches
api_key as a static string at client construction, so a session that
resolves credentials once at startup keeps sending the same bearer until
MiniMax returns 401 mid-session.

Swap the static string for a callable token provider, reusing the existing
Entra-ID bearer-hook infrastructure in build_anthropic_client. The callable
re-reads auth.json on each invocation and calls _refresh_minimax_oauth_state,
which is a no-op when the token still has more than 60s of life left and
refreshes proactively otherwise. Refreshes persist to auth.json so other
processes (gateway, cron) see them immediately.

The wire-up lives at the agent-init / model-switch boundary rather than in
resolve_runtime_provider, so aux client paths that hand the api_key string
to OpenAI(api_key=...) are unaffected.

* docs: add infographic for minimax-oauth token refresh
2026-05-22 15:16:15 -07:00
..
aux-picker-parity infographic: PR #30373 aux model picker parity salvage 2026-05-22 04:10:38 -07:00
bitwarden-secrets-manager feat(secrets): Bitwarden Secrets Manager integration with lazy bws install (#30035) 2026-05-21 14:10:34 -07:00
minimax-oauth-token-refresh fix(minimax-oauth): refresh short-lived access tokens per request (#30619) 2026-05-22 15:16:15 -07:00
pr-8056-hash-pairing-codes infographic: PR #8056 hash pairing codes salvage 2026-05-22 04:11:49 -07:00
pr-8306-hmac-bypass infographic: PR #8306 webhook HMAC bypass salvage 2026-05-22 03:45:21 -07:00
pr-14157-control-plane-write-deny infographic: PR #14157 control-plane write-deny salvage 2026-05-22 04:32:14 -07:00
pr-27612-nous-url-allowlist infographic: PR #27612 Nous URL allowlist salvage 2026-05-22 14:17:40 -07:00
pr-30591-discord-plugin-migration infographic: PR #30591 Discord adapter → bundled plugin salvage (#30614) 2026-05-22 14:24:03 -07:00
pr27784-anthropic-refactor infographic: PR #27784 anthropic adapter refactor salvage 2026-05-22 04:23:02 -07:00
pr30609-termux-cold-start infographic: PR #30609 Termux cold-start salvage (#30618) 2026-05-22 14:32:41 -07:00
skill-scanner-no-ghost-skills fix(skills): prune dependency/venv dirs from all skill scanners (#30042) 2026-05-21 14:18:02 -07:00