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
feat(providers): route OpenCode Go muse-spark contributor models through Responses
Parman Mohammadalizadeh6f53f9f6c92e
diff --git a/nanobot/providers/registry.py b/nanobot/providers/registry.pyindex b28d23df9..79b02f199 100644--- a/nanobot/providers/registry.py+++ b/nanobot/providers/registry.py@@ -290,6 +290,10 @@ PROVIDERS: tuple[ProviderSpec, ...] = (detect_by_base_keyword="opencode.ai/zen/go",default_api_base="https://opencode.ai/zen/go/v1",strip_model_prefixes=("opencode-go", "opencode_go"),+ responses=ResponsesCapabilities(+ models=("muse-spark-1.2-contributor", "muse-spark-1.3-contributor"),+ allows_chat_fallback=False,+ ),),# Hugging Face Inference Providers: OpenAI-compatible router for chat models.ProviderSpec(diff --git a/tests/providers/test_opencode_provider.py b/tests/providers/test_opencode_provider.pyindex 2b97a2a46..8fa5909f1 100644--- a/tests/providers/test_opencode_provider.py+++ b/tests/providers/test_opencode_provider.py@@ -130,6 +130,19 @@ def test_opencode_prefixes_are_stripped_before_request() -> None:assert go_kwargs["model"] == "o3"[email protected]("model", ["muse-spark-1.2-contributor", "muse-spark-1.3-contributor"])+def test_opencode_go_muse_spark_contributor_models_use_responses(model) -> None:+ provider = OpenAICompatProvider(+ api_key=None,+ default_model=f"opencode-go/{model}",+ spec=find_by_name("opencode_go"),+ )++ assert provider._should_use_responses_api(model, None) is True+ assert provider._should_use_responses_api(f"opencode-go/{model}", None) is True+ assert provider._should_use_responses_api("opencode-go/kimi-k2.5", None) is False++def _fake_responses_output() -> dict[str, object]:return {"output": [{