Skip to content

feat: add migration guides to landing page - #1482

Merged
smakosh merged 1 commit into
mainfrom
feat/migration-guides
Jan 20, 2026
Merged

smakosh merged 1 commit into
mainfrom
feat/migration-guides

Conversation

@smakosh

@smakosh smakosh commented Jan 20, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Add migration guides section to the landing page hero
  • Create dedicated migration content pages for OpenRouter, LiteLLM, and Vercel AI Gateway
  • Add migrations content collection for managing migration guide content

Test plan

  • Verify migration guides display correctly on the landing page
  • Test navigation to individual migration guide pages
  • Check responsive layout for migration links

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added Migration Guides section featuring step-by-step instructions for migrating from OpenRouter, Vercel AI Gateway, and LiteLLM to LLM Gateway.
    • Integrated migration guides on the homepage with quick access links to detailed migration documentation.
    • Each migration guide includes feature comparisons, code examples, and configuration details.

✏️ Tip: You can customize this high-level summary in your review settings.

Add section helping users migrate from OpenRouter, LiteLLM, and Vercel AI Gateway with dedicated content pages.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jan 20, 2026 •

Copy link
Copy Markdown
Contributor

Walkthrough

Adds a complete migrations feature to the LLM Gateway UI, including a new content collection, landing and dynamic pages for migration guides, OpenGraph image generation, and three migration guides (OpenRouter, Vercel AI Gateway, LiteLLM) with hero component integration to surface migrations.

Changes

