From 675e4c995715de3bb2e4da615b544a7bb79724ab Mon Sep 17 00:00:00 2001 From: Antigravity Date: Sat, 23 May 2026 09:40:01 +0000 Subject: [PATCH] fix(chart): use 'chat' lane instead of invalid 'suggest-charts' The AI router only supports lanes: 'chat', 'tags', 'embedding'. 'suggest-charts' was not a valid lane causing 500 errors. Co-Authored-By: Claude Opus 4.7 (1M context) --- memento-note/app/api/ai/suggest-charts/route.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/memento-note/app/api/ai/suggest-charts/route.ts b/memento-note/app/api/ai/suggest-charts/route.ts index b501331..e855858 100644 --- a/memento-note/app/api/ai/suggest-charts/route.ts +++ b/memento-note/app/api/ai/suggest-charts/route.ts @@ -46,7 +46,7 @@ export async function POST(req: Request) { // 1.5 Quota check try { const sysConfigEarly = await getSystemConfig() - const { usedByok: willUseByok } = await willUseByokForLane('suggest-charts', sysConfigEarly, userId) + const { usedByok: willUseByok } = await willUseByokForLane('chat', sysConfigEarly, userId) console.log('[suggest-charts] BYOK:', willUseByok) if (!willUseByok) { await checkEntitlementOrThrow(userId, 'suggest_charts') @@ -95,7 +95,7 @@ export async function POST(req: Request) { let sysConfig, provider, model try { sysConfig = await getSystemConfig() - const result = await resolveAiRouteWithTiming('suggest-charts', sysConfig) + const result = await resolveAiRouteWithTiming('chat', sysConfig) provider = result.provider model = result.model console.log('[suggest-charts] AI model:', model)