import { JevIntentRouter, JEV_MODEL } from '../src/lib/server/assistant/intent'; if (process.env.LIVE_API_SMOKE !== '1') throw new Error('Set LIVE_API_SMOKE=1 to authorize one real TypeSafe inference request.'); if (!process.env.TYPESAFE_API_KEY) throw new Error('TYPESAFE_API_KEY is missing.'); const started = performance.now(); const result = await new JevIntentRouter({ apiKey: process.env.TYPESAFE_API_KEY }).classify( 'What is the total estimated reference value of all my assets across all connected characters?', ); if (result.status !== 'routed' || result.intent !== 'asset_valuation') { // The router already redacts provider failures. Do not print raw SDK errors. console.error('Live JEV routing smoke did not return the expected valuation intent.', { status: result.status }); process.exitCode = 1; } else { console.log(JSON.stringify({ passed: true, requestedModel: JEV_MODEL, reportedModel: result.model, intent: result.intent, confidence: result.confidence, elapsedMs: Math.round(performance.now() - started) })); }