Files
scan-receipts/scripts/search_models.mjs
Timo 84b9987c49 Add full application: receipt scanning, auth, billing, and account deletion
Brings the working codebase (Next.js app, auth system, Stripe billing,
Docker/deploy config, tests, docs) into version control on top of the
placeholder initial commit, and adds account self-deletion (Danger Zone
in Settings, password + typed-email confirmation, cascading DB cleanup,
Stripe cancellation) per GDPR right-to-erasure.

Excludes local build caches, node_modules, and internal agent scratch
files; .gitignore hardened to keep those out going forward.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-19 20:59:04 +02:00

25 lines
948 B
JavaScript

import fs from "fs";
const envContent = fs.readFileSync(".env.local", "utf-8");
const apiKeyMatch = envContent.match(/OPENROUTER_API_KEY=([^\r\n]+)/);
const apiKey = apiKeyMatch ? apiKeyMatch[1].trim() : "";
async function searchModels() {
const res = await fetch("https://openrouter.ai/api/v1/models", {
headers: {
"Authorization": `Bearer ${apiKey}`,
}
});
const data = await res.json();
const models = data.data || [];
const lunaModels = models.filter(m => m.id.toLowerCase().includes("luna") || m.id.toLowerCase().includes("gpt-5"));
console.log("Found matches for 'luna' or 'gpt-5':", lunaModels.map(m => ({ id: m.id, name: m.name, pricing: m.pricing })));
const visionModels = models.filter(m => m.architecture && m.architecture.modality && m.architecture.modality.includes("image->text"));
console.log(`Total vision models on OpenRouter: ${visionModels.length}`);
}
searchModels().catch(console.error);