fix(vertex): detect ADC across model pickers - #66201
Open
datalounaesportinc-droid wants to merge 1 commit into
Open
fix(vertex): detect ADC across model pickers#66201datalounaesportinc-droid wants to merge 1 commit into
datalounaesportinc-droid wants to merge 1 commit into
Conversation
tonydwb
reviewed
Jul 17, 2026
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Clean fix matching its description. No security issues. No debug artifacts.
Contributor
|
Thanks for addressing a real gap: current Problems
Suggested changes
Automated hermes-sweeper review. |
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?
Makes Google Vertex AI configured through Application Default Credentials (ADC) consistently visible across Hermes' generic auth status, task/model pickers, and the Desktop Providers UI.
The Vertex runtime already worked because
agent.vertex_adapterresolves ADC and project configuration. Discovery paths did not share that logic: they only checked the legacy API-key/OAuth registries, so a working Vertex setup could still appear unauthenticated and be omitted from cron/auxiliary model selectors.This fix uses the runtime provider registry as the auth-type source of truth and the existing fast
has_vertex_credentials()structural detector. It does not mint a token or perform network I/O when a picker opens.Related: #56687. This overlaps with #57399 and #61933, but also covers the generic
get_auth_status()path and the Desktop/api/envConnected badge. Unlike #57399, picker discovery remains structural-only rather than callingget_vertex_config()and minting an OAuth token.Related Issue
Related to #56687.
Type of Change
Changes Made
hermes_cli/auth.pyproviders.get_provider_profile().hermes_cli/model_switch.pyhas_vertex_credentials().hermes_cli/models.pyhermes_cli/web_server.pyVERTEX_CREDENTIALS_PATH.How to Test
vertex:project/region and working ADC without settingVERTEX_CREDENTIALS_PATH.google/gemini-3-pro-previewgoogle/gemini-3-flash-preview174 passedpytest-xdist; a serial full-suite run was stopped at 18% after 13 minutesrather than modifying the production Hermes venv to add test-only packages.
py_compile, andgit diff --check: passedChecklist
Code
pytest tests/ -qand all tests pass — full matrix delegated toGitHub CI; the local focused suite passed 174 tests
Documentation & Housekeeping
cli-config.yaml.exampleupdate — N/A; no config keys changedCONTRIBUTING.md/AGENTS.mdupdate — N/A; no workflow or architecture change