feat(models): add NanoGPT provider configuration - #985
Conversation
Introduced configuration for the "NanoGPT" provider, including pricing, context size, and support for streaming, tools, and JSON output. Integrated necessary API key, endpoint, and workflow updates.
WalkthroughAdds NanoGPT provider across code and CI: exposes Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Client
participant Registry as "Model Registry"
participant EnvMap as "Provider Env Map"
participant Resolver as "Endpoint Resolver"
participant NanoGPT as "NanoGPT API"
Client->>Registry: Request model "gpt-oss-120b"
Registry-->>Client: Providers list (groq, nanogpt)
Client->>EnvMap: Resolve API key for "nanogpt"
EnvMap-->>Client: LLM_NANO_GPT_API_KEY
Client->>Resolver: Resolve base & endpoint for "nanogpt"
Resolver-->>Client: https://nano-gpt.com/api/v1/chat/completions
Client->>NanoGPT: POST /v1/chat/completions (with LLM_NANO_GPT_API_KEY)
NanoGPT-->>Client: Response
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ 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: 3
🧹 Nitpick comments (1)
packages/models/src/providers.ts (1)
236-246: Consider using a unique color for the NanoGPT provider.The provider entry is well-formed and includes all required fields. However, the color
#10b981is already used by the inference.net provider (line 73). While this is not a functional issue, using a distinct color would improve visual differentiation in the UI.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
.github/workflows/e2e.yml(1 hunks).github/workflows/run.yml(1 hunks)packages/models/src/get-provider-endpoint.ts(2 hunks)packages/models/src/models/openai.ts(2 hunks)packages/models/src/provider.ts(1 hunks)packages/models/src/providers.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{ts,tsx}: This is a pure TypeScript project—do not useanyoras anyunless absolutely necessary
Always use top-level ES imports; never userequireor dynamicimport()
Files:
packages/models/src/provider.tspackages/models/src/models/openai.tspackages/models/src/get-provider-endpoint.tspackages/models/src/providers.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Always use top-level import; never use require() or dynamic import()
Files:
packages/models/src/provider.tspackages/models/src/models/openai.tspackages/models/src/get-provider-endpoint.tspackages/models/src/providers.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: e2e
- GitHub Check: lint / run
- GitHub Check: build / run
- GitHub Check: generate / run
- GitHub Check: test / run
- GitHub Check: autofix
🔇 Additional comments (5)
.github/workflows/e2e.yml (1)
69-69: LGTM!The environment variable mapping follows the established pattern and correctly sources from the corresponding secret.
.github/workflows/run.yml (1)
57-57: LGTM!The environment variable mapping is consistent with the e2e workflow and follows the established pattern.
packages/models/src/get-provider-endpoint.ts (2)
98-100: LGTM!The base URL configuration for NanoGPT follows the established pattern for provider endpoint resolution.
170-170: LGTM!Correctly routes NanoGPT to the standard OpenAI-compatible
/v1/chat/completionsendpoint, consistent with other similar providers.packages/models/src/provider.ts (1)
20-20: LGTM!The environment variable mapping correctly associates the nanogpt provider with
LLM_NANO_GPT_API_KEY, consistent with the workflow configurations.
| { | ||
| test: "only", | ||
| providerId: "nanogpt", | ||
| modelName: "openai/gpt-oss-120b", | ||
| inputPrice: 0.05 / 1e6, | ||
| outputPrice: 0.25 / 1e6, | ||
| requestPrice: 0, | ||
| contextSize: 131072, | ||
| maxOutput: 32766, | ||
| streaming: true, | ||
| vision: false, | ||
| tools: true, | ||
| reasoning: true, | ||
| }, |
There was a problem hiding this comment.
Remove or change the test: "only" flag before merging.
The test: "only" flag will cause the test suite to run only these NanoGPT provider tests, skipping all other model tests. This will break CI pipelines and prevent other models from being validated.
Consider one of these options:
- Remove the
testproperty entirely to include these tests in the normal test suite - Change to
test: "skip"if these tests should be temporarily disabled - Change to
test: "include"if you want to explicitly include them without excluding others
Apply this diff to remove the flag:
{
- test: "only",
providerId: "nanogpt",
modelName: "openai/gpt-oss-120b",📝 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.
| { | |
| test: "only", | |
| providerId: "nanogpt", | |
| modelName: "openai/gpt-oss-120b", | |
| inputPrice: 0.05 / 1e6, | |
| outputPrice: 0.25 / 1e6, | |
| requestPrice: 0, | |
| contextSize: 131072, | |
| maxOutput: 32766, | |
| streaming: true, | |
| vision: false, | |
| tools: true, | |
| reasoning: true, | |
| }, | |
| { | |
| providerId: "nanogpt", | |
| modelName: "openai/gpt-oss-120b", | |
| inputPrice: 0.05 / 1e6, | |
| outputPrice: 0.25 / 1e6, | |
| requestPrice: 0, | |
| contextSize: 131072, | |
| maxOutput: 32766, | |
| streaming: true, | |
| vision: false, | |
| tools: true, | |
| reasoning: true, | |
| }, |
🤖 Prompt for AI Agents
In packages/models/src/models/openai.ts around lines 311 to 324, the object for
the nanogpt provider sets test: "only" which will cause the test runner to
execute only these tests; remove or change that property before merging. Either
delete the test property entirely, or set it to "skip" to disable temporarily,
or set it to "include" to include without excluding others; update the object
accordingly and run tests to confirm CI is no longer restricted to this
provider.
🧩 Analysis chain
Verify NanoGPT pricing accuracy.
The NanoGPT pricing is significantly lower than Groq's for the same models (approximately 66-75% cheaper). While competitive pricing is expected, please verify these prices are accurate:
- gpt-oss-120b: NanoGPT ($0.05/$0.25 per 1M tokens) vs Groq ($0.15/$0.75 per 1M tokens)
- gpt-oss-20b: NanoGPT ($0.04/$0.15 per 1M tokens) vs Groq ($0.10/$0.50 per 1M tokens)
Also applies to: 348-361
🌐 Web query:
What are the pricing details for NanoGPT's OpenAI OSS models (gpt-oss-120b and gpt-oss-20b)?
💡 Result:
Short answer:
-
The gpt-oss-120b and gpt-oss-20b weights were released as open‑weight models under the Apache 2.0 license — the model files are free to download and run locally (no model‑license fee). [1]
-
If you run them yourself (e.g., with NanoGPT or other local runtimes) your only costs are compute/infrastructure (GPU, storage, electricity, etc.). [1]
-
If you use OpenAI’s hosted API/endpoints instead of running locally, those calls are billed under OpenAI’s standard API token pricing (no separate per‑model public price listed for “gpt-oss” on the pricing page as of now). Check OpenAI’s API pricing for current per‑token rates. [2]
Sources:
[1] OpenAI — “Introducing gpt-oss” (model release, Apache 2.0).
[2] OpenAI — API Pricing page.
Remove hardcoded NanoGPT pricing for GPT-OSS models. These weights are open-weight under Apache 2.0 (free to self-host); token costs should reflect your compute usage or OpenAI’s standard API rates, not undocumented fixed fees.
🤖 Prompt for AI Agents
In packages/models/src/models/openai.ts around lines 311 to 324, remove the
hardcoded NanoGPT pricing entry for the "openai/gpt-oss-120b" model (the object
with providerId "nanogpt" and token/request prices) because GPT-OSS weights are
open-source and should not carry fixed token costs; replace it by either
removing the entry entirely or setting pricing fields to null/undefined and add
a short comment noting that self-hosted models have no vendor token pricing and
costs should be provided via configuration or computed from actual compute
metrics or standard OpenAI API rates; ensure any callers handle absent pricing
gracefully (fallback to configuration/defaults) and update related tests/docs
accordingly.
Deleted the redundant `test: "only"` property from NanoGPT model configurations to clean up and simplify model setup.
Added support for NanoGPT in provider logo and icons mapping. Updated `ProviderIcons` and included the new `NanoGPTIcon` component.
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
apps/playground/src/components/provider-icons.tsx (1)
441-609: Optional: Consider shared icon components to reduce duplication.The NanoGPTIcon component is duplicated between
apps/ui/src/components/ui/providers-icons.tsxandapps/playground/src/components/provider-icons.tsx. While this follows the existing pattern in the codebase, consider moving shared provider icons to a common package to improve maintainability and ensure consistency.This would eliminate the need to synchronize changes across multiple files when updating icon definitions.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
apps/playground/src/components/provider-icons.tsx(2 hunks)apps/ui/src/components/provider-keys/provider-logo.ts(1 hunks)apps/ui/src/components/ui/providers-icons.tsx(2 hunks)packages/models/src/models/openai.ts(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- packages/models/src/models/openai.ts
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{ts,tsx}: This is a pure TypeScript project—do not useanyoras anyunless absolutely necessary
Always use top-level ES imports; never userequireor dynamicimport()
Files:
apps/ui/src/components/ui/providers-icons.tsxapps/ui/src/components/provider-keys/provider-logo.tsapps/playground/src/components/provider-icons.tsx
apps/{ui,playground,docs}/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
In Next.js apps, use
next/linkfor links andnext/navigationrouter for navigation
Files:
apps/ui/src/components/ui/providers-icons.tsxapps/ui/src/components/provider-keys/provider-logo.tsapps/playground/src/components/provider-icons.tsx
apps/{ui,playground}/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Use cookies for user settings not stored in the database to ensure SSR compatibility
apps/{ui,playground}/**/*.{ts,tsx}: In Next.js apps, use next/link for links and next/navigation’s router for programmatic navigation (avoid tags, window.location, or legacy next/router)
Use cookies for user settings that are not persisted in the database to ensure SSR works
Files:
apps/ui/src/components/ui/providers-icons.tsxapps/ui/src/components/provider-keys/provider-logo.tsapps/playground/src/components/provider-icons.tsx
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Always use top-level import; never use require() or dynamic import()
Files:
apps/ui/src/components/ui/providers-icons.tsxapps/ui/src/components/provider-keys/provider-logo.tsapps/playground/src/components/provider-icons.tsx
🧬 Code graph analysis (1)
apps/ui/src/components/provider-keys/provider-logo.ts (2)
apps/playground/src/components/provider-icons.tsx (1)
ProviderIcons(612-632)apps/ui/src/components/ui/providers-icons.tsx (1)
ProviderIcons(612-632)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: build / run
- GitHub Check: generate / run
- GitHub Check: test / run
- GitHub Check: lint / run
- GitHub Check: e2e-shards (3)
- GitHub Check: e2e-shards (4)
- GitHub Check: e2e-shards (1)
- GitHub Check: e2e-shards (2)
🔇 Additional comments (3)
apps/ui/src/components/provider-keys/provider-logo.ts (1)
26-26: LGTM!The nanogpt provider mapping is correctly added and follows the established pattern for other providers.
apps/ui/src/components/ui/providers-icons.tsx (1)
631-631: LGTM!The nanogpt entry is correctly added to the ProviderIcons map and follows the established pattern.
apps/playground/src/components/provider-icons.tsx (1)
631-631: LGTM!The nanogpt entry is correctly added to the ProviderIcons map and follows the established pattern.
| export const NanoGPTIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => ( | ||
| <svg | ||
| id="Layer_1" | ||
| data-name="Layer 1" | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| xmlnsXlink="http://www.w3.org/1999/xlink" | ||
| viewBox="0 0 181.45 186.88" | ||
| {...props} | ||
| > | ||
| <defs> | ||
| <style> | ||
| { | ||
| "\n .cls-1 {\n fill: url(#linear-gradient-8);\n }\n\n .cls-2 {\n fill: url(#linear-gradient-7);\n }\n\n .cls-3 {\n fill: url(#linear-gradient-5);\n }\n\n .cls-4 {\n fill: url(#linear-gradient-6);\n }\n\n .cls-5 {\n fill: url(#linear-gradient-9);\n }\n\n .cls-6 {\n fill: url(#linear-gradient-4);\n }\n\n .cls-7 {\n fill: url(#linear-gradient-3);\n }\n\n .cls-8 {\n fill: url(#linear-gradient-2);\n }\n\n .cls-9 {\n fill: url(#linear-gradient);\n }\n\n .cls-10 {\n fill: url(#linear-gradient-10);\n }\n\n .cls-11 {\n fill: url(#linear-gradient-11);\n }\n\n .cls-12 {\n fill: url(#linear-gradient-12);\n }\n " | ||
| } | ||
| </style> | ||
| <linearGradient | ||
| id="linear-gradient" | ||
| x1={43.86} | ||
| y1={128.24} | ||
| x2={145.31} | ||
| y2={128.24} | ||
| gradientUnits="userSpaceOnUse" | ||
| > | ||
| <stop offset={0} stopColor="#015a9e" /> | ||
| <stop offset={1} stopColor="#11e9bb" /> | ||
| </linearGradient> | ||
| <linearGradient | ||
| id="linear-gradient-2" | ||
| x1={44.1} | ||
| y1={49.57} | ||
| x2={146.51} | ||
| y2={49.57} | ||
| xlinkHref="#linear-gradient" | ||
| /> | ||
| <linearGradient | ||
| id="linear-gradient-3" | ||
| x1={2.6} | ||
| y1={69.86} | ||
| x2={53.68} | ||
| y2={69.86} | ||
| xlinkHref="#linear-gradient" | ||
| /> | ||
| <linearGradient | ||
| id="linear-gradient-4" | ||
| x1={109.82} | ||
| y1={118.94} | ||
| x2={178.89} | ||
| y2={118.94} | ||
| xlinkHref="#linear-gradient" | ||
| /> | ||
| <linearGradient | ||
| id="linear-gradient-5" | ||
| x1={129.51} | ||
| y1={46.47} | ||
| x2={173.61} | ||
| y2={46.47} | ||
| xlinkHref="#linear-gradient" | ||
| /> | ||
| <linearGradient | ||
| id="linear-gradient-6" | ||
| x1={12.44} | ||
| y1={122.84} | ||
| x2={65.92} | ||
| y2={122.84} | ||
| xlinkHref="#linear-gradient" | ||
| /> | ||
| <linearGradient | ||
| id="linear-gradient-7" | ||
| x1={46.28} | ||
| y1={157.04} | ||
| x2={128.11} | ||
| y2={15.32} | ||
| xlinkHref="#linear-gradient" | ||
| /> | ||
| <linearGradient | ||
| id="linear-gradient-8" | ||
| x1={46.28} | ||
| y1={157.04} | ||
| x2={128.11} | ||
| y2={15.32} | ||
| xlinkHref="#linear-gradient" | ||
| /> | ||
| <linearGradient | ||
| id="linear-gradient-9" | ||
| x1={46.28} | ||
| y1={157.04} | ||
| x2={128.11} | ||
| y2={15.32} | ||
| xlinkHref="#linear-gradient" | ||
| /> | ||
| <linearGradient | ||
| id="linear-gradient-10" | ||
| x1={46.28} | ||
| y1={157.04} | ||
| x2={128.11} | ||
| y2={15.32} | ||
| xlinkHref="#linear-gradient" | ||
| /> | ||
| <linearGradient | ||
| id="linear-gradient-11" | ||
| x1={46.28} | ||
| y1={157.04} | ||
| x2={128.11} | ||
| y2={15.32} | ||
| xlinkHref="#linear-gradient" | ||
| /> | ||
| <linearGradient | ||
| id="linear-gradient-12" | ||
| x1={46.28} | ||
| y1={157.04} | ||
| x2={128.11} | ||
| y2={15.32} | ||
| xlinkHref="#linear-gradient" | ||
| /> | ||
| </defs> | ||
| <g> | ||
| <polygon | ||
| className="cls-9" | ||
| points="145.31 72.24 93.39 184.24 43.86 103.66 145.31 72.24" | ||
| /> | ||
| <polyline | ||
| className="cls-8" | ||
| points="106.21 2.68 146.51 64.44 44.1 96.46 70.86 27.88" | ||
| /> | ||
| <polygon | ||
| className="cls-7" | ||
| points="30.06 42.79 53.68 52.46 36.31 96.93 2.6 78.59 30.06 42.79" | ||
| /> | ||
| <polygon | ||
| className="cls-6" | ||
| points="109.82 166.73 153.7 71.14 178.89 81.47 109.82 166.73" | ||
| /> | ||
| <polygon | ||
| className="cls-3" | ||
| points="173.61 71.76 154.18 63.48 129.51 25.14 134.6 21.19 173.61 71.76" | ||
| /> | ||
| <polygon | ||
| className="cls-4" | ||
| points="65.92 153.78 12.44 91.91 34.91 104.09 35.83 104.85 65.92 153.78" | ||
| /> | ||
| </g> | ||
| <g> | ||
| <polygon | ||
| className="cls-2" | ||
| points="145.31 72.24 93.39 184.24 43.86 103.66 145.31 72.24" | ||
| /> | ||
| <polyline | ||
| className="cls-1" | ||
| points="106.21 2.68 146.51 64.44 44.1 96.46 70.86 27.88" | ||
| /> | ||
| <polygon | ||
| className="cls-5" | ||
| points="30.06 42.79 53.68 52.46 36.31 96.93 2.6 78.59 30.06 42.79" | ||
| /> | ||
| <polygon | ||
| className="cls-10" | ||
| points="109.82 166.73 153.7 71.14 178.89 81.47 109.82 166.73" | ||
| /> | ||
| <polygon | ||
| className="cls-11" | ||
| points="173.61 71.76 154.18 63.48 129.51 25.14 134.6 21.19 173.61 71.76" | ||
| /> | ||
| <polygon | ||
| className="cls-12" | ||
| points="65.92 153.78 12.44 91.91 34.91 104.09 35.83 104.85 65.92 153.78" | ||
| /> | ||
| </g> | ||
| </svg> | ||
| ); |
There was a problem hiding this comment.
Consider more specific gradient IDs to prevent conflicts.
The SVG uses generic gradient IDs like "linear-gradient", "linear-gradient-2", etc. (lines 457-554). If multiple SVG icons are rendered on the same page, these generic IDs could potentially conflict with gradients in other components, causing incorrect styling.
Consider prefixing gradient IDs with a unique identifier (e.g., "nanogpt-linear-gradient"). Update all references including xlinkHref attributes and the embedded CSS class definitions at line 453. See the review comment on the identical file apps/ui/src/components/ui/providers-icons.tsx for a detailed example.
🤖 Prompt for AI Agents
In apps/playground/src/components/provider-icons.tsx around lines 441 to 609,
the SVG gradient IDs (lines ~457-554) use generic names like "linear-gradient"
and "linear-gradient-2" that can collide when multiple icons render; rename
every gradient id to a unique prefix (e.g., "nanogpt-linear-gradient",
"nanogpt-linear-gradient-2", etc.) and update every reference to those IDs:
change xlinkHref attributes, any stop/gradient usages, and the embedded CSS
string (around line 453) so url(#...) matches the new names; ensure all
occurrences in the file (defs, xlinkHref, and the style block) are changed
consistently so the gradients remain correctly wired.
| export const NanoGPTIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => ( | ||
| <svg | ||
| id="Layer_1" | ||
| data-name="Layer 1" | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| xmlnsXlink="http://www.w3.org/1999/xlink" | ||
| viewBox="0 0 181.45 186.88" | ||
| {...props} | ||
| > | ||
| <defs> | ||
| <style> | ||
| { | ||
| "\n .cls-1 {\n fill: url(#linear-gradient-8);\n }\n\n .cls-2 {\n fill: url(#linear-gradient-7);\n }\n\n .cls-3 {\n fill: url(#linear-gradient-5);\n }\n\n .cls-4 {\n fill: url(#linear-gradient-6);\n }\n\n .cls-5 {\n fill: url(#linear-gradient-9);\n }\n\n .cls-6 {\n fill: url(#linear-gradient-4);\n }\n\n .cls-7 {\n fill: url(#linear-gradient-3);\n }\n\n .cls-8 {\n fill: url(#linear-gradient-2);\n }\n\n .cls-9 {\n fill: url(#linear-gradient);\n }\n\n .cls-10 {\n fill: url(#linear-gradient-10);\n }\n\n .cls-11 {\n fill: url(#linear-gradient-11);\n }\n\n .cls-12 {\n fill: url(#linear-gradient-12);\n }\n " | ||
| } | ||
| </style> | ||
| <linearGradient | ||
| id="linear-gradient" | ||
| x1={43.86} | ||
| y1={128.24} | ||
| x2={145.31} | ||
| y2={128.24} | ||
| gradientUnits="userSpaceOnUse" | ||
| > | ||
| <stop offset={0} stopColor="#015a9e" /> | ||
| <stop offset={1} stopColor="#11e9bb" /> | ||
| </linearGradient> | ||
| <linearGradient | ||
| id="linear-gradient-2" | ||
| x1={44.1} | ||
| y1={49.57} | ||
| x2={146.51} | ||
| y2={49.57} | ||
| xlinkHref="#linear-gradient" | ||
| /> | ||
| <linearGradient | ||
| id="linear-gradient-3" | ||
| x1={2.6} | ||
| y1={69.86} | ||
| x2={53.68} | ||
| y2={69.86} | ||
| xlinkHref="#linear-gradient" | ||
| /> | ||
| <linearGradient | ||
| id="linear-gradient-4" | ||
| x1={109.82} | ||
| y1={118.94} | ||
| x2={178.89} | ||
| y2={118.94} | ||
| xlinkHref="#linear-gradient" | ||
| /> | ||
| <linearGradient | ||
| id="linear-gradient-5" | ||
| x1={129.51} | ||
| y1={46.47} | ||
| x2={173.61} | ||
| y2={46.47} | ||
| xlinkHref="#linear-gradient" | ||
| /> | ||
| <linearGradient | ||
| id="linear-gradient-6" | ||
| x1={12.44} | ||
| y1={122.84} | ||
| x2={65.92} | ||
| y2={122.84} | ||
| xlinkHref="#linear-gradient" | ||
| /> | ||
| <linearGradient | ||
| id="linear-gradient-7" | ||
| x1={46.28} | ||
| y1={157.04} | ||
| x2={128.11} | ||
| y2={15.32} | ||
| xlinkHref="#linear-gradient" | ||
| /> | ||
| <linearGradient | ||
| id="linear-gradient-8" | ||
| x1={46.28} | ||
| y1={157.04} | ||
| x2={128.11} | ||
| y2={15.32} | ||
| xlinkHref="#linear-gradient" | ||
| /> | ||
| <linearGradient | ||
| id="linear-gradient-9" | ||
| x1={46.28} | ||
| y1={157.04} | ||
| x2={128.11} | ||
| y2={15.32} | ||
| xlinkHref="#linear-gradient" | ||
| /> | ||
| <linearGradient | ||
| id="linear-gradient-10" | ||
| x1={46.28} | ||
| y1={157.04} | ||
| x2={128.11} | ||
| y2={15.32} | ||
| xlinkHref="#linear-gradient" | ||
| /> | ||
| <linearGradient | ||
| id="linear-gradient-11" | ||
| x1={46.28} | ||
| y1={157.04} | ||
| x2={128.11} | ||
| y2={15.32} | ||
| xlinkHref="#linear-gradient" | ||
| /> | ||
| <linearGradient | ||
| id="linear-gradient-12" | ||
| x1={46.28} | ||
| y1={157.04} | ||
| x2={128.11} | ||
| y2={15.32} | ||
| xlinkHref="#linear-gradient" | ||
| /> | ||
| </defs> | ||
| <g> | ||
| <polygon | ||
| className="cls-9" | ||
| points="145.31 72.24 93.39 184.24 43.86 103.66 145.31 72.24" | ||
| /> | ||
| <polyline | ||
| className="cls-8" | ||
| points="106.21 2.68 146.51 64.44 44.1 96.46 70.86 27.88" | ||
| /> | ||
| <polygon | ||
| className="cls-7" | ||
| points="30.06 42.79 53.68 52.46 36.31 96.93 2.6 78.59 30.06 42.79" | ||
| /> | ||
| <polygon | ||
| className="cls-6" | ||
| points="109.82 166.73 153.7 71.14 178.89 81.47 109.82 166.73" | ||
| /> | ||
| <polygon | ||
| className="cls-3" | ||
| points="173.61 71.76 154.18 63.48 129.51 25.14 134.6 21.19 173.61 71.76" | ||
| /> | ||
| <polygon | ||
| className="cls-4" | ||
| points="65.92 153.78 12.44 91.91 34.91 104.09 35.83 104.85 65.92 153.78" | ||
| /> | ||
| </g> | ||
| <g> | ||
| <polygon | ||
| className="cls-2" | ||
| points="145.31 72.24 93.39 184.24 43.86 103.66 145.31 72.24" | ||
| /> | ||
| <polyline | ||
| className="cls-1" | ||
| points="106.21 2.68 146.51 64.44 44.1 96.46 70.86 27.88" | ||
| /> | ||
| <polygon | ||
| className="cls-5" | ||
| points="30.06 42.79 53.68 52.46 36.31 96.93 2.6 78.59 30.06 42.79" | ||
| /> | ||
| <polygon | ||
| className="cls-10" | ||
| points="109.82 166.73 153.7 71.14 178.89 81.47 109.82 166.73" | ||
| /> | ||
| <polygon | ||
| className="cls-11" | ||
| points="173.61 71.76 154.18 63.48 129.51 25.14 134.6 21.19 173.61 71.76" | ||
| /> | ||
| <polygon | ||
| className="cls-12" | ||
| points="65.92 153.78 12.44 91.91 34.91 104.09 35.83 104.85 65.92 153.78" | ||
| /> | ||
| </g> | ||
| </svg> | ||
| ); |
There was a problem hiding this comment.
Consider more specific gradient IDs to prevent conflicts.
The SVG uses generic gradient IDs like "linear-gradient", "linear-gradient-2", etc. (lines 457-554). If multiple SVG icons are rendered on the same page, these generic IDs could potentially conflict with gradients in other components, causing incorrect styling.
Consider prefixing gradient IDs with a unique identifier:
<defs>
...
<linearGradient
- id="linear-gradient"
+ id="nanogpt-linear-gradient"
x1={43.86}
y1={128.24}
x2={145.31}
y2={128.24}
gradientUnits="userSpaceOnUse"
>
<stop offset={0} stopColor="#015a9e" />
<stop offset={1} stopColor="#11e9bb" />
</linearGradient>
<linearGradient
- id="linear-gradient-2"
+ id="nanogpt-linear-gradient-2"
x1={44.1}
y1={49.57}
x2={146.51}
y2={49.57}
- xlinkHref="#linear-gradient"
+ xlinkHref="#nanogpt-linear-gradient"
/>
...
</defs>Update all gradient ID references consistently throughout the component, including in the embedded CSS classes (line 453) and xlinkHref attributes.
Committable suggestion skipped: line range outside the PR's diff.
Added `stability: "experimental"` field to model provider configurations. Helps identify experimental models in setup and usage contexts.
Marked "nanogpt" models with `test: "skip"` to exclude them from test runs. Ensures tests run without failing due to unsupported models.
Temporarily excluded "nanogpt" provider from POST /keys/provider tests along with "routeway" to prevent test failures. Marked with TODO for future consideration.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
apps/api/src/routes/keys-provider.e2e.ts (1)
107-109: Link the TODO to a tracking issue.The TODO comment indicates that skipping these providers is temporary, but there's no reference to a tracking issue. Additionally, it's unclear why NanoGPT is being skipped in the same PR that introduces it—this creates a test coverage gap for the newly added provider.
Consider updating the TODO comment to reference a tracking issue:
-// TODO temporarily skip routeway and nanogpt +// TODO(#ISSUE_NUMBER): temporarily skip routeway and nanogpt until [reason] if (providerId === "routeway" || providerId === "nanogpt") { return; }Can you clarify why NanoGPT testing is being deferred? Is there a specific blocker (e.g., API availability, authentication setup, endpoint readiness)?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
apps/api/src/routes/keys-provider.e2e.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{ts,tsx}: This is a pure TypeScript project—do not useanyoras anyunless absolutely necessary
Always use top-level ES imports; never userequireor dynamicimport()
Files:
apps/api/src/routes/keys-provider.e2e.ts
**/*.e2e.ts
📄 CodeRabbit inference engine (CLAUDE.md)
Name end-to-end test files with the
.e2e.tssuffix to be picked up bypnpm test:e2eEnd-to-end tests should be written in *.e2e.ts files
Files:
apps/api/src/routes/keys-provider.e2e.ts
{apps/api,apps/gateway}/**/*.ts
📄 CodeRabbit inference engine (CLAUDE.md)
For read queries, use
db().query.<table>.findMany()orfindFirst()
Files:
apps/api/src/routes/keys-provider.e2e.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Always use top-level import; never use require() or dynamic import()
Files:
apps/api/src/routes/keys-provider.e2e.ts
apps/{gateway,api}/**/*.ts
📄 CodeRabbit inference engine (AGENTS.md)
apps/{gateway,api}/**/*.ts: Use Hono for HTTP routing in Gateway and API services
Use Zod schemas for request/response validation in server routes
Files:
apps/api/src/routes/keys-provider.e2e.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
- GitHub Check: test / run
- GitHub Check: build / run
- GitHub Check: lint / run
- GitHub Check: generate / run
- GitHub Check: autofix
- GitHub Check: e2e-shards (4)
- GitHub Check: e2e-shards (1)
- GitHub Check: e2e-shards (2)
- GitHub Check: e2e-shards (3)
Introduced configuration for the "NanoGPT" provider, including pricing, context size, and support for streaming, tools, and JSON output. Integrated necessary API key, endpoint, and workflow updates.
Summary by CodeRabbit
New Features
Chores