Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

1.2 KB
Raw Blame
import {
  Card,
  CardContent,
  CardHeader,
  CardTitle,
} from "@/src/components/ui/card";
import { Badge } from "@/src/components/design-system/Badge/Badge";

export type MatchedModelCardProps = {
  model: {
    modelName: string;
    matchPattern: string;
    projectId: string | null;
  };
};

export function MatchedModelCard({ model }: MatchedModelCardProps) {
  const isLangfuseModel = !model.projectId;

  return (
    <Card>
      <CardHeader className="pb-3">
        <CardTitle className="text-muted-foreground text-xs font-bold tracking-wide uppercase">
          Matched Model
        </CardTitle>
      </CardHeader>
      <CardContent className="space-y-3">
        <div className="flex items-center gap-2">
          <span className="font-mono text-base font-bold">
            {model.modelName}
          </span>
          {isLangfuseModel && <Badge color="filled" text="Langfuse" />}
        </div>
        <div className="space-y-1">
          <div className="text-muted-foreground text-xs font-bold">
            Pattern:
          </div>
          <code className="bg-muted/50 block rounded p-2 text-xs break-all">
            {model.matchPattern}
          </code>
        </div>
      </CardContent>
    </Card>
  );
}