Python
Add Cerebras, Hugging Face, Cohere and SiliconFlow as compat providers
Rohit C Prasadb849b53d27bd
diff --git a/README.md b/README.mdindex c6db7374..fb145804 100644--- a/README.md+++ b/README.md@@ -87,7 +87,7 @@ Unattended runs never self-approve: their asks park in an inbox until a human anModel access is yours: pick a provider, paste your key, switch anytime. Supported out of the box:-**OpenAI · Anthropic · Google Gemini · BytePlus Ark · Volcengine Ark Agent Plan · Atlas Cloud · Inkling (Thinking Machines) · GLM (Z.ai) · DeepSeek · Kimi (Moonshot) · Qwen · MiniMax · Mistral · Grok (xAI) · Solar (Upstage)** - plus aggregators **OrcaRouter** and **OpenRouter**, open-weight models via **Together** and **Fireworks**, and fully local models via **Ollama**.+**OpenAI · Anthropic · Google Gemini · BytePlus Ark · Volcengine Ark Agent Plan · Atlas Cloud · Inkling (Thinking Machines) · GLM (Z.ai) · DeepSeek · Kimi (Moonshot) · Qwen · MiniMax · Mistral · Grok (xAI) · Solar (Upstage) · Cohere** - plus aggregators **OrcaRouter**, **OpenRouter** and **Hugging Face Inference Providers**, open-weight models via **Together**, **Fireworks**, **Cerebras** and **SiliconFlow**, and fully local models via **Ollama**, llama.cpp, vLLM, LM Studio, Jan, Docker Model Runner or mlx-lm.A curated model list marks what we've verified for tool-calling work. Adding any model string works at your own risk.diff --git a/coworker/providers/matrix.py b/coworker/providers/matrix.pyindex 5fd31245..6ed6eeed 100644--- a/coworker/providers/matrix.py+++ b/coworker/providers/matrix.py@@ -17,7 +17,8 @@ showing a made-up denominator. Values entered 2026-07-28 from vendor docs; verifthe id refresh.Resellers: Together + Fireworks + OpenRouter + Nebius + OrcaRouter + NVIDIA NIM-+ Groq (landed 2026-10-25, after the deferral of 2026-07-04).++ Groq (landed 2026-10-25, after the deferral of 2026-07-04) + Cerebras, Hugging Face+Inference Providers and SiliconFlow (2026-10-26)."""from __future__ import annotations@@ -221,6 +222,19 @@ MATRIX: dict[str, ModelEntry] = {# 2026-08-12 and solar-pro3 retires 2026-10-30 (docs/models/history)."upstage:solar-pro4": ModelEntry("Solar Pro 4 · Upstage", _AGENTIC, 512_000),"upstage:solar-mini4": ModelEntry("Solar Mini 4 · Upstage", _AGENTIC, 512_000),+ # -- Cerebras / Hugging Face / Cohere / SiliconFlow (added 2026-10-26) --------+ # Cerebras: inference-docs.cerebras.ai/models/openai-oss — "Tool Calling" listed,+ # "65k tokens (free tier), 131k tokens (paid)"; the paid window is stored.+ "cerebras:gpt-oss-120b": ModelEntry("GPT-OSS 120B · via Cerebras", _AGENTIC, 131_072),+ # Hugging Face Inference Providers: router.huggingface.co/v1/models (public listing)+ # reports supports_tools=true and context_length 1048576 for GLM-5.2 at its providers.+ "huggingface:zai-org/GLM-5.2": ModelEntry("GLM-5.2 · via Hugging Face", _AGENTIC, 1_048_576),+ # Cohere: docs.cohere.com/docs/models lists command-a-plus-05-2026 at 128k; the+ # tool-use guide and the Compatibility API docs use this id in their examples.+ "cohere:command-a-plus-05-2026": ModelEntry("Command A+ · Cohere", _AGENTIC, 128_000),+ # SiliconFlow: siliconflow.com/blog/glm-5-2-api-guide — id zai-org/GLM-5.2, "1M-token+ # context window" (pricing table: 1049K); tool calling among the listed workflows.+ "siliconflow:zai-org/GLM-5.2": ModelEntry("GLM-5.2 · via SiliconFlow", _AGENTIC, 1_048_576),# -- SambaNova ---------------------------------------------------------------# SambaCloud's OpenAI-compatible API; ids and windows are the `context_length` values# api.sambanova.ai/v1/models reports (keyless, read 2026-10-25). The two 128k rows arediff --git a/coworker/providers/registry.py b/coworker/providers/registry.pyindex 225bbb16..d8a70c43 100644--- a/coworker/providers/registry.py+++ b/coworker/providers/registry.py@@ -842,6 +842,41 @@ DESCRIPTORS: list[ProviderDescriptor] = [recommended_model="llama-3.3-70b-versatile",env_key="GROQ_API_KEY",),+ # Four more OpenAI-compatible vendors (2026-10-26); endpoints, key pages and the+ # recommended ids read from each vendor's docs that day (sources in matrix.py).+ _compat(+ "cerebras",+ "Cerebras",+ base_url="https://api.cerebras.ai/v1",+ recommended_model="gpt-oss-120b",+ env_key="CEREBRAS_API_KEY",+ ),+ # Hugging Face routes each repo id to one of its partner providers; model ids are+ # the Hub repo ids, optionally with a `:provider` suffix to pin one.+ _compat(+ "huggingface",+ "Hugging Face (Inference Providers)",+ base_url="https://router.huggingface.co/v1",+ recommended_model="zai-org/GLM-5.2",+ env_key="HF_TOKEN",+ endpoint_help="Prefilled with the Inference Providers router. Model ids are Hugging Face repo ids, e.g. zai-org/GLM-5.2.",+ ),+ _compat(+ "cohere",+ "Cohere",+ base_url="https://api.cohere.ai/compatibility/v1",+ recommended_model="command-a-plus-05-2026",+ env_key="COHERE_API_KEY",+ endpoint_help="Prefilled with Cohere's Compatibility API, which speaks the OpenAI chat format.",+ ),+ _compat(+ "siliconflow",+ "SiliconFlow",+ base_url="https://api.siliconflow.com/v1",+ recommended_model="zai-org/GLM-5.2",+ env_key="SILICONFLOW_API_KEY",+ endpoint_help="Prefilled with SiliconFlow's international endpoint. China mainland: https://api.siliconflow.cn/v1 (keys from cloud.siliconflow.cn).",+ ),ProviderDescriptor(name="ollama",title="Ollama",diff --git a/coworker/server/manager.py b/coworker/server/manager.pyindex 85f508bb..8f578b1b 100644--- a/coworker/server/manager.py+++ b/coworker/server/manager.py@@ -4354,6 +4354,11 @@ class SessionManager:],"atlascloud": ["zai-org/glm-5.2"],"upstage": ["solar-pro4", "solar-mini4"],+ # Verified 2026-10-26 (sources in providers/matrix.py).+ "cerebras": ["gpt-oss-120b"],+ "huggingface": ["zai-org/GLM-5.2"],+ "cohere": ["command-a-plus-05-2026"],+ "siliconflow": ["zai-org/GLM-5.2"],}def _suggested_models(self, name: str) -> list[str]:diff --git a/surfaces/gui/src/providers/ProviderSetup.tsx b/surfaces/gui/src/providers/ProviderSetup.tsxindex 460e41d9..bd7ce79a 100644--- a/surfaces/gui/src/providers/ProviderSetup.tsx+++ b/surfaces/gui/src/providers/ProviderSetup.tsx@@ -59,6 +59,10 @@ export const KEY_HELP: Record<string, { url: string; label: string; labelKey?: satlascloud: { url: "https://www.atlascloud.ai/console/api-keys", label: "atlascloud.ai" },groq: { url: "https://console.groq.com/keys", label: "console.groq.com" },upstage: { url: "https://console.upstage.ai/api-keys", label: "console.upstage.ai" },+ cerebras: { url: "https://cloud.cerebras.ai", label: "cloud.cerebras.ai" },+ huggingface: { url: "https://huggingface.co/settings/tokens", label: "huggingface.co" },+ cohere: { url: "https://dashboard.cohere.com/api-keys", label: "dashboard.cohere.com" },+ siliconflow: { url: "https://cloud.siliconflow.com", label: "cloud.siliconflow.com" },};export type Verify = { state: "idle" | "testing" | "ok" | "error"; msg?: string };diff --git a/surfaces/gui/src/providers/logos.ts b/surfaces/gui/src/providers/logos.tsindex a2087b60..731a10c4 100644--- a/surfaces/gui/src/providers/logos.ts+++ b/surfaces/gui/src/providers/logos.ts@@ -113,6 +113,11 @@ export const PROVIDER_ORDER = ["novita","groq","upstage",+ // No vendored marks yet for these four: the gallery shows the neutral monogram.+ "cerebras",+ "huggingface",+ "cohere",+ "siliconflow",];export function providerRank(name: string): number {diff --git a/tests/test_providers.py b/tests/test_providers.pyindex 6785471b..ce92ec82 100644--- a/tests/test_providers.py+++ b/tests/test_providers.py@@ -292,6 +292,10 @@ COMPAT_VENDORS = {"nvidia": "https://integrate.api.nvidia.com/v1","atlascloud": "https://api.atlascloud.ai/v1","upstage": "https://api.upstage.ai/v1",+ "cerebras": "https://api.cerebras.ai/v1",+ "huggingface": "https://router.huggingface.co/v1",+ "cohere": "https://api.cohere.ai/compatibility/v1",+ "siliconflow": "https://api.siliconflow.com/v1",}@@ -474,6 +478,10 @@ def test_compat_models_route_and_get_tool_capabilities():"orcarouter:anthropic/claude-sonnet-5","atlascloud:zai-org/glm-5.2","upstage:solar-pro4",+ "cerebras:gpt-oss-120b",+ "huggingface:zai-org/GLM-5.2",+ "cohere:command-a-plus-05-2026",+ "siliconflow:zai-org/GLM-5.2",):prefix = model.split(":", 1)[0]assert router._provider_name(model) == prefix