Skip to content
Merged
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
4 changes: 2 additions & 2 deletions apps/sim/app/api/copilot/chat/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const ChatMessageSchema = z.object({
chatId: z.string().optional(),
workflowId: z.string().optional(),
workflowName: z.string().optional(),
model: z.string().optional().default('claude-opus-4-6'),
model: z.string().optional().default('claude-opus-4-5'),
mode: z.enum(COPILOT_REQUEST_MODES).optional().default('agent'),
prefetch: z.boolean().optional(),
createNewChat: z.boolean().optional().default(false),
Expand Down Expand Up @@ -238,7 +238,7 @@ export async function POST(req: NextRequest) {
let currentChat: any = null
let conversationHistory: any[] = []
let actualChatId = chatId
const selectedModel = model || 'claude-opus-4-6'
const selectedModel = model || 'claude-opus-4-5'

if (chatId || createNewChat) {
const chatResult = await resolveOrCreateChat({
Expand Down
2 changes: 1 addition & 1 deletion apps/sim/app/api/mcp/copilot/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import {

const logger = createLogger('CopilotMcpAPI')
const mcpRateLimiter = new RateLimiter()
const DEFAULT_COPILOT_MODEL = 'claude-opus-4-6'
const DEFAULT_COPILOT_MODEL = 'claude-opus-4-5'

export const dynamic = 'force-dynamic'
export const runtime = 'nodejs'
Expand Down
2 changes: 1 addition & 1 deletion apps/sim/app/api/v1/copilot/chat/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { resolveWorkflowIdForUser } from '@/lib/workflows/utils'
import { authenticateV1Request } from '@/app/api/v1/auth'

const logger = createLogger('CopilotHeadlessAPI')
const DEFAULT_COPILOT_MODEL = 'claude-opus-4-6'
const DEFAULT_COPILOT_MODEL = 'claude-opus-4-5'

const RequestSchema = z.object({
message: z.string().min(1, 'message is required'),
Expand Down
14 changes: 7 additions & 7 deletions apps/sim/stores/panel/copilot/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,7 @@ const cachedAutoAllowedTools = readAutoAllowedToolsFromStorage()
// Initial state (subset required for UI/streaming)
const initialState = {
mode: 'build' as const,
selectedModel: 'anthropic/claude-opus-4-6' as CopilotStore['selectedModel'],
selectedModel: 'anthropic/claude-opus-4-5' as CopilotStore['selectedModel'],
agentPrefetch: false,
availableModels: [] as AvailableModel[],
isLoadingModels: false,
Expand Down Expand Up @@ -2381,17 +2381,17 @@ export const useCopilotStore = create<CopilotStore>()(
(model) => model.id === normalizedSelectedModel
)

// Pick the best default: prefer claude-opus-4-6 with provider priority:
// Pick the best default: prefer claude-opus-4-5 with provider priority:
// direct anthropic > bedrock > azure-anthropic > any other.
let nextSelectedModel = normalizedSelectedModel
if (!selectedModelExists && normalizedModels.length > 0) {
let opus46: AvailableModel | undefined
let opus45: AvailableModel | undefined
for (const prov of MODEL_PROVIDER_PRIORITY) {
opus46 = normalizedModels.find((m) => m.id === `${prov}/claude-opus-4-6`)
if (opus46) break
opus45 = normalizedModels.find((m) => m.id === `${prov}/claude-opus-4-5`)
if (opus45) break
}
if (!opus46) opus46 = normalizedModels.find((m) => m.id.endsWith('/claude-opus-4-6'))
nextSelectedModel = opus46 ? opus46.id : normalizedModels[0].id
if (!opus45) opus45 = normalizedModels.find((m) => m.id.endsWith('/claude-opus-4-5'))
nextSelectedModel = opus45 ? opus45.id : normalizedModels[0].id
}

set({
Expand Down