mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-24 15:45:35 +08:00
fix(models): exclude reseller providers from model catalog pages (#4117)
* fix(models): exclude reseller providers from model catalog pages Reseller providers like OpenRouter, Fireworks, Azure, Vertex, and Bedrock are aggregators that proxy other providers' models. Their model detail pages were generating broken links. Filter them out of MODEL_PROVIDERS_WITH_CATALOGS so they don't generate static pages or appear as clickable entries in the model directory. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(models): use filtered catalog for JSON-LD structured data Switch flatModels in page.tsx from MODEL_CATALOG_PROVIDERS to MODEL_PROVIDERS_WITH_CATALOGS so the Schema.org ItemList excludes reseller models, matching TOTAL_MODELS and avoiding broken URLs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
85f1d96859
commit
6ef40c5b21
@@ -11,7 +11,6 @@ import {
|
||||
import {
|
||||
ALL_CATALOG_MODELS,
|
||||
getPricingBounds,
|
||||
MODEL_CATALOG_PROVIDERS,
|
||||
MODEL_PROVIDERS_WITH_CATALOGS,
|
||||
TOP_MODEL_PROVIDERS,
|
||||
TOTAL_MODEL_PROVIDERS,
|
||||
@@ -90,7 +89,7 @@ export const metadata: Metadata = {
|
||||
}
|
||||
|
||||
export default function ModelsPage() {
|
||||
const flatModels = MODEL_CATALOG_PROVIDERS.flatMap((provider) =>
|
||||
const flatModels = MODEL_PROVIDERS_WITH_CATALOGS.flatMap((provider) =>
|
||||
provider.models.map((model) => ({ provider, model }))
|
||||
)
|
||||
const featuredProviderOrder = ['anthropic', 'openai', 'google']
|
||||
|
||||
@@ -552,7 +552,7 @@ assertUniqueGeneratedRoutes(rawProviders)
|
||||
|
||||
export const MODEL_CATALOG_PROVIDERS: CatalogProvider[] = rawProviders
|
||||
export const MODEL_PROVIDERS_WITH_CATALOGS = MODEL_CATALOG_PROVIDERS.filter(
|
||||
(provider) => provider.models.length > 0
|
||||
(provider) => provider.models.length > 0 && !provider.isReseller
|
||||
)
|
||||
export const MODEL_PROVIDERS_WITH_DYNAMIC_CATALOGS = MODEL_CATALOG_PROVIDERS.filter(
|
||||
(provider) => provider.models.length === 0
|
||||
|
||||
Reference in New Issue
Block a user