mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-01-03 06:42:27 +08:00
- Add AI provider settings to config panel (provider, model, API key, base URL) - Support 7 providers: OpenAI, Anthropic, Google, Azure, OpenRouter, DeepSeek, SiliconFlow - Client API keys stored in localStorage, never stored on server - Client settings override server env vars when provided - Skip server credential validation when client provides API key - Bypass usage limits (request/token/TPM) when using own API key - Add /api/config endpoint for fetching usage limits - Add privacy notices to settings dialog, about pages, and quota toast - Add clear settings button to reset saved API keys - Update README files (EN/CN/JA) with BYOK documentation Co-authored-by: dayuan.jiang <jiangdy@amazon.co.jp>
11 lines
370 B
TypeScript
11 lines
370 B
TypeScript
import { NextResponse } from "next/server"
|
|
|
|
export async function GET() {
|
|
return NextResponse.json({
|
|
accessCodeRequired: !!process.env.ACCESS_CODE_LIST,
|
|
dailyRequestLimit: Number(process.env.DAILY_REQUEST_LIMIT) || 0,
|
|
dailyTokenLimit: Number(process.env.DAILY_TOKEN_LIMIT) || 0,
|
|
tpmLimit: Number(process.env.TPM_LIMIT) || 0,
|
|
})
|
|
}
|