hermes-agent/agent
Steve Lawton c73e74386b feat(vertex): add Google Vertex AI provider for Gemini (OAuth2)
Adds Vertex AI as a first-class provider for Gemini models via Vertex's
OpenAI-compatible endpoint. Vertex authenticates with short-lived OAuth2
access tokens (service-account JSON or ADC), not a static API key — the
missing piece behind the recurring requests (#13484, #12639, #56259).

- agent/vertex_adapter.py: OAuth2 token minting + refresh-on-expiry
  (5-min margin), ADC->service-account fallback, global vs regional
  endpoint URLs. Config precedence: env var > config.yaml > default.
- plugins/model-providers/vertex/: provider profile (auth_type=vertex),
  reuses Gemini's extra_body.google.thinking_config translation.
- runtime_provider: vertex short-circuit BEFORE the credential pool so a
  credentials-file path is never mistaken for a static API key; mints a
  fresh token + computes base_url per resolve.
- run_agent + conversation_loop: _try_refresh_vertex_client_credentials()
  re-mints the token and rebuilds the client on a mid-session 401, so a
  long-lived gateway agent survives token expiry (~1h).
- auxiliary_client: vertex auth_type branch for side-LLM tasks.
- config.yaml: vertex.project_id / vertex.region (non-secret, bridged to
  env); credential path stays in .env (VERTEX_CREDENTIALS_PATH).
- setup wizard + model picker: dedicated _model_flow_vertex; curated
  google/gemini-* model list; --provider choices.
- pricing/metadata: Vertex prices off the gemini docs snapshot; endpoint
  host auto-maps to the vertex provider (no probe spam).
- lazy_deps + pyproject [vertex] extra: google-auth, opt-in only.
- docs: guides/google-vertex.md + providers page; tests for adapter +
  runtime resolution.

Salvages and modernizes #8427 by @slawt onto current main: rewired from
the legacy PROVIDER_REGISTRY path to the provider-profile architecture,
moved non-secret config out of .env into config.yaml, and added the
per-turn 401 token-refresh the original lacked.
2026-07-01 05:25:33 -07:00
..
lsp fix(tui): prevent killpg suicide during MCP shutdown 2026-07-01 04:54:46 -07:00
pet
…
secret_sources
…
transports fix(security): strip dynamic Hermes secrets from all subprocess spawn env 2026-07-01 14:37:22 +05:30
__init__.py
…
account_usage.py
…
agent_init.py fix(review): isolate the background-review fork from the canonical session 2026-07-01 16:21:39 +05:30
agent_runtime_helpers.py revert: back out prompt_caching.enabled toggle (#56105) for re-evaluation (#56126) 2026-07-01 00:20:32 -07:00
anthropic_adapter.py fix(anthropic): use claude-code/ UA prefix for OAuth to avoid 404 (#48534) 2026-07-01 15:42:15 +05:30
async_utils.py
…
auxiliary_client.py feat(vertex): add Google Vertex AI provider for Gemini (OAuth2) 2026-07-01 05:25:33 -07:00
azure_identity_adapter.py
…
background_review.py fix(review): isolate the background-review fork from the canonical session 2026-07-01 16:21:39 +05:30
bedrock_adapter.py
…
billing_view.py
…
browser_provider.py
…
browser_registry.py
…
chat_completion_helpers.py fix: make Nous Portal access token resolution resilient 2026-07-01 05:06:00 -07:00
codex_responses_adapter.py
…
codex_runtime.py fix+test(codex): self-persist projected turns; keep agent_persisted=True 2026-07-01 17:08:59 +05:30
coding_context.py
…
context_breakdown.py
…
context_compressor.py fix(compression): clear all per-session state in on_session_end, not just _previous_summary 2026-07-01 02:48:32 -07:00
context_engine.py fix(context): clamp -1 post-compression sentinel in sibling status paths 2026-07-01 13:36:50 +05:30
context_references.py fix(security): anchor @file context refs to canonical read deny-list 2026-07-01 02:43:49 -07:00
conversation_compression.py
…
conversation_loop.py feat(vertex): add Google Vertex AI provider for Gemini (OAuth2) 2026-07-01 05:25:33 -07:00
copilot_acp_client.py
…
credential_persistence.py
…
credential_pool.py fix(auth): serialize Codex OAuth pool refresh under the auth-store lock (#56233) 2026-07-01 02:45:07 -07:00
credential_sources.py
…
credits_tracker.py
…
curator.py
…
curator_backup.py
…
display.py
…
error_classifier.py fix(error-classifier): route 5xx context-overflow into compression 2026-07-01 16:14:16 +05:30
errors.py
…
file_safety.py fix(file): block credential paths from search results 2026-07-01 01:02:35 -07:00
gemini_native_adapter.py
…
gemini_schema.py
…
i18n.py
…
image_gen_provider.py
…
image_gen_registry.py
…
image_routing.py
…
insights.py
…
iteration_budget.py
…
jiter_preload.py
…
learn_prompt.py
…
learning_graph.py
…
learning_graph_render.py
…
learning_mutations.py
…
lmstudio_reasoning.py
…
manual_compression_feedback.py
…
markdown_tables.py
…
memory_manager.py
…
memory_provider.py
…
message_content.py
…
message_sanitization.py
…
moa_loop.py fix(moa): capture streamed aggregator output into full-turn traces (#56312) 2026-07-01 04:07:46 -07:00
moa_trace.py fix(moa): capture streamed aggregator output into full-turn traces (#56312) 2026-07-01 04:07:46 -07:00
model_metadata.py fix(context): parse vLLM's token-based output-cap error format 2026-07-01 03:17:48 -07:00
models_dev.py
…
moonshot_schema.py
…
nous_rate_guard.py
…
onboarding.py
…
oneshot.py
…
plugin_llm.py
…
portal_tags.py
…
process_bootstrap.py
…
prompt_builder.py
…
prompt_caching.py
…
rate_limit_tracker.py
…
reasoning_timeouts.py
…
redact.py security(agent): redact Slack App-Level (xapp-) tokens 2026-07-01 02:45:22 -07:00
replay_cleanup.py
…
retry_utils.py
…
runtime_cwd.py
…
secret_scope.py
…
shell_hooks.py
…
skill_bundles.py
…
skill_commands.py
…
skill_preprocessing.py
…
skill_utils.py
…
ssl_guard.py
…
stream_diag.py
…
subdirectory_hints.py fix(subdirectory_hints): catch RuntimeError from Path.expanduser() 2026-07-01 04:55:15 -07:00
system_prompt.py
…
think_scrubber.py
…
thinking_timeout_guidance.py
…
thread_scoped_output.py
…
title_generator.py fix(title_generator): strip think blocks from LLM output before extracting title 2026-07-01 04:18:48 -07:00
tool_dispatch_helpers.py fix(agent): wrap list-type untrusted content in untrusted_tool_result 2026-07-01 02:44:09 -07:00
tool_executor.py fix(agent): prefer late-completing real result over timeout message (review) 2026-07-01 14:56:52 +05:30
tool_guardrails.py
…
tool_result_classification.py
…
trajectory.py
…
transcription_provider.py
…
transcription_registry.py
…
tts_provider.py
…
tts_registry.py
…
turn_context.py
…
turn_finalizer.py fix(agent): persist recovered final responses 2026-07-01 03:34:49 -07:00
turn_retry_state.py feat(vertex): add Google Vertex AI provider for Gemini (OAuth2) 2026-07-01 05:25:33 -07:00
usage_pricing.py feat(vertex): add Google Vertex AI provider for Gemini (OAuth2) 2026-07-01 05:25:33 -07:00
verification_evidence.py
…
verification_stop.py
…
verify_hooks.py
…
vertex_adapter.py feat(vertex): add Google Vertex AI provider for Gemini (OAuth2) 2026-07-01 05:25:33 -07:00
video_gen_provider.py
…
video_gen_registry.py
…
web_search_provider.py
…
web_search_registry.py
…