Cohort / File(s) Summary
Content Collection Setup
apps/ui/content-collections.ts
New migrations collection defined with required schema fields (id, slug, title, description, date, fromProvider); added to exported collections array
Migration Routes
apps/ui/src/app/migration/page.tsx, apps/ui/src/app/migration/[slug]/page.tsx, apps/ui/src/app/migration/[slug]/opengraph-image.tsx
New landing page listing all migrations with provider icons and cards; dynamic route page for individual migrations with metadata and static param generation; OG image generator rendering provider icons, title, description with styled SVG layout (1200×630 PNG)
Hero Component Integration
apps/ui/src/components/landing/hero.tsx, apps/ui/src/components/landing/hero-rsc.tsx
Optional migrations prop added to Hero; new providerIcons map (OpenRouter, Vercel AI Gateway, LiteLLM); conditional migration UI block rendered when migrations present; hero-rsc fetches allMigrations and passes to Hero component
Migration Guides (Content)
apps/ui/src/content/migrations/openrouter.md, apps/ui/src/content/migrations/vercel-ai-gateway.md, apps/ui/src/content/migrations/litellm.md
Three migration documentation files with YAML frontmatter, quick migration diffs, feature comparison tables, step-by-step instructions, code examples (Python, OpenAI SDK, TypeScript, cURL), and configuration guidance

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Suggested reviewers

  • steebchen
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add migration guides to landing page' clearly and specifically describes the main change: adding migration guides functionality to the landing page hero section.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@smakosh smakosh self-assigned this Jan 20, 2026
@smakosh
smakosh enabled auto-merge January 20, 2026 15:45
@smakosh
smakosh added this pull request to the merge queue Jan 20, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In `@apps/ui/src/content/migrations/litellm.md`:
- Around line 48-64: The fenced code blocks in
apps/ui/src/content/migrations/litellm.md are missing language identifiers
(triggering MD040); update both model-ID blocks by changing the opening fences
from ``` to ```text so the examples (the root model IDs block containing
"gpt-5.2", "claude-opus-4-5-20251101", "gemini-3-flash-preview" and the
provider-prefixed block containing "openai/gpt-5.2",
"anthropic/claude-opus-4-5-20251101", "google-ai-studio/gemini-3-flash-preview")
use ```text as the fence language.

In `@apps/ui/src/content/migrations/openrouter.md`:
- Around line 139-144: Replace the incorrect environment variable name used when
instantiating the SDK client: in the snippet that calls createLLMGateway and
assigns to llmgateway, change process.env.LLMGATEWAY_API_KEY to
process.env.LLM_GATEWAY_API_KEY so it matches the rest of the guide and other
examples; ensure any related examples or mentions of the env var in this file
also use LLM_GATEWAY_API_KEY for consistency.

In `@apps/ui/src/content/migrations/vercel-ai-gateway.md`:
- Around line 174-192: Update the two fenced code blocks under the "Model Name
Format" section to include a language identifier by replacing the opening ```
with ```text for both the root model IDs block (containing gpt-4o,
claude-3-5-sonnet-20241022, gemini-1.5-pro) and the provider-prefixed model IDs
block (containing openai/gpt-4o, anthropic/claude-3-5-sonnet-20241022,
google-ai-studio/gemini-1.5-pro) so the blocks read ```text ... ``` to satisfy
MD040 and ensure consistent rendering.
🧹 Nitpick comments (4)
apps/ui/src/app/migration/page.tsx (1)

1-41: Replace the dynamic import with a top‑level import.

This aligns with the repo rule against dynamic imports in TS/TSX and keeps module loading consistent. Please confirm there isn’t a bundling-specific reason to keep the dynamic import. As per coding guidelines, use top-level imports only.

🛠️ Suggested fix
-import type { Migration } from "content-collections";
+import { allMigrations, type Migration } from "content-collections";

 export default async function MigrationPage() {
-	const { allMigrations } = await import("content-collections");
-
 	return (
apps/ui/src/components/landing/hero.tsx (1)

63-97: Consider extracting shared provider icons to reduce duplication.

The providerIcons map duplicates SVG definitions that also exist in opengraph-image.tsx. While acceptable for now since the styling differs (client-side uses currentColor and className, OG image uses static colors), consider extracting to a shared location if more providers are added.

apps/ui/src/app/migration/[slug]/opengraph-image.tsx (2)

86-94: Consider using a generic fallback icon instead of OpenRouterIcon.

When an unknown provider is encountered, falling back to OpenRouterIcon could be misleading in the OG image. Consider creating a generic migration or placeholder icon for unrecognized providers.

🔧 Suggested fix
 function getIconForProvider(provider: string) {
 	const iconMap: Record<string, () => React.JSX.Element> = {
 		OpenRouter: OpenRouterIcon,
 		"Vercel AI Gateway": VercelIcon,
 		LiteLLM: LiteLLMIcon,
 	};

-	return iconMap[provider] || OpenRouterIcon;
+	return iconMap[provider] || LLMGatewayIcon;
 }

108-122: Consider a more informative fallback for missing migrations.

The current fallback returns a plain black image when a migration isn't found. While this works, consider showing a branded "Not Found" image to maintain visual consistency if someone shares a broken link.

Comment on lines +48 to +64
LLM Gateway supports two model ID formats:

**Root Model IDs** (without provider prefix) - Uses smart routing to automatically select the best provider based on uptime, throughput, price, and latency:

```
gpt-5.2
claude-opus-4-5-20251101
gemini-3-flash-preview
```

**Provider-Prefixed Model IDs** - Routes to a specific provider with automatic failover if uptime drops below 90%:

```
openai/gpt-5.2
anthropic/claude-opus-4-5-20251101
google-ai-studio/gemini-3-flash-preview
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add language identifiers to the model ID fenced blocks.

This clears the MD040 lint warning and keeps formatting consistent.

🛠️ Suggested fix
-```
+```text
 gpt-5.2
 claude-opus-4-5-20251101
 gemini-3-flash-preview

- +text
openai/gpt-5.2
anthropic/claude-opus-4-5-20251101
google-ai-studio/gemini-3-flash-preview

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
LLM Gateway supports two model ID formats:
**Root Model IDs** (without provider prefix) - Uses smart routing to automatically select the best provider based on uptime, throughput, price, and latency:
```
gpt-5.2
claude-opus-4-5-20251101
gemini-3-flash-preview
```
**Provider-Prefixed Model IDs** - Routes to a specific provider with automatic failover if uptime drops below 90%:
```
openai/gpt-5.2
anthropic/claude-opus-4-5-20251101
google-ai-studio/gemini-3-flash-preview
```
LLM Gateway supports two model ID formats:
**Root Model IDs** (without provider prefix) - Uses smart routing to automatically select the best provider based on uptime, throughput, price, and latency:
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

