Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
language_models: Stop logging noisy ChatGPT Subscription auth errors on startup (#61949)
Nitin Krishna Mucheli5638be1fe521
diff --git a/crates/language_models/src/provider/openai_subscribed.rs b/crates/language_models/src/provider/openai_subscribed.rsindex 2b57c537ce6..f38d8873247 100644--- a/crates/language_models/src/provider/openai_subscribed.rs+++ b/crates/language_models/src/provider/openai_subscribed.rs@@ -1,4 +1,4 @@-use anyhow::{Result, anyhow};+use anyhow::Result;use credentials_provider::CredentialsProvider;use futures::future::Shared;use gpui::{App, Context, Entity, SharedString, Task, Window};@@ -89,17 +89,11 @@ impl LanguageModelProvider for OpenAiSubscribedProvider {if is_auth {Ok(())} else {- Err(anyhow!(- "Sign in with your ChatGPT Plus or Pro subscription to use this provider."- )- .into())+ Err(AuthenticateError::CredentialsNotFound)}})} else {- Task::ready(Err(anyhow!(- "Sign in with your ChatGPT Plus or Pro subscription to use this provider."- )- .into()))+ Task::ready(Err(AuthenticateError::CredentialsNotFound))}}