"use client"; /** * Copy for the two Ollama failure modes the user can actually do something * about: the free monthly usage being used up (upgrade / new key) and * short-term throttling (just retry). Every flow that calls the model uses * this so the message is identical everywhere. */ import { t } from "./i18n"; export const OLLAMA_SETTINGS_URL = "https://ollama.com/settings"; export type ModelErrorCopy = { title: string; body: string }; export function modelErrorCopy(kind: string | undefined): ModelErrorCopy | null { if (kind === "usage_limit") { return { title: t("error.usageTitle"), body: t("error.usageBody") }; } if (kind === "throttled") { return { title: t("error.throttledTitle"), body: t("error.throttledBody") }; } return null; }