Files
lemonspace_app/lib/ai-models.ts
Matthias cf3a338b9f feat: add new subscription tier and update credit configurations
- Introduced a new "max" subscription tier with associated monthly credits and top-up limits.
- Updated existing subscription tiers' monthly credits and top-up limits for "starter", "pro", and "business".
- Enhanced credit display and overview components to reflect the new tier and its attributes.
- Integrated Polar authentication features for improved subscription management and credit handling.
2026-03-27 09:47:44 +01:00

49 lines
1.4 KiB
TypeScript

// Client-side model definitions for the UI.
// Mirrors the backend config in convex/openrouter.ts — keep in sync.
export interface AiModel {
id: string;
name: string;
tier: "budget" | "standard" | "premium";
description: string;
estimatedCost: string; // human-readable, e.g. "~€0.04"
/** Credits pro Generierung — gleiche Einheit wie Convex reserve/commit (Euro-Cent). */
creditCost: number;
minTier: "free" | "starter" | "pro" | "max" | "business"; // minimum subscription tier
}
export const IMAGE_MODELS: AiModel[] = [
{
id: "google/gemini-2.5-flash-image",
name: "Gemini 2.5 Flash",
tier: "standard",
description: "Fast, high-quality generation",
estimatedCost: "~€0.04",
creditCost: 4,
minTier: "free",
},
// Phase 2 — uncomment when model selector UI is ready:
// {
// id: "black-forest-labs/flux.2-klein-4b",
// name: "FLUX.2 Klein",
// tier: "budget",
// description: "Photorealism, fastest Flux",
// estimatedCost: "~€0.02",
// minTier: "free",
// },
// {
// id: "openai/gpt-5-image",
// name: "GPT-5 Image",
// tier: "premium",
// description: "Best instruction following, text in image",
// estimatedCost: "~€0.15",
// minTier: "starter",
// },
];
export const DEFAULT_MODEL_ID = "google/gemini-2.5-flash-image";
export function getModel(id: string): AiModel | undefined {
return IMAGE_MODELS.find((m) => m.id === id);
}