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 <noreply@anthropic.com>
This commit is contained in:
@@ -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<ModelInfo[]> {
|
||||
.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 {
|
||||
|
||||
Reference in New Issue
Block a user