@@ -31,7 +31,6 @@ import { CSS } from "@dnd-kit/utilities";
3131import { createEditKeyHandler } from "@/browser/utils/ui/keybinds" ;
3232import { getBrowserBackendBaseUrl } from "@/browser/utils/backendBaseUrl" ;
3333import { PROVIDER_DEFINITIONS , type ProviderName } from "@/common/constants/providers" ;
34- import type { ProvidersConfigMap } from "@/common/orpc/types" ;
3534import { OpenAICompatibleProvidersSection } from "./OpenAICompatibleProvidersSection" ;
3635import { usePolicy } from "@/browser/contexts/PolicyContext" ;
3736import { getAllowedProvidersForUi } from "@/browser/utils/policyUi" ;
@@ -1228,10 +1227,27 @@ export function ProvidersSection() {
12281227 { (
12291228 [
12301229 { key : "direct" , label : "Direct Providers" , providers : providerGroups . direct } ,
1230+ {
1231+ key : "openai-compatible" ,
1232+ label : "User Providers" ,
1233+ providers : [ ] ,
1234+ render : ( ) => < OpenAICompatibleProvidersSection /> ,
1235+ } ,
12311236 { key : "gateway" , label : "Gateways" , providers : providerGroups . gateway } ,
12321237 { key : "local" , label : "Local" , providers : providerGroups . local } ,
12331238 ] as const
12341239 ) . map ( ( section ) => {
1240+ if ( "render" in section ) {
1241+ return (
1242+ < div key = { section . key } className = "space-y-2" >
1243+ < div className = "text-muted text-xs font-medium tracking-wide uppercase" >
1244+ { section . label }
1245+ </ div >
1246+ { section . render ( ) }
1247+ </ div >
1248+ ) ;
1249+ }
1250+
12351251 if ( section . providers . length === 0 ) {
12361252 return null ;
12371253 }
@@ -2203,8 +2219,6 @@ export function ProvidersSection() {
22032219 ) ;
22042220 } ) }
22052221
2206- < OpenAICompatibleProvidersSection />
2207-
22082222 { config && ! hasAnyConfiguredProvider && (
22092223 < div className = "border-warning/40 bg-warning/10 text-warning rounded-md border px-3 py-2 text-xs" >
22102224 No providers are currently enabled. You won't be able to send messages until you
0 commit comments