Your lightweight open-source personal agent.
Python agent-frameworkai-agentai-agentschatbotchatopsdiscord-botllm-agentsllmslocal-llmmcpmodel-context-protocolmulti-agentopenai-compatibleopenclawpersonal-ai-assistantpythonself-hostedtelegram-bot-ai-assistantwebuiworkflow-automation
Merge remote-tracking branch 'origin/main' into feature/codex-oauth
pinhua335bcfb550d5d0
diff --cc nanobot/cli/commands.pyindex 727c451bf,bfb3b1dda..d8b72bd01--- a/nanobot/cli/commands.py+++ b/nanobot/cli/commands.py@@@ -172,6 -147,23 +172,33 @@@ This file stores important informationconsole.print(" [dim]Created memory/MEMORY.md[/dim]")+ def _make_provider(config):+ """Create LiteLLMProvider from config. Exits if no API key found."""+ from nanobot.providers.litellm_provider import LiteLLMProvider++ from nanobot.providers.openai_codex_provider import OpenAICodexProvider++ from oauth_cli_kit import get_token as get_codex_token+++ p = config.get_provider()+ model = config.agents.defaults.model++ if model.startswith("openai-codex/"):++ try:++ _ = get_codex_token()++ except Exception:++ console.print("Please run: [cyan]nanobot login --provider openai-codex[/cyan]")++ raise typer.Exit(1)++ return OpenAICodexProvider(default_model=model)+ if not (p and p.api_key) and not model.startswith("bedrock/"):+ console.print("[red]Error: No API key configured.[/red]")+ console.print("Set one in ~/.nanobot/config.json under providers section")+ raise typer.Exit(1)+ return LiteLLMProvider(+ api_key=p.api_key if p else None,+ api_base=config.get_api_base(),+ default_model=model,+ extra_headers=p.extra_headers if p else None,+ )++# ============================================================================# Gateway / Server# ============================================================================@@@ -699,15 -650,11 +686,17 @@@ def status()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]'}")- vllm_status = f"[green]�?{config.providers.vllm.api_base}[/green]" if has_vllm 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}")+ 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()