{"record":{"id":"462c39481a2bd4ac","repo":"zed-industries/zed","slug":"chatgpt-models-response-did-not-contain-any-picker","errorCode":null,"errorMessage":"ChatGPT models response did not contain any picker-visible models","messagePattern":"ChatGPT models response did not contain any picker-visible models","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/openai_subscribed/src/openai_subscribed.rs","lineNumber":738,"sourceCode":"        .context(\"failed to request ChatGPT models\")?;\n    let status = response.status();\n    let mut body = String::new();\n    smol::io::AsyncReadExt::read_to_string(response.body_mut(), &mut body)\n        .await\n        .context(\"failed to read ChatGPT models response\")?;\n    if !status.is_success() {\n        return Err(anyhow!(\n            \"ChatGPT models request failed (HTTP {status}): {body}\"\n        ));\n    }\n\n    let mut models = serde_json::from_str::<ModelsResponse>(&body)\n        .context(\"failed to parse ChatGPT models response\")?\n        .models;\n    models.retain(|model| model.visibility == ModelVisibility::List);\n    models.sort_by_key(|model| model.priority);\n    if models.is_empty() {\n        return Err(anyhow!(\n            \"ChatGPT models response did not contain any picker-visible models\"\n        ));\n    }\n    Ok(models.into_iter().map(ChatGptModel::from).collect())\n}\n\nimpl LanguageModel for OpenAiSubscribedLanguageModel {\n    fn id(&self) -> LanguageModelId {\n        self.id.clone()\n    }\n\n    fn name(&self) -> LanguageModelName {\n        LanguageModelName::from(self.model.display_name().to_string())\n    }\n\n    fn provider_id(&self) -> LanguageModelProviderId {\n        PROVIDER_ID\n    }","sourceCodeStart":720,"sourceCodeEnd":756,"githubUrl":"https://github.com/zed-industries/zed/blob/5a9b9558db01a6b906cec2fb70a797affdc58cdd/crates/openai_subscribed/src/openai_subscribed.rs#L720-L756","documentation":"The models request succeeded and the response parsed, but after filtering out models that are not visible in the ChatGPT picker, the list was empty. This means OpenAI's account has no models available for this credentials (e.g. a restricted organization, a new account, or a server-side catalog change that altered visibility flags).","triggerScenarios":"Thrown at crates/openai_subscribed/src/openai_subscribed.rs:706 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the signed-in ChatGPT account actually has model access (some organizations restrict available models)","Sign out and sign back in to refresh credentials in case the account state changed","Check whether OpenAI changed the picker-visibility field names in the models response, which would make every model filtered out"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5a9b9558db01a6b906cec2fb70a797affdc58cdd","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}