mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-18 09:51:59 +00:00
The /model interactive picker resolved a base_url from user credentials but never passed it to ProviderProfile.fetch_models(), causing the picker to always query the provider's hardcoded default endpoint instead of the user's custom URL (e.g. a company litellm proxy). - providers/base.py: add optional base_url parameter to fetch_models() - hermes_cli/models.py: pass resolved base_url to fetch_models() - Update all subclass overrides for signature compatibility - Add 6 regression tests covering override, fallback, and integration
35 lines
1.1 KiB
Python
35 lines
1.1 KiB
Python
"""GitHub Copilot ACP provider profile.
|
|
|
|
copilot-acp uses an external ACP subprocess — NOT the standard
|
|
transport. api_mode="copilot_acp" is handled separately in run_agent.py.
|
|
The profile captures auth + endpoint metadata for registry migration.
|
|
"""
|
|
|
|
from providers import register_provider
|
|
from providers.base import ProviderProfile
|
|
|
|
|
|
class CopilotACPProfile(ProviderProfile):
|
|
"""GitHub Copilot ACP — external process, no REST models endpoint."""
|
|
|
|
def fetch_models(
|
|
self,
|
|
*,
|
|
api_key: str | None = None,
|
|
base_url: str | None = None,
|
|
timeout: float = 8.0,
|
|
) -> list[str] | None:
|
|
"""Model listing is handled by the ACP subprocess."""
|
|
return None
|
|
|
|
|
|
copilot_acp = CopilotACPProfile(
|
|
name="copilot-acp",
|
|
aliases=("github-copilot-acp", "copilot-acp-agent"),
|
|
api_mode="chat_completions", # ACP subprocess uses chat_completions routing
|
|
env_vars=(), # Managed by ACP subprocess
|
|
base_url="acp://copilot", # ACP internal scheme
|
|
auth_type="external_process",
|
|
)
|
|
|
|
register_provider(copilot_acp)
|