chat: surface all OpenCode models (drop the curated allow-list)
Removes the Big Pickle + Claude Haiku allow-list; the picker now lists every model the fixed server reports from GET /config/providers. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -8,9 +8,6 @@ const CLAUDE_CODE_MODELS: ModelInfo[] = [
|
|||||||
{ id: 'claude-code/haiku', name: 'haiku', provider: 'claude-code', contextWindow: 200000, maxTokens: 8192, reasoning: false, images: true },
|
{ id: 'claude-code/haiku', name: 'haiku', provider: 'claude-code', contextWindow: 200000, maxTokens: 8192, reasoning: false, images: true },
|
||||||
];
|
];
|
||||||
|
|
||||||
// Curated OpenCode models to surface in the picker (the full 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.
|
// Cache the OpenCode catalog; it's stable for a session.
|
||||||
let openCodeCache: ModelInfo[] | null = null;
|
let openCodeCache: ModelInfo[] | null = null;
|
||||||
|
|
||||||
@@ -36,10 +33,8 @@ async function listOpenCodeModels(): Promise<ModelInfo[]> {
|
|||||||
for (const provider of data.providers ?? []) {
|
for (const provider of data.providers ?? []) {
|
||||||
const providerId = provider.id ?? '';
|
const providerId = provider.id ?? '';
|
||||||
for (const modelId of Object.keys(provider.models ?? {})) {
|
for (const modelId of Object.keys(provider.models ?? {})) {
|
||||||
const full = `${providerId}/${modelId}`;
|
|
||||||
if (!OPENCODE_ALLOWLIST.has(full)) continue;
|
|
||||||
models.push({
|
models.push({
|
||||||
id: full,
|
id: `${providerId}/${modelId}`,
|
||||||
name: modelId,
|
name: modelId,
|
||||||
provider: providerId,
|
provider: providerId,
|
||||||
contextWindow: 200000,
|
contextWindow: 200000,
|
||||||
|
|||||||
Reference in New Issue
Block a user