feat: add huggingface inferece provider endpoint

This commit is contained in:
Abhishek Kumar 2026-06-15 22:56:01 +05:30
parent ef266daa6e
commit dd3f2e7323
7 changed files with 315 additions and 2 deletions

View file

@ -5,6 +5,8 @@ import {
ChevronRight,
CircleDollarSign,
CreditCard,
ExternalLink,
Info,
RefreshCw,
} from "lucide-react";
import Link from "next/link";
@ -124,7 +126,8 @@ export default function BillingPage() {
);
const isBillingV2 = credits?.billing_version === "v2";
const canPurchaseCredits = isBillingV2 && config?.deploymentMode !== "oss";
const isOssMode = config?.deploymentMode === "oss";
const canPurchaseCredits = isBillingV2 && !isOssMode;
const totalQuota = credits?.total_quota ?? 0;
const remainingCredits = credits?.remaining_credits ?? 0;
const usedCredits = credits?.total_credits_used ?? 0;
@ -265,6 +268,36 @@ export default function BillingPage() {
</div>
</div>
{isOssMode && (
<div className="flex gap-3 rounded-lg border border-amber-200 bg-amber-50 p-4 dark:border-amber-900/50 dark:bg-amber-950/30">
<Info className="mt-0.5 h-4 w-4 flex-shrink-0 text-amber-600 dark:text-amber-400" />
<div className="text-sm text-amber-900 dark:text-amber-200">
<p className="font-medium">Credit purchases are unavailable in OSS mode</p>
<p className="mt-1">
You can&apos;t purchase credits from this self-hosted app. Sign up and
purchase credits at{" "}
<a
href="https://app.dograh.com"
target="_blank"
rel="noopener noreferrer"
className="inline-flex items-center gap-1 font-medium underline underline-offset-2"
>
app.dograh.com
<ExternalLink className="h-3 w-3" />
</a>
. Then add the generated service key in{" "}
<Link
href="/model-configurations"
className="font-medium underline underline-offset-2"
>
Model Configurations
</Link>
. Usage for that service key is visible in app.dograh.com.
</p>
</div>
</div>
)}
<div className="grid gap-4 md:grid-cols-2">
<Card>
<CardHeader className="pb-2">