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
test(custom): cover empty choices response handling
Xubin Ren49fc50b1e623
diff --git a/tests/test_custom_provider.py b/tests/test_custom_provider.pynew file mode 100644index 000000000..463affedc--- /dev/null+++ b/tests/test_custom_provider.py@@ -0,0 +1,13 @@+from types import SimpleNamespace++from nanobot.providers.custom_provider import CustomProvider+++def test_custom_provider_parse_handles_empty_choices() -> None:+ provider = CustomProvider()+ response = SimpleNamespace(choices=[])++ result = provider._parse(response)++ assert result.finish_reason == "error"+ assert "empty choices" in result.content