mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-16 21:05:20 +02:00
refactor(anonymous-models): remove description field from anonymous model responses and update related UI components
This commit is contained in:
parent
576c56628a
commit
76843f42f1
5 changed files with 1 additions and 17 deletions
|
|
@ -20,7 +20,7 @@
|
|||
# Static config shape:
|
||||
# - Connection fields: provider, api_key, api_base, api_version
|
||||
# - Model fields: model_name, billing_tier, rpm/tpm, capabilities, litellm_params
|
||||
# - Public no-login metadata: description, seo_title, seo_description
|
||||
# - Public no-login SEO metadata: seo_title, seo_description
|
||||
# - Prompt defaults: system_instructions, use_default_system_instructions,
|
||||
# citations_enabled
|
||||
#
|
||||
|
|
@ -138,7 +138,6 @@ global_llm_configs:
|
|||
# anonymous_enabled/seo_enabled are true but do not debit premium credits.
|
||||
- id: -3
|
||||
name: "Azure GPT 5.4 Mini"
|
||||
description: "Free hosted Azure GPT 5.4 Mini deployment"
|
||||
billing_tier: "free"
|
||||
anonymous_enabled: true
|
||||
seo_enabled: true
|
||||
|
|
@ -305,9 +304,6 @@ global_image_generation_configs:
|
|||
# Catalog and access fields:
|
||||
# - billing_tier: "free" or "premium".
|
||||
# - anonymous_enabled: Whether the model appears in the public no-login catalog.
|
||||
# - description: Optional no-login UI copy for anonymous-enabled chat models.
|
||||
# This is not materialized into GLOBAL model metadata and is ignored by image
|
||||
# generation configs.
|
||||
# - seo_enabled: Whether a /free/<seo_slug> landing page is generated.
|
||||
# - seo_slug: Stable URL slug for SEO pages. Keep unique and do not change once
|
||||
# public.
|
||||
|
|
|
|||
|
|
@ -99,7 +99,6 @@ class AnonQuotaResponse(BaseModel):
|
|||
class AnonModelResponse(BaseModel):
|
||||
id: int
|
||||
name: str
|
||||
description: str | None = None
|
||||
provider: str
|
||||
model_name: str
|
||||
billing_tier: str = "free"
|
||||
|
|
@ -132,7 +131,6 @@ async def list_anonymous_models():
|
|||
AnonModelResponse(
|
||||
id=cfg.get("id", 0),
|
||||
name=cfg.get("name", ""),
|
||||
description=cfg.get("description"),
|
||||
provider=cfg.get("provider") or cfg.get("litellm_provider", ""),
|
||||
model_name=cfg.get("model_name", ""),
|
||||
billing_tier=cfg.get("billing_tier", "free"),
|
||||
|
|
@ -161,7 +159,6 @@ async def get_anonymous_model(slug: str):
|
|||
return AnonModelResponse(
|
||||
id=cfg.get("id", 0),
|
||||
name=cfg.get("name", ""),
|
||||
description=cfg.get("description"),
|
||||
provider=cfg.get("provider") or cfg.get("litellm_provider", ""),
|
||||
model_name=cfg.get("model_name", ""),
|
||||
billing_tier=cfg.get("billing_tier", "free"),
|
||||
|
|
|
|||
|
|
@ -246,11 +246,6 @@ export default async function FreeHubPage() {
|
|||
className="group flex flex-col gap-0.5"
|
||||
>
|
||||
<span className="font-medium group-hover:underline">{model.name}</span>
|
||||
{model.description && (
|
||||
<span className="text-xs text-muted-foreground line-clamp-1">
|
||||
{model.description}
|
||||
</span>
|
||||
)}
|
||||
</Link>
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
|
|
|
|||
|
|
@ -188,9 +188,6 @@ export function AnonymousChat({ model }: AnonymousChatProps) {
|
|||
</div>
|
||||
</div>
|
||||
<h2 className="text-xl font-semibold mb-2">{model.name}</h2>
|
||||
{model.description && (
|
||||
<p className="text-sm text-muted-foreground max-w-md">{model.description}</p>
|
||||
)}
|
||||
<p className="text-xs text-muted-foreground mt-4">
|
||||
Free to use · No login required · Start typing below
|
||||
</p>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import { z } from "zod";
|
|||
export const anonModel = z.object({
|
||||
id: z.number(),
|
||||
name: z.string(),
|
||||
description: z.string().nullable().optional(),
|
||||
provider: z.string(),
|
||||
model_name: z.string(),
|
||||
billing_tier: z.string().default("free"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue