fix(vertex): surface Vertex on the desktop Keys tab for provider parity
The provider-parity contract (tests/hermes_cli/test_provider_parity.py) requires every hermes model provider to be configurable in the desktop Providers tabs. Vertex authenticates via OAuth2 (service-account JSON / ADC) and has no api_key_env_vars, so — like bedrock's aws_sdk — it needs its credential env var tagged to the provider card explicitly. Tag VERTEX_CREDENTIALS_PATH to the vertex card in _catalog_provider_env_metadata().
This commit is contained in:
parent
c73e74386b
commit
3f6c6bd29e
1 changed files with 19 additions and 0 deletions
|
|
@ -4846,6 +4846,25 @@ def _catalog_provider_env_metadata() -> dict:
|
|||
"advanced": existing.get("advanced", True),
|
||||
"category": "provider",
|
||||
}
|
||||
|
||||
# Vertex AI authenticates via OAuth2 (service-account JSON or ADC), not a
|
||||
# pasted API key, so it also has no api_key_env_vars. Tag its credential
|
||||
# env var to the provider card so it appears on the Keys tab (otherwise
|
||||
# Vertex — a `hermes model` provider — would be invisible in the desktop
|
||||
# app). The value is a filesystem path, not a secret string, so it is
|
||||
# not a password field.
|
||||
if d.auth_type == "vertex":
|
||||
existing = meta.get("VERTEX_CREDENTIALS_PATH", {})
|
||||
meta["VERTEX_CREDENTIALS_PATH"] = {
|
||||
"provider": d.slug,
|
||||
"provider_label": d.label,
|
||||
"description": existing.get("description")
|
||||
or f"{d.label} — service account JSON path (or use ADC)",
|
||||
"url": existing.get("url"),
|
||||
"is_password": False,
|
||||
"advanced": existing.get("advanced", True),
|
||||
"category": "provider",
|
||||
}
|
||||
return meta
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue