@@ -17,7 +17,6 @@ import { createLogger } from '@sim/logger'
1717import { eq , sql } from 'drizzle-orm'
1818import { type NextRequest , NextResponse } from 'next/server'
1919import { getHighestPrioritySubscription } from '@/lib/billing/core/subscription'
20- import { getCopilotModel } from '@/lib/copilot/config'
2120import {
2221 ORCHESTRATION_TIMEOUT_MS ,
2322 SIM_AGENT_API_URL ,
@@ -36,6 +35,7 @@ import { resolveWorkflowIdForUser } from '@/lib/workflows/utils'
3635
3736const logger = createLogger ( 'CopilotMcpAPI' )
3837const mcpRateLimiter = new RateLimiter ( )
38+ const DEFAULT_COPILOT_MODEL = 'claude-opus-4-6'
3939
4040export const dynamic = 'force-dynamic'
4141export const runtime = 'nodejs'
@@ -624,7 +624,6 @@ async function handleBuildToolCall(
624624) : Promise < CallToolResult > {
625625 try {
626626 const requestText = ( args . request as string ) || JSON . stringify ( args )
627- const { model } = getCopilotModel ( )
628627 const workflowId = args . workflowId as string | undefined
629628
630629 const resolved = workflowId ? { workflowId } : await resolveWorkflowIdForUser ( userId )
@@ -654,7 +653,7 @@ async function handleBuildToolCall(
654653 message : requestText ,
655654 workflowId : resolved . workflowId ,
656655 userId,
657- model,
656+ model : DEFAULT_COPILOT_MODEL ,
658657 mode : 'agent' ,
659658 commands : [ 'fast' ] ,
660659 messageId : randomUUID ( ) ,
@@ -721,16 +720,14 @@ async function handleSubagentToolCall(
721720 context . plan = args . plan
722721 }
723722
724- const { model } = getCopilotModel ( )
725-
726723 const result = await orchestrateSubagentStream (
727724 toolDef . agentId ,
728725 {
729726 message : requestText ,
730727 workflowId : args . workflowId ,
731728 workspaceId : args . workspaceId ,
732729 context,
733- model,
730+ model : DEFAULT_COPILOT_MODEL ,
734731 headless : true ,
735732 source : 'mcp' ,
736733 } ,
0 commit comments