Files
hermes-agent/agent
Teknium 72aa6fdb46 fix(cli): the gateway-backed CLI routes Vertex without minting a second token
The classic CLI's _ensure_runtime_credentials / _probe_runtime_credentials still ran
resolve_runtime_provider -> _resolve_vertex_runtime -> get_vertex_config(), a real OAuth JWT
exchange in the CLI process, on every launch and turn. The gateway session builds the agent and
mints its own token for the turn, so the CLI's token was thrown away and every Vertex launch
minted twice (test_native_vertex_errors[rate_limited, unavailable],
test_wire_scheme_bearer_and_single_token_mint: 2-3 mints where 1 is expected; green on
0b0f7f15f1).

- runtime_provider.deferred_token_mint(): under it, _resolve_vertex_runtime loads the SA/ADC
  credentials and builds the base_url without minting (vertex_adapter.get_vertex_base_url), so a
  missing/unloadable credential still raises main's AuthError copy; api_key is the stable callable
  vertex_adapter.vertex_access_token, minted only if something in this process ever sends.
- The CLI's credential resolution (primary + fallback chain) and readiness probe run under it.
  Off by default: the gateway/agent path is unchanged.

Red first: test_vertex_provider.py::test_gateway_backed_cli_resolves_vertex_route_without_minting;
guard: test_gateway_backed_cli_keeps_vertex_credential_failure_copy.
2026-10-13 00:56:48 -07:00
..
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:36 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-08 19:28:23 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-08 19:28:23 +02:00
2026-10-09 17:34:36 +02:00
2026-10-09 17:34:36 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-08 21:29:48 +02:00
…
2026-10-09 17:34:36 +02:00
2026-10-09 17:34:38 +02:00
2026-10-08 19:54:07 +02:00
2026-10-08 19:54:07 +02:00
2026-10-08 21:35:58 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:36 +02:00
2026-10-09 17:34:36 +02:00
2026-10-08 19:54:07 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-08 19:54:07 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-08 21:29:48 +02:00
2026-10-09 17:34:38 +02:00
2026-10-08 21:29:48 +02:00
2026-10-08 19:54:07 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:36 +02:00
2026-10-09 17:34:36 +02:00
2026-10-08 21:29:48 +02:00