Skip to content

Commit 2f3b772

Browse files
committed
Route minimax through siliconflow of openrouter for now
1 parent 151145f commit 2f3b772

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

agents/base2/base2.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ export function createBase2(
3030
publisher,
3131
model: isFree ? 'minimax/minimax-m2.5' : 'anthropic/claude-opus-4.6',
3232
providerOptions: isFree ? {
33-
only: ['siliconflow/fp8'],
3433
data_collection: 'deny',
3534
} : {
3635
only: ['amazon-bedrock'],

web/src/app/api/v1/chat/completions/_post.ts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -367,10 +367,15 @@ export async function postChatCompletions(params: {
367367
try {
368368
if (bodyStream) {
369369
// Streaming request — route to SiliconFlow/CanopyWave/Fireworks for supported models
370-
// CanopyWave and Fireworks TEMPORARILY DISABLED: route through OpenRouter
371-
const useSiliconFlow = isSiliconFlowModel(typedBody.model)
370+
// SiliconFlow, CanopyWave, and Fireworks TEMPORARILY DISABLED: route through OpenRouter
371+
const useSiliconFlow = false // isSiliconFlowModel(typedBody.model)
372372
const useCanopyWave = false // isCanopyWaveModel(typedBody.model)
373373
const useFireworks = false // isFireworksModel(typedBody.model)
374+
375+
// Route minimax models through OpenRouter via SiliconFlow provider
376+
if (isSiliconFlowModel(typedBody.model)) {
377+
typedBody.provider = { ...typedBody.provider, only: ['siliconflow/fp8'] }
378+
}
374379
const stream = useSiliconFlow
375380
? await handleSiliconFlowStream({
376381
body: typedBody,
@@ -432,11 +437,16 @@ export async function postChatCompletions(params: {
432437
})
433438
} else {
434439
// Non-streaming request — route to SiliconFlow/CanopyWave/Fireworks for supported models
435-
// CanopyWave and Fireworks TEMPORARILY DISABLED: route through OpenRouter
440+
// SiliconFlow, CanopyWave, and Fireworks TEMPORARILY DISABLED: route through OpenRouter
436441
const model = typedBody.model
437-
const useSiliconFlow = isSiliconFlowModel(model)
442+
const useSiliconFlow = false // isSiliconFlowModel(model)
438443
const useCanopyWave = false // isCanopyWaveModel(model)
439444
const useFireworks = false // isFireworksModel(model)
445+
446+
// Route minimax models through OpenRouter via SiliconFlow provider
447+
if (isSiliconFlowModel(model)) {
448+
typedBody.provider = { ...typedBody.provider, only: ['siliconflow/fp8'] }
449+
}
440450
const modelParts = model.split('/')
441451
const shortModelName = modelParts.length > 1 ? modelParts[1] : model
442452
const isOpenAIDirectModel =

0 commit comments

Comments
 (0)