diff --git a/nanobot/cli/commands.py b/nanobot/cli/commands.py index 5280d0f..ff3493a 100644 --- a/nanobot/cli/commands.py +++ b/nanobot/cli/commands.py @@ -892,7 +892,9 @@ def status(): p = getattr(config.providers, spec.name, None) if p is None: continue - if spec.is_local: + if spec.is_oauth: + console.print(f"{spec.label}: [green]✓ (OAuth)[/green]") + elif spec.is_local: # Local deployments show api_base instead of api_key if p.api_base: console.print(f"{spec.label}: [green]✓ {p.api_base}[/green]") diff --git a/nanobot/config/schema.py b/nanobot/config/schema.py index 76ec74d..99c659c 100644 --- a/nanobot/config/schema.py +++ b/nanobot/config/schema.py @@ -298,7 +298,9 @@ class Config(BaseSettings): if spec.is_oauth: continue p = getattr(self.providers, spec.name, None) - if p and p.api_key: + if p is None: + continue + if p.api_key: return p, spec.name return None, None diff --git a/nanobot/providers/litellm_provider.py b/nanobot/providers/litellm_provider.py index 8cc4e35..43dfbb5 100644 --- a/nanobot/providers/litellm_provider.py +++ b/nanobot/providers/litellm_provider.py @@ -38,6 +38,9 @@ class LiteLLMProvider(LLMProvider): # api_key / api_base are fallback for auto-detection. self._gateway = find_gateway(provider_name, api_key, api_base) + # Detect GitHub Copilot (uses OAuth device flow, no API key) + self.is_github_copilot = "github_copilot" in default_model + # Configure environment variables if api_key: self._setup_env(api_key, api_base, default_model) @@ -76,6 +79,10 @@ class LiteLLMProvider(LLMProvider): def _resolve_model(self, model: str) -> str: """Resolve model name by applying provider/gateway prefixes.""" + # GitHub Copilot models pass through directly + if self.is_github_copilot: + return model + if self._gateway: # Gateway mode: apply gateway prefix, skip provider-specific prefixes prefix = self._gateway.litellm_prefix