All contributions

zed-industries/zed

Zed

A fast code editor in Rust from the creators of Atom and Tree-sitter, with live multiplayer editing.

Language
Rust
GitHub stars
95,562
Merged changes
1
Project site
zed.dev

What we changed

A slow ChatGPT subscription model catalogue now keeps loading in the background for up to 60 seconds, so the account's models no longer vanish from the selector, while sign-in still waits at most 5 seconds.

What this work shows

  • Background async tasks in Rust
  • HTTP request timeouts
  • Testing asynchronous code
What was broken

A slow model catalogue hid the account's models

For some accounts the model catalogue of a ChatGPT subscription answers after about 30 seconds, and Zed aborted the request after 5. The account's own models then disappeared from the selector, leaving the built-in list.

How we fixed it

Two timeouts instead of one

Sign-in still waits at most 5 seconds, while the request keeps running in the background for up to 60 seconds and replaces the model list when it returns. A test checks that a response after 30 seconds replaces the built-in list.

#64925

Merged change 1

  1. #64925 openai_subscribed: Keep loading slow model catalogs in the background Merged 1 October 2026

What it taught us

A slow network request must neither block sign-in nor silently swap real data for defaults. We separate the timeout the user waits on from the background request's timeout, and check it with a test whose response arrives after 30 seconds.

More about this technology: Rust

Other projects we write code for

Describe your project.

A free quote comes back within an hour during working hours.