2025-12-06 12:46:40 +09:00
|
|
|
import { NextResponse } from "next/server"
|
2025-12-05 21:09:34 +08:00
|
|
|
|
|
|
|
|
export async function GET() {
|
2025-12-06 12:46:40 +09:00
|
|
|
const accessCodes =
|
|
|
|
|
process.env.ACCESS_CODE_LIST?.split(",")
|
|
|
|
|
.map((code) => code.trim())
|
|
|
|
|
.filter(Boolean) || []
|
2025-12-05 21:09:34 +08:00
|
|
|
|
2025-12-06 12:46:40 +09:00
|
|
|
return NextResponse.json({
|
|
|
|
|
accessCodeRequired: accessCodes.length > 0,
|
2025-12-08 14:26:01 +09:00
|
|
|
dailyRequestLimit: parseInt(process.env.DAILY_REQUEST_LIMIT || "0", 10),
|
2025-12-08 18:56:34 +09:00
|
|
|
dailyTokenLimit: parseInt(process.env.DAILY_TOKEN_LIMIT || "0", 10),
|
|
|
|
|
tpmLimit: parseInt(process.env.TPM_LIMIT || "0", 10),
|
2025-12-06 12:46:40 +09:00
|
|
|
})
|
2025-12-05 21:09:34 +08:00
|
|
|
}
|