Skip to content

v0.6.38: models page#4118

Merged
waleedlatif1 merged 1 commit intomainfrom
staging
Apr 12, 2026
Merged

v0.6.38: models page#4118
waleedlatif1 merged 1 commit intomainfrom
staging

Conversation

@waleedlatif1
Copy link
Copy Markdown
Collaborator

@waleedlatif1 waleedlatif1 commented Apr 12, 2026

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>
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Apr 12, 2026 8:29am

Request Review

@waleedlatif1 waleedlatif1 changed the title fix(models): exclude reseller providers from model catalog pages (#4117) v0.6.38: models page Apr 12, 2026
@waleedlatif1 waleedlatif1 marked this pull request as ready for review April 12, 2026 08:30
@cursor
Copy link
Copy Markdown

cursor bot commented Apr 12, 2026

PR Summary

Low Risk
Low risk: this only changes which providers/models are included in the public models directory and related counts/structured data, with no auth or data-write paths affected.

Overview
Updates the models catalog to exclude reseller providers from the “providers with catalogs” set by filtering out entries with isReseller in MODEL_PROVIDERS_WITH_CATALOGS.

The landing ModelsPage now builds its flat model list from MODEL_PROVIDERS_WITH_CATALOGS (instead of all catalog providers), so featured providers/models and the JSON-LD item list reflect the non-reseller catalog only.

Reviewed by Cursor Bugbot for commit 6ef40c5. Configure here.

@waleedlatif1 waleedlatif1 merged commit 8b57476 into main Apr 12, 2026
24 checks passed
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 12, 2026

Greptile Summary

This PR filters reseller providers (Azure, Bedrock, Vertex, Fireworks, OpenRouter, Azure Anthropic) out of MODEL_PROVIDERS_WITH_CATALOGS so they no longer appear in the models catalog listing or affect ALL_CATALOG_MODELS / TOTAL_MODELS. The fix is correct for the catalog display and model counts, but TOTAL_MODEL_PROVIDERS was not updated and still reports the full MODEL_CATALOG_PROVIDERS.length, causing the "across Y providers" text in page metadata and the visible hero copy to include resellers that are no longer shown.

Confidence Score: 4/5

Safe to merge after fixing the TOTAL_MODEL_PROVIDERS count — the inflated provider number in metadata and hero copy is a real display defect.

One P1 finding remains: TOTAL_MODEL_PROVIDERS counts all providers including the 6 resellers that are now hidden from the catalog, producing incorrect copy like 'across N providers'. The P2 (reseller pages still accessible via direct URL) may be intentional but should be confirmed.

apps/sim/app/(landing)/models/utils.ts — specifically the TOTAL_MODEL_PROVIDERS export on line 563.

Important Files Changed

Filename Overview
apps/sim/app/(landing)/models/utils.ts Adds !provider.isReseller guard to MODEL_PROVIDERS_WITH_CATALOGS, correctly excluding reseller providers from the catalog listing and model counts — but TOTAL_MODEL_PROVIDERS is still derived from MODEL_CATALOG_PROVIDERS.length, so the displayed "Y providers" count is inflated by the 6 reseller providers that are now hidden.
apps/sim/app/(landing)/models/page.tsx No direct logic changes; this file simply consumes the corrected MODEL_PROVIDERS_WITH_CATALOGS export, so the provider cards and model lists correctly exclude resellers. The TOTAL_MODEL_PROVIDERS metadata issue is upstream in utils.ts.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[PROVIDER_DEFINITIONS] --> B[rawProviders\nall providers incl. resellers]
    B --> C[MODEL_CATALOG_PROVIDERS\nall providers]
    C --> D["MODEL_PROVIDERS_WITH_CATALOGS\nmodels.length > 0 && !isReseller ✅"]
    C --> E["MODEL_PROVIDERS_WITH_DYNAMIC_CATALOGS\nmodels.length === 0\n(may still include resellers)"]
    C --> F["TOTAL_MODEL_PROVIDERS = MODEL_CATALOG_PROVIDERS.length ❌\n(includes resellers)"]
    D --> G[ALL_CATALOG_MODELS ✅]
    G --> H[TOTAL_MODELS ✅]
    D --> I[TOP_MODEL_PROVIDERS ✅]
    D --> J[page.tsx catalog display ✅]
    F --> K["'across Y providers' copy ❌\n(Y is inflated by resellers)"]
Loading

Comments Outside Diff (2)

  1. apps/sim/app/(landing)/models/utils.ts, line 563 (link)

    P1 TOTAL_MODEL_PROVIDERS still counts reseller providers

    TOTAL_MODEL_PROVIDERS is derived from MODEL_CATALOG_PROVIDERS.length (all providers, including resellers), while MODEL_PROVIDERS_WITH_CATALOGS now excludes resellers. The page copy and metadata — e.g., "Browse X models across Y providers" — will report an inflated count because the Y includes reseller providers (Azure, Bedrock, Vertex, Fireworks, OpenRouter, Azure Anthropic) that are no longer shown in the catalog.

  2. apps/sim/app/(landing)/models/utils.ts, line 583-585 (link)

    P2 Reseller provider pages remain accessible via direct URL

    getProviderBySlug looks up from MODEL_CATALOG_PROVIDERS (all providers), so a URL like /models/azure-openai or /models/vertex still resolves a provider object. Since Next.js dynamicParams defaults to true, those routes render dynamically even though they are no longer in generateStaticParams. The notFound() guard in [provider]/page.tsx only checks provider.models.length === 0 — it does not check provider.isReseller — so the page renders without a 404.

    If the intent is to fully 404 reseller pages, filter the lookup or add an isReseller guard in the not-found check:

    if (!provider || provider.models.length === 0 || provider.isReseller) {
      notFound()
    }

    The same applies to [provider]/[model]/page.tsx.

Reviews (1): Last reviewed commit: "fix(models): exclude reseller providers ..." | Re-trigger Greptile

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 6ef40c5. Configure here.

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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TOTAL_MODEL_PROVIDERS still counts excluded reseller providers

Medium Severity

TOTAL_MODEL_PROVIDERS is still derived from MODEL_CATALOG_PROVIDERS.length, which includes reseller providers. Meanwhile, TOTAL_MODELS is derived from ALL_CATALOG_MODELS, which now excludes reseller models. These two counts are displayed together (e.g., "Browse X AI models across Y providers") in page metadata, body text, and the OG image, creating a misleading inconsistency — the provider count Y includes providers whose models aren't reflected in X and who don't appear in the directory.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 6ef40c5. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant