fix(agent): register Upstage keys in the env-var catalog

`UPSTAGE_API_KEY` / `UPSTAGE_BASE_URL` were wired through the provider
resolver, auth registry, and the EnvPage grouping, but never added to
`OPTIONAL_ENV_VARS` in hermes_cli/config.py. The dashboard/desktop
Providers page builds its list from that catalog (`/api/env` iterates
`OPTIONAL_ENV_VARS`), so with no entry the keys were never emitted and
"Upstage Solar" never rendered — the EnvPage prefix group stayed empty.

Add both keys under `category: "provider"` (matching gmi/minimax) so they
show up in `hermes dashboard` / `hermes desktop` under "Upstage Solar".
Adds a regression test asserting the catalog contains them, mirroring the
existing GMI coverage.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Changhyun Min 2026-07-02 13:15:42 +09:00 committed by kshitij
parent 0031c5c371
commit c1e36f4329
2 changed files with 35 additions and 0 deletions

View file

@ -3707,6 +3707,21 @@ OPTIONAL_ENV_VARS = {
"category": "provider",
"advanced": True,
},
"UPSTAGE_API_KEY": {
"description": "Upstage API key for Solar LLM models",
"prompt": "Upstage API Key",
"url": "https://console.upstage.ai/api-keys",
"password": True,
"category": "provider",
},
"UPSTAGE_BASE_URL": {
"description": "Upstage base URL override (default: https://api.upstage.ai/v1)",
"prompt": "Upstage base URL (leave empty for default)",
"url": None,
"password": False,
"category": "provider",
"advanced": True,
},
"AWS_REGION": {
"description": "AWS region for Bedrock API calls (e.g. us-east-1, eu-central-1)",
"prompt": "AWS Region",

View file

@ -68,6 +68,26 @@ class TestUpstageOverlay:
assert get_label("upstage") == "Upstage Solar"
class TestUpstageEnvCatalog:
"""The dashboard/desktop Providers page lists only OPTIONAL_ENV_VARS keys
whose category is "provider". Without these entries UPSTAGE_API_KEY /
UPSTAGE_BASE_URL never reach the frontend and Upstage stays invisible even
though EnvPage.tsx has a matching PROVIDER_GROUPS prefix.
"""
def test_optional_env_vars_include_upstage(self):
from hermes_cli.config import OPTIONAL_ENV_VARS
assert "UPSTAGE_API_KEY" in OPTIONAL_ENV_VARS
assert OPTIONAL_ENV_VARS["UPSTAGE_API_KEY"]["category"] == "provider"
assert OPTIONAL_ENV_VARS["UPSTAGE_API_KEY"]["password"] is True
assert OPTIONAL_ENV_VARS["UPSTAGE_API_KEY"]["url"]
assert "UPSTAGE_BASE_URL" in OPTIONAL_ENV_VARS
assert OPTIONAL_ENV_VARS["UPSTAGE_BASE_URL"]["category"] == "provider"
assert OPTIONAL_ENV_VARS["UPSTAGE_BASE_URL"]["password"] is False
class TestUpstageConfigProviderWins:
"""End-to-end: an explicit config provider must beat env auto-detect.