Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
fix(landing): pre-render reseller model pages so they keep resolving
  • Loading branch information
waleedlatif1 committed Oct 2, 2026
commit cb3c2988a42240d1be1cff1672959955aed6aea9
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { LANDING_CONTENT_WIDTH, LANDING_GUTTER } from '@/app/(landing)/component
import { ShareButton } from '@/app/(landing)/components/share-button'
import { FeaturedModelCard, ProviderIcon } from '@/app/(landing)/models/components/model-primitives'
import {
ALL_CATALOG_MODELS,
buildModelCapabilityFacts,
buildModelFaqs,
formatPrice,
Expand All @@ -21,6 +20,7 @@ import {
getPricingBounds,
getProviderBySlug,
getRelatedModels,
MODEL_PROVIDERS_WITH_MODELS,
} from '@/app/(landing)/models/utils'

const baseUrl = SITE_URL
Expand All @@ -32,10 +32,9 @@ const baseUrl = SITE_URL
export const dynamicParams = false

export async function generateStaticParams() {
return ALL_CATALOG_MODELS.map((model) => ({
provider: model.providerSlug,
model: model.slug,
}))
return MODEL_PROVIDERS_WITH_MODELS.flatMap((provider) =>
provider.models.map((model) => ({ provider: provider.slug, model: model.slug }))
)
}

export async function generateMetadata({
Expand Down
3 changes: 2 additions & 1 deletion apps/sim/app/(landing)/models/(shell)/[provider]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
formatTokenCount,
getProviderBySlug,
MODEL_PROVIDERS_WITH_CATALOGS,
MODEL_PROVIDERS_WITH_MODELS,
TOP_MODEL_PROVIDERS,
} from '@/app/(landing)/models/utils'

Expand All @@ -31,7 +32,7 @@ const baseUrl = SITE_URL
export const dynamicParams = false
Comment thread
waleedlatif1 marked this conversation as resolved.

export async function generateStaticParams() {
return MODEL_PROVIDERS_WITH_CATALOGS.map((provider) => ({
return MODEL_PROVIDERS_WITH_MODELS.map((provider) => ({
provider: provider.slug,
}))
}
Expand Down
4 changes: 4 additions & 0 deletions apps/sim/app/(landing)/models/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,10 @@ function assertUniqueGeneratedRoutes(providers: CatalogProvider[]): void {
assertUniqueGeneratedRoutes(rawProviders)

export const MODEL_CATALOG_PROVIDERS: CatalogProvider[] = rawProviders
/** Every provider with a page: those with a model catalog, resellers included. */
export const MODEL_PROVIDERS_WITH_MODELS = MODEL_CATALOG_PROVIDERS.filter(
(provider) => provider.models.length > 0
)
export const MODEL_PROVIDERS_WITH_CATALOGS = MODEL_CATALOG_PROVIDERS.filter(
(provider) => provider.models.length > 0 && !provider.isReseller
)
Expand Down
Loading