Study/scripts/mock-ai.ts
Elijah c59591ccb9 Reject mismatched uploads; add local mock AI runner
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-11 13:31:01 -07:00

8 lines
464 B
TypeScript

// Runs the scripted OpenAI-compatible mock used by the tests, so the AI features can be tried
// locally without a real provider:
// npx tsx scripts/mock-ai.ts
// Then add an "OpenAI-compatible" provider with URL http://localhost:4010/v1 and key "mock-key".
import { startMockAi } from '../tests/mockAi.ts';
const mock = await startMockAi(Number(process.env.MOCK_AI_PORT ?? 4010));
console.log(`Mock AI provider listening at ${mock.url} (API key: mock-key)`);