The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
Merge branch 'copilot-seams/i2-auth' into copilot-seams/integration
Teknium5d5e48b5c736
diff --cc plugins/model-providers/copilot-acp/__init__.pyindex 02dbc8118e5,8c8a2ce7d76..ec331181b81--- a/plugins/model-providers/copilot-acp/__init__.py+++ b/plugins/model-providers/copilot-acp/__init__.py@@@ -11,8 -11,7 +11,9 @@@ from typing import Anfrom providers import register_providerfrom providers.base import ProviderProfile+ from .auth_rows import AUTH_ROW_FIELDS+from .catalog import acp_picker_catalog, clear_session_memo+from .picker import PICKER_FIELDSfrom .setup import SETUP_FIELDS@@@ -91,8 -87,7 +92,8 @@@ copilot_acp = CopilotACPProfileprocess_args_env_var="HERMES_COPILOT_ACP_ARGS",# A delegation.command no other profile claims has always run through this ACP client.process_command_fallback=True,- **SETUP_FIELDS, **AUTH_ROW_FIELDS,+ picker_catalog=acp_picker_catalog, static_models=("copilot-acp",),- **SETUP_FIELDS, **PICKER_FIELDS,++ **SETUP_FIELDS, **PICKER_FIELDS, **AUTH_ROW_FIELDS,)register_provider(copilot_acp)diff --cc plugins/model-providers/copilot-acp/auth_rows.pyindex 00000000000,5b87e66c9e8..a3a18a4a59emode 000000,100644..100644--- a/plugins/model-providers/copilot-acp/auth_rows.py+++ b/plugins/model-providers/copilot-acp/auth_rows.py@@@ -1,0 -1,10 +1,9 @@@+ """The ``hermes auth`` registry row this profile mirrors into ``hermes_cli.auth.PROVIDER_REGISTRY``:+ right after the ``copilot`` row, with its ``acp://`` base URL overridable from the environment."""++ from typing import Any++ AUTH_ROW_FIELDS: dict[str, Any] = {- "display_name": "GitHub Copilot ACP",+ "base_url_env_var": "COPILOT_ACP_BASE_URL",+ "registry_after": "copilot",+ }diff --cc plugins/model-providers/copilot/__init__.pyindex 93d27eab9ce,30700302178..0396addd785--- a/plugins/model-providers/copilot/__init__.py+++ b/plugins/model-providers/copilot/__init__.py@@@ -10,9 -10,9 +10,10 @@@ from typing import Anfrom providers import register_providerfrom providers.base import ProviderProfile+ from .auth_rows import AUTH_ROW_FIELDS-from .catalog import HOSTNAMES, METADATA_HOSTNAMES, MODELS_DEV_ID, CopilotCatalogMixin+from .catalog import CATALOG_FIELDS, HOSTNAMES, METADATA_HOSTNAMES, MODELS_DEV_ID, CopilotCatalogMixinfrom .credentials import CopilotCredentialsMixin+from .picker import PICKER_FIELDSfrom .responses import RESPONSES_PROFILE_FIELDS, CopilotResponsesMixinfrom .setup import SETUP_FIELDSfrom .wire import CopilotWireMixin@@@ -46,8 -46,7 +47,8 @@@ copilot = CopilotProfilename="copilot", aliases=("github-copilot", "github-models", "github-model", "github"),env_vars=("COPILOT_GITHUB_TOKEN", "GH_TOKEN", "GITHUB_TOKEN"), base_url="https://api.githubcopilot.com",auth_type="copilot", ambient_credentials=True, **RESPONSES_PROFILE_FIELDS, **SETUP_FIELDS,- hostnames=HOSTNAMES, metadata_hostnames=METADATA_HOSTNAMES, models_dev_id=MODELS_DEV_ID, **AUTH_ROW_FIELDS,+ hostnames=HOSTNAMES, metadata_hostnames=METADATA_HOSTNAMES, models_dev_id=MODELS_DEV_ID, **CATALOG_FIELDS,- **PICKER_FIELDS,++ **PICKER_FIELDS, **AUTH_ROW_FIELDS,)register_provider(copilot)diff --cc plugins/model-providers/copilot/auth_rows.pyindex 00000000000,ed02dad463f..3c98fcbbad2mode 000000,100644..100644--- a/plugins/model-providers/copilot/auth_rows.py+++ b/plugins/model-providers/copilot/auth_rows.py@@@ -1,0 -1,14 +1,13 @@@+ """The ``hermes auth`` registry row this profile mirrors into ``hermes_cli.auth.PROVIDER_REGISTRY``.++ Credentials resolve like an api-key provider (env tokens, pool, ``hermes auth add copilot`` paste), while+ ``auth_type="copilot"`` names its own setup flow; the row keeps its historical place right after LM Studio.+ """++ from typing import Any++ AUTH_ROW_FIELDS: dict[str, Any] = {- "display_name": "GitHub Copilot",+ "registry_auth_type": "api_key",+ "base_url_env_var": "COPILOT_API_BASE_URL",+ "registry_after": "lmstudio",+ }diff --cc providers/base.pyindex 6f6c215bf35,7c79d19319d..273617b4098--- a/providers/base.py+++ b/providers/base.py@@@ -689,32 -689,12 +689,42 @@@ class ProviderProfile"""True when replayed tool calls keep ``function.thought_signature`` (stripped everywhere else)."""return False+ # --- I2-cat: provider-owned catalog sources ---+ # ``picker_catalog(force_refresh) -> list | None``: the provider's own model-picker catalog (own+ # credential lookup, live fetch, curated fallback); set = a live source, tried before the generic+ # profile fetch like a built-in per-provider fetcher. None return falls through to that path.+ picker_catalog: Callable[[bool], Any] | None = field(default=None, kw_only=True)+ # Curated ids registered as this provider's row of core's static catalog (model detection,+ # defaults, validation) the way a built-in provider's curated list is; empty = no row.+ static_models: tuple = field(default=(), kw_only=True)+ # Credential files (``~`` allowed) whose mtime is folded into every cached catalog's fingerprint.+ catalog_credential_files: tuple = field(default=(), kw_only=True)++ def probe_models(+ self, *, base_url: str, api_key: str | None = None, timeout: float = 5.0,+ ) -> tuple[list[str] | None, str, str] | None:+ """``(model ids or None, probed_url, resolved_base_url)`` for a ``/models`` probe of *base_url*+ this provider answers from its own catalog; None = the generic HTTP probe."""+ return None++ def invalidate_catalog_cache(self) -> None:+ """Drop in-process catalog memos (``/model --refresh``); default none."""++ # --- I2-static: provider-table placement ---+ picker_after: str = "" # provider slug this row follows in the provider list ("" = appended)+ picker_group: tuple = () # (group_id, label, description): fold with same-group rows in interactive pickers+ catalog_aliases: bool = False # ``aliases`` also normalize in the model catalog (``/model``, pickers)+ aggregator: bool = False # catalog re-exposes many vendors' models (vendor/family ids, alias resolution)+ # HermesOverlay fields (transport, auth_type, extra_env_vars, base_url_override, base_url_env_var) for+ # the provider's models.dev-keyed definition, keyed by ``models_dev_id`` or ``name``; {} = none.+ provider_overlay: dict = field(default_factory=dict)+++ # --- I2-auth: hermes-auth registry row mirrored from this profile (hermes_cli/auth_plugin_providers.py) ---+ # auth_type of the registry row when credential resolution differs from the setup flow ``auth_type`` names+ # (an env-token provider with its own login); "" = ``auth_type``.+ registry_auth_type: str = ""+ # Env var overriding ``base_url`` on the registry row when it is not listed in ``env_vars``; "" = none.+ base_url_env_var: str = ""+ # Registry id this provider's row sits right after, keeping its place in priority-ordered scans+ # (aux api-key chain, env auto-detect); "" or an unknown id = appended.+ registry_after: str = ""