Skip to content

fix(landing): fix 404ing OG images for every model and integration page#5636

Merged
waleedlatif1 merged 1 commit into
stagingfrom
models-integrations-og-image-fix
Jul 13, 2026
Merged

fix(landing): fix 404ing OG images for every model and integration page#5636
waleedlatif1 merged 1 commit into
stagingfrom
models-integrations-og-image-fix

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Fixed every /models/{provider}/{model}/opengraph-image and /integrations/{slug}/opengraph-image route 404ing (~230 pages total, flagged by an SEO crawl of ~110 model pages plus every integration)
  • Root cause: page.tsx sets dynamicParams = false for these routes, but Next doesn't share generateStaticParams between a page and its sibling metadata routes (opengraph-image.tsx) - since none of the three OG image files had their own generateStaticParams, every param was "unknown" and 404d
  • Added a matching generateStaticParams to all three affected opengraph-image.tsx files

Type of Change

  • Bug fix

Testing

Verified on a real production build - the exact URLs in the SEO report (bare /opengraph-image, no suffix) aren't actually how Next serves these; the real URL has a build-generated hash suffix embedded in each page's <meta property="og:image"> tag. Confirmed via curl that the actual embedded URL for both a model page and an integration page went from 404 to 200 after the fix.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Google Search Console flagged every /models/{provider}/{model}/opengraph-image
and /integrations/{slug}/opengraph-image URL as 404 (~230 pages total: 5
sample model pages plus ~130 more models, plus every integration).

Root cause: the sibling page.tsx for each of these routes sets
`dynamicParams = false`, a segment-level restriction that also blocks
the metadata route (opengraph-image.tsx) from rendering any param
combination it wasn't statically told about - but Next does not share
generateStaticParams between a page and its sibling metadata routes.
Since none of the three opengraph-image.tsx files exported their own
generateStaticParams, every param was "unknown" to that restriction and
404d, for every single model and integration.

Added a matching generateStaticParams to all three files, mirroring
each route's own page.tsx.

Note: the exact URLs in the audit report (bare /opengraph-image, no
suffix) aren't the real ones - Next serves these at a build-generated
hash suffix (e.g. /opengraph-image-15dal5?<hash>), which is what's
actually embedded in each page's <meta property="og:image"> tag. The
underlying bug the report surfaced is real regardless; verified by
requesting the actual hash-suffixed URL each page embeds (previously
404, now 200) for both a model and an integration page, on a real
production build.
@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jul 13, 2026 6:06pm

Request Review

@cursor

cursor Bot commented Jul 13, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Static-generation metadata only; no auth, data, or runtime behavior changes beyond fixing OG image URLs at build time.

Overview
Fixes Open Graph image routes for landing model and integration pages that were returning 404 (~230 URLs) even though the HTML pages built correctly.

Sibling page.tsx files use dynamicParams = false and already export generateStaticParams, but Next.js does not apply that static param list to sibling opengraph-image.tsx metadata routes. This PR adds matching generateStaticParams on all three affected OG handlers: integrations by slug, models by provider+model (ALL_CATALOG_MODELS), and provider catalog pages (MODEL_PROVIDERS_WITH_CATALOGS).

Reviewed by Cursor Bugbot for commit d23eabe. Configure here.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit d23eabe. Configure here.

@greptile-apps

greptile-apps Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes missing OG image static params for landing pages. The main changes are:

  • Added integration slug params for integration OG images.
  • Added provider and model params for model detail OG images.
  • Added provider params for provider-level model OG images.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
apps/sim/app/(landing)/integrations/(shell)/[slug]/opengraph-image.tsx Adds static integration slug generation for the OG image route.
apps/sim/app/(landing)/models/(shell)/[provider]/[model]/opengraph-image.tsx Adds static provider/model param generation matching the model detail page route.
apps/sim/app/(landing)/models/(shell)/[provider]/opengraph-image.tsx Adds static provider param generation matching the provider page route.

Reviews (1): Last reviewed commit: "fix(landing): fix 404ing OG images for e..." | Re-trigger Greptile

@greptile-apps

greptile-apps Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds static params for landing-page OG image routes. The main changes are:

  • Adds integration slug params for integration OG images.
  • Adds provider and model params for model detail OG images.
  • Adds provider params for provider-level model OG images.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.
  • The new param generators match the sibling page routes.
  • The added imports use the existing app alias pattern.

Important Files Changed

Filename Overview
apps/sim/app/(landing)/integrations/(shell)/[slug]/opengraph-image.tsx Adds static integration slug params for the metadata image route.
apps/sim/app/(landing)/models/(shell)/[provider]/[model]/opengraph-image.tsx Adds static provider/model params using the existing catalog model list.
apps/sim/app/(landing)/models/(shell)/[provider]/opengraph-image.tsx Adds static provider params using the same provider list as the sibling page.

Reviews (2): Last reviewed commit: "fix(landing): fix 404ing OG images for e..." | Re-trigger Greptile

@waleedlatif1 waleedlatif1 merged commit 4b3c688 into staging Jul 13, 2026
18 checks passed
@waleedlatif1 waleedlatif1 deleted the models-integrations-og-image-fix branch July 13, 2026 18:22
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