52-52: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


60-60: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
In `@apps/ui/src/content/migrations/litellm.md` around lines 48 - 64, The fenced
code blocks in apps/ui/src/content/migrations/litellm.md are missing language
identifiers (triggering MD040); update both model-ID blocks by changing the
opening fences from ``` to ```text so the examples (the root model IDs block
containing "gpt-5.2", "claude-opus-4-5-20251101", "gemini-3-flash-preview" and
the provider-prefixed block containing "openai/gpt-5.2",
"anthropic/claude-opus-4-5-20251101", "google-ai-studio/gemini-3-flash-preview")
use ```text as the fence language.

Comment on lines +139 to +144
// After (LLM Gateway AI SDK Provider)
import { createLLMGateway } from "@llmgateway/ai-sdk-provider";

const llmgateway = createLLMGateway({
apiKey: process.env.LLMGATEWAY_API_KEY,
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix env var name typo in the AI SDK example.

The doc uses LLMGATEWAY_API_KEY, but the rest of the guide (and other guides) use LLM_GATEWAY_API_KEY.

🛠️ Suggested fix
-  apiKey: process.env.LLMGATEWAY_API_KEY,
+  apiKey: process.env.LLM_GATEWAY_API_KEY,
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// After (LLM Gateway AI SDK Provider)
import { createLLMGateway } from "@llmgateway/ai-sdk-provider";
const llmgateway = createLLMGateway({
apiKey: process.env.LLMGATEWAY_API_KEY,
});
// After (LLM Gateway AI SDK Provider)
import { createLLMGateway } from "@llmgateway/ai-sdk-provider";
const llmgateway = createLLMGateway({
apiKey: process.env.LLM_GATEWAY_API_KEY,
});
🤖 Prompt for AI Agents
In `@apps/ui/src/content/migrations/openrouter.md` around lines 139 - 144, Replace
the incorrect environment variable name used when instantiating the SDK client:
in the snippet that calls createLLMGateway and assigns to llmgateway, change
process.env.LLMGATEWAY_API_KEY to process.env.LLM_GATEWAY_API_KEY so it matches
the rest of the guide and other examples; ensure any related examples or
mentions of the env var in this file also use LLM_GATEWAY_API_KEY for
consistency.

Comment on lines +174 to +192
## Model Name Format

LLM Gateway supports two model ID formats:

**Root Model IDs** (without provider prefix) - Uses smart routing to automatically select the best provider based on uptime, throughput, price, and latency:

```
gpt-4o
claude-3-5-sonnet-20241022
gemini-1.5-pro
```

**Provider-Prefixed Model IDs** - Routes to a specific provider with automatic failover if uptime drops below 90%:

```
openai/gpt-4o
anthropic/claude-3-5-sonnet-20241022
google-ai-studio/gemini-1.5-pro
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add language identifiers to the model ID fenced blocks.

This resolves the MD040 lint warning and improves rendering consistency.

🛠️ Suggested fix
-```
+```text
 gpt-4o
 claude-3-5-sonnet-20241022
 gemini-1.5-pro

- +text
openai/gpt-4o
anthropic/claude-3-5-sonnet-20241022
google-ai-studio/gemini-1.5-pro

🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

180-180: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


188-188: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
In `@apps/ui/src/content/migrations/vercel-ai-gateway.md` around lines 174 - 192,
Update the two fenced code blocks under the "Model Name Format" section to
include a language identifier by replacing the opening ``` with ```text for both
the root model IDs block (containing gpt-4o, claude-3-5-sonnet-20241022,
gemini-1.5-pro) and the provider-prefixed model IDs block (containing
openai/gpt-4o, anthropic/claude-3-5-sonnet-20241022,
google-ai-studio/gemini-1.5-pro) so the blocks read ```text ... ``` to satisfy
MD040 and ensure consistent rendering.

Merged via the queue into main with commit 8551e95 Jan 20, 2026
8 checks passed
@smakosh
smakosh deleted the feat/migration-guides branch January 20, 2026 15:55
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