Skip to content

Your lightweight open-source personal agent.

Merge remote-tracking branch 'upstream/main' into feature/codex-oauth

pinhua336bca38b89d8c
diff --cc nanobot/cli/commands.py
index d8b72bd01,1dab818aa..0732d4844
--- a/nanobot/cli/commands.py
+++ b/nanobot/cli/commands.py
@@@ -671,32 -635,25 +671,31 @@@ def status()
console.print(f"Workspace: {workspace} {'[green]✓[/green]' if workspace.exists() else '[red]✗[/red]'}")
if config_path.exists():
+ from nanobot.providers.registry import PROVIDERS
+
console.print(f"Model: {config.agents.defaults.model}")
- # Check API keys
- has_openrouter = bool(config.providers.openrouter.api_key)
- has_anthropic = bool(config.providers.anthropic.api_key)
- has_openai = bool(config.providers.openai.api_key)
- has_gemini = bool(config.providers.gemini.api_key)
- has_zhipu = bool(config.providers.zhipu.api_key)
- has_vllm = bool(config.providers.vllm.api_base)
- has_aihubmix = bool(config.providers.aihubmix.api_key)
-
- console.print(f"OpenRouter API: {'[green]✓[/green]' if has_openrouter else '[dim]not set[/dim]'}")
- console.print(f"Anthropic API: {'[green]✓[/green]' if has_anthropic else '[dim]not set[/dim]'}")
- console.print(f"OpenAI API: {'[green]✓[/green]' if has_openai else '[dim]not set[/dim]'}")
- console.print(f"Gemini API: {'[green]✓[/green]' if has_gemini else '[dim]not set[/dim]'}")
- console.print(f"Zhipu AI API: {'[green]✓[/green]' if has_zhipu else '[dim]not set[/dim]'}")
- console.print(f"AiHubMix API: {'[green]✓[/green]' if has_aihubmix else '[dim]not set[/dim]'}")
- vllm_status = f"[green]✓ {config.providers.vllm.api_base}[/green]" if has_vllm else "[dim]not set[/dim]"
- console.print(f"vLLM/Local: {vllm_status}")
+ # Check API keys from registry
+ for spec in PROVIDERS:
+ p = getattr(config.providers, spec.name, None)
+ if p is None:
+ continue
+ if 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]")
+ else:
+ console.print(f"{spec.label}: [dim]not set[/dim]")
+ else:
+ has_key = bool(p.api_key)
+ console.print(f"{spec.label}: {'[green]✓[/green]' if has_key else '[dim]not set[/dim]'}")
+ try:
+ _ = get_codex_token()
+ codex_status = "[green]logged in[/green]"
+ except Exception:
+ codex_status = "[dim]not logged in[/dim]"
+ console.print(f"Codex Login: {codex_status}")
if __name__ == "__main__":
app()