diff --git a/src/app/api/openrouter/[...path]/route.ts b/src/app/api/openrouter/[...path]/route.ts index 6b3497bac0..75d693b1d9 100644 --- a/src/app/api/openrouter/[...path]/route.ts +++ b/src/app/api/openrouter/[...path]/route.ts @@ -346,7 +346,11 @@ export async function POST(request: NextRequest): Promise + supportedApiKinds: ReadonlyArray, + fraudHeaders: FraudDetectionHeaders ) { - const error = `This model does not support the ${apiKind} API, please use any of: ${supportedApiKinds.join()}`; + const error = isRooCodeBasedClient(fraudHeaders) + ? 'This model requires Kilo v7 or newer. Please upgrade Kilo and try again.' + : `This model does not support the ${apiKind} API, please use any of: ${supportedApiKinds.join()}`; return NextResponse.json({ error, message: error }, { status: 400 }); }