Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 1.4k
Feat(webapp): Models page UI improvements#3308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
1f90cfa6ac930b18efbebe91e37d088551e4c21f84d14c1b7597f965375d9b846b7dd94a9086a87e49b2cde843848519f9e9c6275f0b4276cbd106936994c2File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -64,14 +64,12 @@ export type ModelCatalogItem = { | ||
| description: string | null; | ||
| contextWindow: number | null; | ||
| maxOutputTokens: number | null; | ||
| capabilities: string[]; | ||
| /** Combined capabilities (from DB) and boolean feature flags (from catalog) as slug strings. */ | ||
| features: string[]; | ||
| inputPrice: number | null; | ||
| outputPrice: number | null; | ||
| /** When the model was publicly released (from startDate on LlmModel). */ | ||
| releaseDate: string | null; | ||
| supportsStructuredOutput: boolean; | ||
| supportsParallelToolCalls: boolean; | ||
| supportsStreamingToolCalls: boolean; | ||
| /** Dated variants of this model (only populated on base models). */ | ||
| variants: ModelVariant[]; | ||
| }; | ||
| @@ -98,6 +96,17 @@ export type ModelDetail = ModelCatalogItem & { | ||
| }>; | ||
| }; | ||
| function buildFeatures( | ||
| capabilities: string[], | ||
| catalogEntry: { supportsStructuredOutput: boolean; supportsParallelToolCalls: boolean; supportsStreamingToolCalls: boolean } | undefined | ||
| ): string[] { | ||
| const features = new Set(capabilities); | ||
| if (catalogEntry?.supportsStructuredOutput) features.add("structured_output"); | ||
| if (catalogEntry?.supportsParallelToolCalls) features.add("parallel_tool_calls"); | ||
| if (catalogEntry?.supportsStreamingToolCalls) features.add("streaming_tool_calls"); | ||
| return Array.from(features); | ||
| } | ||
samejr marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| export type ModelMetricsPoint = { | ||
| minute: string; | ||
| callCount: number; | ||
| @@ -214,13 +223,10 @@ export class ModelRegistryPresenter extends BasePresenter { | ||
| description: m.description, | ||
| contextWindow: m.contextWindow, | ||
| maxOutputTokens: m.maxOutputTokens, | ||
| capabilities: m.capabilities, | ||
| features: buildFeatures(m.capabilities, catalogEntry), | ||
| inputPrice: inputPrice ? Number(inputPrice.price) : null, | ||
| outputPrice: outputPrice ? Number(outputPrice.price) : null, | ||
| releaseDate: m.startDate ? m.startDate.toISOString().split("T")[0] : null, | ||
| supportsStructuredOutput: catalogEntry?.supportsStructuredOutput ?? false, | ||
| supportsParallelToolCalls: catalogEntry?.supportsParallelToolCalls ?? false, | ||
| supportsStreamingToolCalls: catalogEntry?.supportsStreamingToolCalls ?? false, | ||
| variants: [], | ||
| _baseModelName: m.baseModelName, | ||
| }; | ||
| @@ -304,7 +310,7 @@ export class ModelRegistryPresenter extends BasePresenter { | ||
| /** Get a single model with full pricing details. */ | ||
| async getModelDetail(friendlyId: string): Promise<ModelDetail | null> { | ||
| const model = await this._replica.llmModel.findUnique({ | ||
| const model = await this._replica.llmModel.findFirst({ | ||
| where: { friendlyId }, | ||
| include: { | ||
| pricingTiers: { | ||
| @@ -331,13 +337,10 @@ export class ModelRegistryPresenter extends BasePresenter { | ||
| description: model.description, | ||
| contextWindow: model.contextWindow, | ||
| maxOutputTokens: model.maxOutputTokens, | ||
| capabilities: model.capabilities, | ||
| features: buildFeatures(model.capabilities, catalogEntry), | ||
| inputPrice: inputPrice ? Number(inputPrice.price) : null, | ||
| outputPrice: outputPrice ? Number(outputPrice.price) : null, | ||
| releaseDate: model.startDate ? model.startDate.toISOString().split("T")[0] : null, | ||
| supportsStructuredOutput: catalogEntry?.supportsStructuredOutput ?? false, | ||
| supportsParallelToolCalls: catalogEntry?.supportsParallelToolCalls ?? false, | ||
| supportsStreamingToolCalls: catalogEntry?.supportsStreamingToolCalls ?? false, | ||
| variants: [], | ||
| matchPattern: model.matchPattern, | ||
| source: model.source, | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.