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
fix: update Zhipu AI API key env var and improve model prefixing
Manus AIa0280a1e4ac6
diff --git a/nanobot/cli/commands.py b/nanobot/cli/commands.pyindex c2241fbf2..641339df9 100644--- a/nanobot/cli/commands.py+++ b/nanobot/cli/commands.py@@ -642,12 +642,14 @@ def status():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)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]'}")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}")diff --git a/nanobot/providers/litellm_provider.py b/nanobot/providers/litellm_provider.pyindex 89454128e..1dbee8ea1 100644--- a/nanobot/providers/litellm_provider.py+++ b/nanobot/providers/litellm_provider.py@@ -50,6 +50,7 @@ class LiteLLMProvider(LLMProvider):elif "gemini" in default_model.lower():os.environ.setdefault("GEMINI_API_KEY", api_key)elif "zhipu" in default_model or "glm" in default_model or "zai" in default_model:+ os.environ.setdefault("ZAI_API_KEY", api_key)os.environ.setdefault("ZHIPUAI_API_KEY", api_key)elif "groq" in default_model:os.environ.setdefault("GROQ_API_KEY", api_key)@@ -92,7 +93,8 @@ class LiteLLMProvider(LLMProvider):if ("glm" in model.lower() or "zhipu" in model.lower()) and not (model.startswith("zhipu/") ormodel.startswith("zai/") or- model.startswith("openrouter/")+ model.startswith("openrouter/") or+ model.startswith("hosted_vllm/")):model = f"zai/{model}"