From 2cc960c991a699a485a4751e2002abc01ae769ff Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Mon, 27 Apr 2026 04:59:36 -0400 Subject: [PATCH] language_models: Fix `is_authenticated` state for Cloud provider (#54826) This PR fixes an issue introduced in https://github.com/zed-industries/zed/pull/54397 where the Zed Cloud provider would not be reflected as "authenticated" if a connection to Collab was attempted, but could not be established. This was especially noticable when running Zed against a local version of Cloud and not having Collab running. This restores the original logic prior to that change. Release Notes: - N/A --- crates/language_models/src/provider/cloud.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/crates/language_models/src/provider/cloud.rs b/crates/language_models/src/provider/cloud.rs index 8a5059d63b0..1c4de9e1afa 100644 --- a/crates/language_models/src/provider/cloud.rs +++ b/crates/language_models/src/provider/cloud.rs @@ -1,6 +1,5 @@ use ai_onboarding::YoungAccountBanner; use anyhow::Result; -use client::Status; use client::{Client, RefreshLlmTokenListener, UserStore, global_llm_token, zed_urls}; use cloud_api_client::LlmApiToken; use cloud_api_types::OrganizationId; @@ -250,8 +249,7 @@ impl LanguageModelProvider for CloudLanguageModelProvider { fn is_authenticated(&self, cx: &App) -> bool { let state = self.state.read(cx); - let status = *state.client.status().borrow(); - matches!(status, Status::Authenticated | Status::Connected { .. }) + !state.is_signed_out(cx) } fn authenticate(&self, cx: &mut App) -> Task> {