feat: add OpenCode Zen and Go as provider options (#26)

- Add OpenCode Zen (https://opencode.ai/zen/v1) and Go (https://opencode.ai/zen/go/v1)
- Add provider detection via _host_match() in llm_core.py
- Add curated model list entries in model_routes.py
- Add webhook provider URLs
- Add provider icon (providers.js) and dropdown options (index.html)
- Add auto-detection patterns and setup URLs (slashCommands.js)
- Whitelist opencode.ai in URL validation (admin.js)
- Rebased on main to fix merge conflicts with _HOST_TO_CURATED refactor

Co-authored-by: M57 <hy4ri@users.noreply.github.com>
This commit is contained in:
M57
2026-06-07 17:43:00 +03:00
committed by GitHub
parent 43c16fc7e4
commit 12cb39cbd9
7 changed files with 20 additions and 2 deletions
+6
View File
@@ -414,6 +414,10 @@ def _detect_provider(url: str) -> str:
return "ollama"
if _host_match(url, "anthropic.com"):
return "anthropic"
if _host_match(url, "opencode.ai/zen/go"):
return "opencode-go"
if _host_match(url, "opencode.ai/zen"):
return "opencode-zen"
if _host_match(url, "openrouter.ai"):
return "openrouter"
if _host_match(url, "groq.com"):
@@ -451,6 +455,8 @@ def _provider_label(url: str) -> str:
if _host_match(url, "x.ai"): return "xAI"
if _host_match(url, "openai.com"): return "OpenAI"
if _host_match(url, "openrouter.ai"): return "OpenRouter"
if _host_match(url, "opencode.ai/zen/go"): return "OpenCode Go"
if _host_match(url, "opencode.ai/zen"): return "OpenCode Zen"
if _host_match(url, "groq.com"): return "Groq"
from src.copilot import is_copilot_base
if is_copilot_base(url): return "GitHub Copilot"