{"slug": "show-hn-selfclaw-self-hosted-multi-model-ai-chat-with-openai-compatible-api", "title": "Show HN: SelfClaw – Self-hosted multi-model AI chat with OpenAI-compatible API", "summary": "A developer released SelfClaw, an MIT-licensed self-hosted multi-model AI chat system that aggregates DeepSeek, NVIDIA, SiliconFlow, ZenMux, Zhipu, Kimi, MiMo and Mistral behind an OpenAI-compatible FastAPI gateway. SelfClaw adds automatic failover polling — two retries on temporary errors, a 24-hour blacklist for permanent failures and a 3-minute cooldown when all providers are down — plus a CCR closed-loop agent with tool calling, memory, reflection and strategy evolution, file parsing for PDF, Word and Excel, Bing and Baidu search, and edge-tts voice output. The repo also ships Self-IDE, a local Python service on default port 19898 offering an OpenAI-compatible proxy, goal engine, subagent orchestration and cost meter, with a thin VS Code extension as its shell.", "body_md": "多模型聚合、自动降级、CCR 闭环智能体的 AI 对话系统\n\n- **多模型聚合** — 支持 DeepSeek、NVIDIA、SiliconFlow、ZenMux、智谱、Kimi、MiMo、Mistral 等多家模型\n- **自动降级轮询** — 模型失败自动切换，临时错误两轮重试，永久故障 24h 黑名单，全网崩溃 3min 冷却\n- **CCR 闭环智能体** — 集成工具调用、记忆管理、反思修复、策略进化\n- **文件操作** — 读取/写入/列出目录，支持 PDF、Word、Excel 解析\n- **联网搜索** — 必应+百度双引擎搜索\n- **语音交互** — 支持 edge-tts 语音播报 + speech_recognition 语音输入\n- **模型管理** — 可视化增删改查、拖拽排序、属地判断\n- **多主题** — 深色 / 柔灰 / 浅色三种主题切换\n- **CCR HTTP 代理** — 兼容 Claude Code 请求格式，自动转发到 OpenClaw 网关\n- **Self-IDE** — 本地 AI Agent IDE 服务 + VS Code 扩展\n\n```\nMyAI_Model/\n├── DS/                    # Streamlit UI 模块\n│   ├── main.py            # 入口文件\n│   ├── config.py          # 配置管理\n│   ├── chat_engine.py     # 对话引擎（单次/降级轮询）\n│   ├── model_manager.py   # 模型增删改查、黑名单、日志\n│   ├── tools.py           # 文件操作、搜索、记忆、插件\n│   └── ui.py              # 完整 UI 渲染（CSS + 组件）\n├── CCR/                   # CCR 闭环智能体\n│   └── ccr.py             # Hermes 智能体 + HTTP 代理\n├── gateway.py             # FastAPI 网关（多模型路由）\n├── openclaw.json          # 模型池 & Provider 配置\n├── start.bat              # Windows 一键启动脚本\n├── requirements.txt       # Python 依赖\n└── README.md\npip install -r requirements.txt\n```\n\n创建 `keys.env` 文件，填入你的 API Key：\n\n```\nDEEPSEEK_API_KEY=sk-xxx\nSILICONFLOW_API_KEY=sk-xxx\nNVIDIA_API_KEY=nvapi-xxx\nZENMUX_API_KEY=sk-xxx\nZHIPU_API_KEY=xxx\nKIMI_API_KEY=sk-xxx\nMIMO_API_KEY=sk-xxx\nMISTRAL_API_KEY=sk-xxx\n```\n\n**Windows（推荐）：**\n\n```\nstart.bat\n```\n\n**手动启动：**\n\n```\n# 启动网关\npython gateway.py\n\n# 启动 WebUI\nstreamlit run DS/main.py --server.port 8502\n```\n\n打开浏览器访问 `http://127.0.0.1:8502`\n\n```\n{\n  \"id\": \"deepseek:v4-flash-paid\",\n  \"actual\": \"deepseek-v4-flash\",\n  \"provider\": \"deepseek\",\n  \"label\": \"DeepSeek V4 Flash\",\n  \"type\": \"auto\",\n  \"order\": 1\n}\n```\n\n- `id` — 模型唯一标识\n- `actual` — 实际模型名称（发给 Provider）\n- `provider` — Provider 名称（对应 providers 配置）\n- `type` —`auto` （自动降级池）或`manual` （手动选择）\n- `order` — 优先级排序\n\n```\n{\n  \"deepseek\": {\n    \"baseUrl\": \"https://api.deepseek.com/v1\",\n    \"apiKey\": \"${DEEPSEEK_API_KEY}\",\n    \"proxy\": \"\"\n  }\n}\n```\n\n- `apiKey` 支持环境变量引用`${VAR_NAME}`\n- `proxy` 为空则使用系统代理\n\n- **前端** : Streamlit + 自定义 CSS\n- **网关** : FastAPI + Uvicorn\n- **AI** : OpenAI SDK (兼容多家 Provider)\n- **语音** : edge-tts / pyttsx3 / SpeechRecognition\n- **搜索** : 必应 + 百度双引擎\n\nMIT\n\nThis repo also ships **Self-IDE** under [`self-ide/`](https://github.com/Alanzj/SelfClaw/blob/main/self-ide/README.md): a\nlocal Python service (OpenAI-compatible proxy + Goal engine + Subagent\norchestration + cost meter, default port 19898) with a thin VS Code extension\nas its shell. See [`self-ide/README.md`](https://github.com/Alanzj/SelfClaw/blob/main/self-ide/README.md) for the\narchitecture diagram, `HERMES_ROOT` / `GATEWAY_PORT` configuration and the\nquickstart.", "url": "https://wpnews.pro/news/show-hn-selfclaw-self-hosted-multi-model-ai-chat-with-openai-compatible-api", "canonical_source": "https://github.com/Alanzj/SelfClaw", "published_at": "2026-10-28 04:52:34+00:00", "updated_at": "2026-10-28 05:12:14.685628+00:00", "lang": "en", "topics": ["ai-tools", "large-language-models", "ai-agents", "ai-infrastructure", "developer-tools"], "entities": ["SelfClaw", "Self-IDE", "DeepSeek", "NVIDIA", "SiliconFlow", "ZenMux", "Zhipu", "Mistral"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/show-hn-selfclaw-self-hosted-multi-model-ai-chat-with-openai-compatible-api", "markdown": "https://wpnews.pro/news/show-hn-selfclaw-self-hosted-multi-model-ai-chat-with-openai-compatible-api.md", "text": "https://wpnews.pro/news/show-hn-selfclaw-self-hosted-multi-model-ai-chat-with-openai-compatible-api.txt", "jsonld": "https://wpnews.pro/news/show-hn-selfclaw-self-hosted-multi-model-ai-chat-with-openai-compatible-api.jsonld"}}