Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ jobs:
LLM_ALIBABA_API_KEY: ${{ secrets.ALIBABA_API_KEY }}
LLM_NEBIUS_API_KEY: ${{ secrets.NEBIUS_API_KEY }}
LLM_Z_AI_API_KEY: ${{ secrets.Z_AI_API_KEY }}
LLM_NANO_GPT_API_KEY: ${{ secrets.NANO_GPT_API_KEY }}
LLM_ROUTEWAY_API_KEY: ${{ secrets.ROUTEWAY_API_KEY }}
LLM_ROUTEWAY_DISCOUNT_API_KEY: ${{ secrets.ROUTEWAY_DISCOUNT_API_KEY }}
LLM_ROUTEWAY_DISCOUNT_BASE_URL: ${{ secrets.ROUTEWAY_DISCOUNT_BASE_URL }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jobs:
LLM_ALIBABA_API_KEY: ${{ secrets.ALIBABA_API_KEY }}
LLM_NEBIUS_API_KEY: ${{ secrets.NEBIUS_API_KEY }}
LLM_Z_AI_API_KEY: ${{ secrets.Z_AI_API_KEY }}
LLM_NANO_GPT_API_KEY: ${{ secrets.NANO_GPT_API_KEY }}
LLM_ROUTEWAY_API_KEY: ${{ secrets.ROUTEWAY_API_KEY }}
LLM_ROUTEWAY_DISCOUNT_API_KEY: ${{ secrets.ROUTEWAY_DISCOUNT_API_KEY }}
LLM_ROUTEWAY_DISCOUNT_BASE_URL: ${{ secrets.ROUTEWAY_DISCOUNT_BASE_URL }}
4 changes: 2 additions & 2 deletions apps/api/src/routes/keys-provider.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ describe(
test.each(testProviders)(
"POST /keys/provider with $name key",
async ({ providerId }) => {
// TODO temporarily skip routeway
if (providerId === "routeway") {
// TODO temporarily skip routeway and nanogpt
if (providerId === "routeway" || providerId === "nanogpt") {
return;
}
const envVarName = getProviderEnvVar(providerId);
Expand Down
171 changes: 171 additions & 0 deletions apps/playground/src/components/provider-icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,176 @@ export const RoutewayIcon: React.FC<React.SVGProps<SVGSVGElement>> = (
</svg>
);

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>
);
Comment on lines +441 to +609

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

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 all icons as a map for easy access
export const ProviderIcons = {
anthropic: AnthropicIcon,
Expand All @@ -458,6 +628,7 @@ export const ProviderIcons = {
zai: ZaiIcon,
routeway: RoutewayIcon,
"routeway-discount": RoutewayIcon,
nanogpt: NanoGPTIcon,
} as const;

// Type for provider icon keys
Expand Down
1 change: 1 addition & 0 deletions apps/ui/src/components/provider-keys/provider-logo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const providerLogoUrls: Partial<
zai: ProviderIcons.zai,
routeway: ProviderIcons.routeway,
"routeway-discount": ProviderIcons.routeway,
nanogpt: ProviderIcons.nanogpt,
};

export const getProviderLogoDarkModeClasses = () => {
Expand Down
Loading