import { generateText } from 'ai';
import { createOpenAI } from '@ai-sdk/openai';

const openrouter = createOpenAI({
  baseURL: 'https://openrouter.ai/api/v1',
  apiKey: process.env.OPENROUTER_API_KEY,
});

async function run() {
  const { text } = await generateText({
    model: openrouter('mistralai/mistral-large-2407'),
    prompt: 'Hello world! Reply in one word.',
  });
  console.log('Result:', text);
}
run();
