fix(commandcode): accept base_url kwarg in fetch_models overrides

The model picker's generic live-fetch path (hermes_cli/models.py
provider_model_ids) calls profile.fetch_models(api_key=..., base_url=...).
Both CommandCode overrides only accepted api_key/timeout, so every picker
open raised TypeError, which was silently swallowed, leaving the provider
with zero models.

Match the base ProviderProfile.fetch_models signature (base_url kwarg) and
add a regression test asserting both profiles accept it.
This commit is contained in:
greyvito
2026-08-18 09:05:28 +07:00
committed by Teknium
parent d354af5e12
commit f5ea3fa9cb
2 changed files with 26 additions and 0 deletions
@@ -79,6 +79,7 @@ class CommandCodeProfile(ProviderProfile):
self,
*,
api_key: str | None = None,
base_url: str | None = None,
timeout: float = 8.0,
) -> list[str] | None:
"""Fetch from the public CommandCode /models endpoint."""
@@ -126,6 +127,7 @@ class CommandCodeAnthropicProfile(ProviderProfile):
self,
*,
api_key: str | None = None,
base_url: str | None = None,
timeout: float = 8.0,
) -> list[str] | None:
"""Fetch from the public CommandCode /models endpoint.