File tree Expand file tree Collapse file tree
packages/provider-fx/src/server Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -163,6 +163,19 @@ describe("checkFxProviderStatus", () => {
163163 draft . models . map ( ( model ) => model . slug ) ,
164164 [ "default" , "codex:gpt-5.5" ] ,
165165 ) ;
166+
167+ // An earlier backend whose sign-in fx could not report does not hide Codex's.
168+ const unreadable = yield * check ( {
169+ " status --json" : status ( "missing" , { model : "spacexai/grok-4.7" } ) ,
170+ "gateway models --json" : GATEWAY_MODELS ,
171+ "codex status --json" : status ( "chatgpt subscription" ) ,
172+ "codex models --json" : models ( [ "gpt-5.5" ] ) ,
173+ "grok status --json" : status ( "missing" ) ,
174+ } ) ;
175+ assert . deepEqual ( unreadable . draft . auth , {
176+ status : "authenticated" ,
177+ label : "Codex subscription" ,
178+ } ) ;
166179 } ) ,
167180 ) ;
168181
Original file line number Diff line number Diff line change @@ -338,10 +338,11 @@ export const checkFxProviderStatus = Effect.fn("checkFxProviderStatus")(function
338338 ( backend ) => backend . id === fxStatusBackend ( status ?. model_source ) ,
339339 ) ;
340340 const usable = backends . find ( ( backend ) => backend . signedIn !== false && backend . models ?. length ) ;
341+ const signedIn = backends . find ( ( backend ) => backend . signedIn === true ) ;
341342 const statusAuth = fxAuth ( status ?. auth ) ;
342343 const auth : ServerProviderAuth =
343- statusAuth . status !== "authenticated" && usable ?. signedIn === true
344- ? { status : "authenticated" , label : usable . name }
344+ statusAuth . status !== "authenticated" && signedIn !== undefined
345+ ? { status : "authenticated" , label : signedIn . name }
345346 : statusAuth ;
346347 const probe =
347348 auth . status === "unauthenticated"
You can’t perform that action at this time.
0 commit comments