From 3a2f3317b242c99d6058fd19064369d6d5e7d27b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Fri, 24 Jul 2026 16:45:43 +0000 Subject: [PATCH] chat: curate OpenCode models to Big Pickle + Claude Haiku The full `opencode models` catalog is ~58 entries; surface only opencode/big-pickle and opencode/claude-haiku-4-5 in the picker for now via an allow-list. Easy to extend. Co-Authored-By: Claude Opus 4.8 --- src/servers/api/chat/list-models.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/servers/api/chat/list-models.ts b/src/servers/api/chat/list-models.ts index c742d56d..1cb8172e 100644 --- a/src/servers/api/chat/list-models.ts +++ b/src/servers/api/chat/list-models.ts @@ -11,6 +11,9 @@ const CLAUDE_CODE_MODELS: ModelInfo[] = [ const OPENCODE_BIN = process.env.OPENCODE_BIN || join(homedir(), '.opencode', 'bin', 'opencode'); +// Curated OpenCode models to surface in the picker (the full `opencode models` catalog is ~58 entries). +const OPENCODE_ALLOWLIST = new Set(['opencode/big-pickle', 'opencode/claude-haiku-4-5']); + // Cache the OpenCode catalog; it's stable for a session and `opencode models` costs a subprocess. let openCodeCache: ModelInfo[] | null = null; @@ -33,7 +36,7 @@ async function listOpenCodeModels(): Promise { .replace(/\x1b\[[0-9;]*m/g, '') .split('\n') .map((line) => line.trim()) - .filter((line) => line.includes('/')) + .filter((line) => OPENCODE_ALLOWLIST.has(line)) .map((full) => { const slash = full.indexOf('/'); return {