Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/api/src/routes/internal-models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ const modelProviderMappingSchema = z.object({
.array(z.enum(["none", "minimal", "low", "medium", "high", "xhigh", "max"]))
.nullable(),
reasoningOutput: z.string().nullable(),
reasoningMaxTokens: z.boolean().nullable(),
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
tools: z.boolean().nullable(),
jsonOutput: z.boolean().nullable(),
jsonOutputSchema: z.boolean().nullable(),
Expand Down
32 changes: 31 additions & 1 deletion apps/ui/src/app/models/[name]/[provider]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ import {
Eye,
Wrench,
MessageSquare,
ImagePlus,
Sliders,
Braces,
FileJson2,
Globe,
ListOrdered,
ImagePlus,
} from "lucide-react";
import Link from "next/link";
import { notFound, permanentRedirect } from "next/navigation";
Expand Down Expand Up @@ -334,6 +337,14 @@ export default async function ModelProviderPage({ params }: PageProps) {
color: "text-orange-500",
});
}
if (providerMapping.reasoningMaxTokens) {
items.push({
key: "reasoningMaxTokens",
icon: Sliders,
label: "Reasoning Budget",
color: "text-amber-500",
});
}
if (providerMapping.jsonOutput) {
items.push({
key: "jsonOutput",
Expand Down Expand Up @@ -361,6 +372,25 @@ export default async function ModelProviderPage({ params }: PageProps) {
color: "text-pink-500",
});
}
if (
Array.isArray(modelDef.output) &&
modelDef.output.includes("rerank")
) {
items.push({
key: "rerank",
icon: ListOrdered,
label: "Rerank",
color: "text-amber-500",
});
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
}
if (providerMapping.webSearch) {
items.push({
key: "webSearch",
icon: Globe,
label: "Web Search",
color: "text-sky-500",
});
}

return items.map(({ key, icon: Icon, label, color }) => (
<div
Expand Down
58 changes: 58 additions & 0 deletions apps/ui/src/app/models/[name]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@ import {
FileJson2,
Wrench,
MessageSquare,
Sliders,
ImagePlus,
Video,
Boxes,
Braces,
Volume2,
Mic,
ListOrdered,
Globe,
} from "lucide-react";
import Link from "next/link";
import { notFound } from "next/navigation";
Expand Down Expand Up @@ -503,12 +508,16 @@ export default async function ModelPage({ params }: PageProps) {
const hasVision = visibleProviders.some((p) => p.vision);
const hasTools = visibleProviders.some((p) => p.tools);
const hasReasoning = visibleProviders.some((p) => p.reasoning);
const hasReasoningMaxTokens = visibleProviders.some(
(p) => p.reasoningMaxTokens,
);
const hasJsonOutput = visibleProviders.some(
(p) => p.jsonOutput,
);
const hasJsonOutputSchema = visibleProviders.some(
(p) => p.jsonOutputSchema,
);
const hasWebSearch = visibleProviders.some((p) => p.webSearch);
const hasImageGen = Array.isArray(modelDef.output)
? modelDef.output.includes("image")
: false;
Expand All @@ -518,6 +527,15 @@ export default async function ModelPage({ params }: PageProps) {
const hasEmbedding = Array.isArray(modelDef.output)
? modelDef.output.includes("embedding")
: false;
const hasRerank = Array.isArray(modelDef.output)
? modelDef.output.includes("rerank")
: false;
const hasAudio = Array.isArray(modelDef.output)
? modelDef.output.includes("audio")
: false;
const hasTranscription = Array.isArray(modelDef.output)
? modelDef.output.includes("transcription")
: false;

if (hasStreaming) {
items.push({
Expand Down Expand Up @@ -551,6 +569,14 @@ export default async function ModelPage({ params }: PageProps) {
color: "text-orange-500",
});
}
if (hasReasoningMaxTokens) {
items.push({
key: "reasoningMaxTokens",
icon: Sliders,
label: "Reasoning Budget",
color: "text-amber-500",
});
}
if (hasJsonOutput) {
items.push({
key: "jsonOutput",
Expand Down Expand Up @@ -583,6 +609,22 @@ export default async function ModelPage({ params }: PageProps) {
color: "text-violet-500",
});
}
if (hasAudio) {
items.push({
key: "audio",
icon: Volume2,
label: "Speech Generation",
color: "text-rose-500",
});
}
if (hasTranscription) {
items.push({
key: "transcription",
icon: Mic,
label: "Transcription",
color: "text-sky-500",
});
}
if (hasEmbedding) {
items.push({
key: "embedding",
Expand All @@ -591,6 +633,22 @@ export default async function ModelPage({ params }: PageProps) {
color: "text-indigo-500",
});
}
if (hasRerank) {
items.push({
key: "rerank",
icon: ListOrdered,
label: "Rerank",
color: "text-amber-500",
});
}
if (hasWebSearch) {
items.push({
key: "webSearch",
icon: Globe,
label: "Web Search",
color: "text-sky-500",
});
}

return items.map(({ key, icon: Icon, label, color }) => (
<div
Expand Down
Loading
Loading