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(cli): refresh oauth provider default models
hamb1ybfbae5a7b3d1
diff --git a/nanobot/cli/commands.py b/nanobot/cli/commands.pyindex d471b7465..b3da8b781 100644--- a/nanobot/cli/commands.py+++ b/nanobot/cli/commands.py@@ -1745,8 +1745,8 @@ _PROVIDER_DISPLAY: dict[str, str] = {}_OAUTH_PROVIDER_DEFAULT_MODELS: dict[str, str] = {- "openai_codex": "openai-codex/gpt-5.1-codex",- "github_copilot": "github-copilot/gpt-4.1",+ "openai_codex": "openai-codex/gpt-5.4-mini",+ "github_copilot": "github-copilot/gpt-5.4-mini",}diff --git a/tests/cli/test_commands.py b/tests/cli/test_commands.pyindex 817ea38a3..1a43316f5 100644--- a/tests/cli/test_commands.py+++ b/tests/cli/test_commands.py@@ -466,11 +466,40 @@ def test_provider_login_can_set_openai_codex_as_main_provider(tmp_path):saved = Config.model_validate(json.loads(config_path.read_text(encoding="utf-8")))assert saved.agents.defaults.provider == "openai_codex"- assert saved.agents.defaults.model == "openai-codex/gpt-5.1-codex"+ assert saved.agents.defaults.model == "openai-codex/gpt-5.4-mini"assert saved.agents.defaults.model_preset is Noneassert make_provider(saved).__class__.__name__ == "OpenAICodexProvider"+def test_provider_login_can_set_github_copilot_as_main_provider(tmp_path):+ config_path = tmp_path / "config.json"+ original = cli_commands._LOGIN_HANDLERS["github_copilot"]+ cli_commands._LOGIN_HANDLERS["github_copilot"] = lambda: None+ try:+ result = runner.invoke(+ app,+ [+ "provider",+ "login",+ "github-copilot",+ "--set-main",+ "--config",+ str(config_path),+ ],+ )+ finally:+ cli_commands._LOGIN_HANDLERS["github_copilot"] = original++ assert result.exit_code == 0+ assert "Set github-copilot as the main provider" in result.stdout++ saved = Config.model_validate(json.loads(config_path.read_text(encoding="utf-8")))+ assert saved.agents.defaults.provider == "github_copilot"+ assert saved.agents.defaults.model == "github-copilot/gpt-5.4-mini"+ assert saved.agents.defaults.model_preset is None+ assert make_provider(saved).__class__.__name__ == "GitHubCopilotProvider"++def test_provider_login_model_implies_set_main_provider(tmp_path):config_path = tmp_path / "config.json"original = cli_commands._LOGIN_HANDLERS["github_copilot"]