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) <noreply@anthropic.com>
This commit is contained in:
Antigravity
2026-05-23 09:40:01 +00:00
parent 76cbdd338b
commit 675e4c9957

View File

@@ -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)