Conversation
This reverts commit bbc5bcb.
WalkthroughThis PR adds comprehensive support for the Routeway LLM provider throughout the application. It includes environment variable configuration, provider registration, model definitions, streaming response handling, UI components, and documentation for free model offerings and promotional discounts. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~35 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (3)
packages/shared/src/components/provider-icons.tsx (1)
621-658: Inconsistent default icon size and potentialclipPathid collision.Two observations:
Size inconsistency: The default
classNameusesh-14 w-14, while most other icons in this file (Mistral, OpenAI, Perplexity, etc.) default toh-10 w-10. This may cause the Routeway icon to render larger than other provider icons in shared UI contexts.Generic
clipPathid: TheclipPathusesid="a", which could collide with other SVGs on the same page. Consider using a more unique id (e.g.,routeway-clip) or usingReact.useId()likeMinimaxIcondoes for its gradient.Suggested fix for size consistency and id uniqueness
export const RoutewayIcon: React.FC<React.SVGProps<SVGSVGElement>> = ( props, ) => ( <svg {...props} - className={cn("h-14 w-14 text-black dark:text-white", props.className)} + className={cn("h-10 w-10 text-black dark:text-white", props.className)} xmlns="http://www.w3.org/2000/svg" viewBox="900 200 800 1000" > <defs> - <clipPath clipPathUnits="userSpaceOnUse" id="a"> - <path d="M-1213.3696 448.07749h1920v-1080h-1920Z" /> + <clipPath clipPathUnits="userSpaceOnUse" id="routeway-clip"> + <path d="M-1213.3696 448.07749h1920v-1080h-1920Z" /> </clipPath> </defs>And update the reference:
- clipPath="url(`#a`)" + clipPath="url(`#routeway-clip`)"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/shared/src/components/provider-icons.tsx` around lines 621 - 658, The RoutewayIcon component has an inconsistent default size and a generic clipPath id that may collide; update RoutewayIcon so its default className matches other icons (change "h-14 w-14" to "h-10 w-10" on the className prop) and replace the generic clipPath id "a" (and its reference clipPath="url(`#a`)") with a unique id such as "routeway-clip" (or generate a scoped id via React.useId()) and update the clipPath attribute to match the new id.apps/api/src/routes/keys-provider.e2e.ts (1)
129-134: Clarify the TODO to match the actual skip list.The comment mentions only Routeway/NanoGPT but the guard also skips inference.net—consider updating the TODO (or adding a tracking issue) so it stays accurate.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/api/src/routes/keys-provider.e2e.ts` around lines 129 - 134, Update the TODO so it accurately reflects the full skip list used by the conditional checking providerId (the if guard that compares providerId to "routeway", "inference.net", and "nanogpt"); either expand the comment to list all three providers or replace it with a clearer note and/or a reference to a tracking issue describing why these providers are skipped and when to remove the guard.packages/models/src/models/routeway.ts (1)
15-16:inputPrice: 0.0 / 1e6is a no-op expression repeated across all entries.Since all models are free, you could simplify to
inputPrice: 0andoutputPrice: 0directly. The/ 1e6pattern makes sense for paid models (price per million tokens), but for zero prices it's pure noise. This is purely a readability nit — fine to keep if you prefer consistency with other provider files.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/models/src/models/routeway.ts` around lines 15 - 16, The model entries currently set inputPrice: 0.0 / 1e6 and outputPrice: 0.0 / 1e6 (a no-op) — replace these expressions with simple numeric zeros by setting inputPrice: 0 and outputPrice: 0 in the model definitions (the objects that define each model's pricing, where inputPrice and outputPrice are declared) to improve readability while preserving the semantics.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/ui/src/content/changelog/2025-09-02-routeway-free-models.md`:
- Around line 5-6: The markdown references "5 New Free Models" in the
title/summary but only documents four; add a new GPT-4.1 model section to the
same file so the count matches. Locate the existing model sections (headings for
"DeepSeek R1T2 Chimera", "GLM-4.5 Air", "Kimi K2", "GPT-OSS 20B") and insert a
parallel heading "GPT-4.1" with a short descriptive paragraph that notes it is
available free via RouteWay, any relevant usage limits or features, and a link
or callout consistent with the other model entries so formatting and tone match.
Ensure the summary/title still accurately reflect five models after adding this
section.
---
Nitpick comments:
In `@apps/api/src/routes/keys-provider.e2e.ts`:
- Around line 129-134: Update the TODO so it accurately reflects the full skip
list used by the conditional checking providerId (the if guard that compares
providerId to "routeway", "inference.net", and "nanogpt"); either expand the
comment to list all three providers or replace it with a clearer note and/or a
reference to a tracking issue describing why these providers are skipped and
when to remove the guard.
In `@packages/models/src/models/routeway.ts`:
- Around line 15-16: The model entries currently set inputPrice: 0.0 / 1e6 and
outputPrice: 0.0 / 1e6 (a no-op) — replace these expressions with simple numeric
zeros by setting inputPrice: 0 and outputPrice: 0 in the model definitions (the
objects that define each model's pricing, where inputPrice and outputPrice are
declared) to improve readability while preserving the semantics.
In `@packages/shared/src/components/provider-icons.tsx`:
- Around line 621-658: The RoutewayIcon component has an inconsistent default
size and a generic clipPath id that may collide; update RoutewayIcon so its
default className matches other icons (change "h-14 w-14" to "h-10 w-10" on the
className prop) and replace the generic clipPath id "a" (and its reference
clipPath="url(`#a`)") with a unique id such as "routeway-clip" (or generate a
scoped id via React.useId()) and update the clipPath attribute to match the new
id.
| title: "Enhanced Auto-Routing & 5 New Free Models via RouteWay" | ||
| summary: "Expanding auto-routing options & access DeepSeek R1T2 Chimera, GLM-4.5 Air, Kimi K2, GPT-OSS 20B, and GPT-4.1 completely free through our RouteWay integration." |
There was a problem hiding this comment.
Missing GPT-4.1 model section.
The title and summary mention "5 New Free Models" including GPT-4.1, but only 4 models have detailed sections (DeepSeek R1T2 Chimera, GLM-4.5 Air, Kimi K2, GPT-OSS 20B). The GPT-4.1 section appears to be missing.
Also applies to: 40-83
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@apps/ui/src/content/changelog/2025-09-02-routeway-free-models.md` around
lines 5 - 6, The markdown references "5 New Free Models" in the title/summary
but only documents four; add a new GPT-4.1 model section to the same file so the
count matches. Locate the existing model sections (headings for "DeepSeek R1T2
Chimera", "GLM-4.5 Air", "Kimi K2", "GPT-OSS 20B") and insert a parallel heading
"GPT-4.1" with a short descriptive paragraph that notes it is available free via
RouteWay, any relevant usage limits or features, and a link or callout
consistent with the other model entries so formatting and tone match. Ensure the
summary/title still accurately reflect five models after adding this section.
Reverts #1677
Summary by CodeRabbit
New Features
Documentation