From d8d0538e3c61e8d4fbe554e74bd087e8e2dad1e8 Mon Sep 17 00:00:00 2001 From: Supra4E8C Date: Fri, 24 Apr 2026 23:14:25 +0800 Subject: [PATCH] fix(ai-providers): avoid API key in OpenAI entry keys --- .../providers/OpenAISection/OpenAISection.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/providers/OpenAISection/OpenAISection.tsx b/src/components/providers/OpenAISection/OpenAISection.tsx index 7b7c766..7eeb4b4 100644 --- a/src/components/providers/OpenAISection/OpenAISection.tsx +++ b/src/components/providers/OpenAISection/OpenAISection.tsx @@ -55,6 +55,14 @@ interface IndexedOpenAIProvider { originalIndex: number; } +const getApiKeyEntryRenderKey = ( + entry: NonNullable[number], + entryIndex: number +) => { + const authIndex = entry.authIndex == null ? '' : String(entry.authIndex).trim(); + return authIndex ? `auth-index-${authIndex}` : `api-key-entry-${entryIndex}`; +}; + export function OpenAISection({ configs, keyStats, @@ -507,7 +515,7 @@ export function OpenAISection({ ); return (
{entryIndex + 1}