Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/agents/plugins/opencode/opencode-dynamic-models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const RESPONSES_API_MODEL_PATTERNS: RegExp[] = [
/^gpt-5\.5-/, // gpt-5.5-2026-04-24 — same Azure restriction as gpt-5.4
/^gpt-5-5-/, // hyphenated variant of gpt-5.5-*
/gpt-5[.-]6/, // gpt-5.6-* (e.g. openai.gpt-5.6-luna) — same Azure restriction (tools + reasoning_effort)
/gpt-6/, // gpt-6.1, gpt-6-sol and other GPT-6 variants
];

function isResponsesApiModel(id: string): boolean {
Expand All @@ -57,6 +58,7 @@ function detectFamily(id: string): string {
if (id.startsWith('claude')) return 'claude-4';
if (id.startsWith('gemini')) return 'gemini-2';
if (id.startsWith('gpt-4')) return 'gpt-4';
if (/gpt-6/.test(id)) return 'gpt-6';
if (id.startsWith('gpt-5') || /gpt-5[.-]6/.test(id)) return 'gpt-5';
if (/^o[134]-/.test(id) || id === 'o1') return 'openai-reasoning';
if (id.startsWith('qwen')) return 'qwen3';
Expand All @@ -78,6 +80,7 @@ function detectLimits(id: string, family: string): { context: number; output: nu
if (id.startsWith('gpt-5.5') || id.startsWith('gpt-5-5')) return { context: 1050000, output: 128000 }; // Azure-published window for gpt-5.5
if (/gpt-5[.-]6/.test(id)) return { context: 1050000, output: 128000 }; // Azure-published window for gpt-5.6
if (id.startsWith('gpt-5')) return { context: 400000, output: 128000 };
if (/gpt-6/.test(id)) return { context: 1050000, output: 128000 }; // Azure & Bedrock window for GPT-6
if (/^o[134]-/.test(id) || id === 'o1') return { context: 200000, output: 100000 };
if (id.startsWith('qwen') || id.startsWith('moonshotai') || id.startsWith('kimi')) return { context: 262144, output: 131072 };
if (id.startsWith('deepseek')) return { context: 65536, output: 65536 };
Expand Down
3 changes: 3 additions & 0 deletions src/agents/plugins/pi/pi.models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const RESPONSES_API_PATTERNS: RegExp[] = [
/^gpt-5\.5-/,
/^gpt-5-5-/,
/gpt-5[.-]6/,
/gpt-6/, // gpt-6.1, gpt-6-sol and other GPT-6 variants
];

export function classifyPiModel(modelId: string): PiModelClassification {
Expand Down Expand Up @@ -67,6 +68,7 @@ function detectLimits(id: string): { contextWindow: number; maxTokens: number }
if (id.startsWith('claude')) return { contextWindow: 200000, maxTokens: 64000 };
if (id.startsWith('gemini')) return { contextWindow: 1048576, maxTokens: 65536 };
if (id.startsWith('gpt-4.1')) return { contextWindow: 1048576, maxTokens: 32768 };
if (/gpt-6/.test(id)) return { contextWindow: 1050000, maxTokens: 128000 };
if (/^gpt-5\.5-/.test(id) || /^gpt-5-5-/.test(id)) return { contextWindow: 1050000, maxTokens: 128000 };
if (/gpt-5[.-]6/.test(id)) return { contextWindow: 1050000, maxTokens: 128000 };
if (id.startsWith('gpt-5')) return { contextWindow: 400000, maxTokens: 128000 };
Expand Down Expand Up @@ -95,6 +97,7 @@ function isReasoningModel(id: string): boolean {
id.startsWith('claude') ||
id.startsWith('gemini') ||
id.startsWith('gpt-5') ||
/gpt-6/.test(id) ||
/gpt-5[.-]6/.test(id) ||
/^o[134]-/.test(id) ||
id === 'o1' ||
Expand Down
Loading