diff --git a/ui/src/components/profiles/editor/friendly-ui-section.tsx b/ui/src/components/profiles/editor/friendly-ui-section.tsx index 109a3231..a591a730 100644 --- a/ui/src/components/profiles/editor/friendly-ui-section.tsx +++ b/ui/src/components/profiles/editor/friendly-ui-section.tsx @@ -13,7 +13,9 @@ import { OpenRouterModelPicker } from '@/components/profiles/openrouter-model-pi import { ModelTierMapping, type TierMapping } from '@/components/profiles/model-tier-mapping'; import { Label } from '@/components/ui/label'; import { MaskedInput } from '@/components/ui/masked-input'; -import { ChevronRight, Settings2 } from 'lucide-react'; +import { Input } from '@/components/ui/input'; +import { Button } from '@/components/ui/button'; +import { ChevronRight, Settings2, Plus } from 'lucide-react'; import { isOpenRouterProfile, extractTierMapping, applyTierMapping } from './utils'; import { toast } from 'sonner'; import { cn } from '@/lib/utils'; @@ -98,19 +100,19 @@ export function FriendlyUISection({ // State for collapsible sections const [showAllEnvVars, setShowAllEnvVars] = useState(false); - // For OpenRouter: filter out model-related env vars from the main display - // These are managed by the model picker and tier mapping + // For OpenRouter: keys managed by dedicated UI sections const openRouterManagedKeys = new Set([ 'ANTHROPIC_MODEL', 'ANTHROPIC_DEFAULT_OPUS_MODEL', 'ANTHROPIC_DEFAULT_SONNET_MODEL', 'ANTHROPIC_DEFAULT_HAIKU_MODEL', + 'ANTHROPIC_AUTH_TOKEN', // Managed by API Key section ]); - // Count of hidden env vars for OpenRouter profiles - const hiddenEnvVarCount = isOpenRouter - ? Object.keys(currentEnv).filter((k) => openRouterManagedKeys.has(k)).length - : 0; + // Get non-managed env vars for display in "Additional Variables" + const unmanagedEnvVars = Object.entries(currentEnv).filter( + ([key]) => !openRouterManagedKeys.has(key) + ); return (
- Get your API key from{' '} - - openrouter.ai/keys - -
-+ Get your API key from{' '} + + openrouter.ai/keys + +
+