Skip to content

Studio: answer 503 on the speed limit route and keep capabilities up when the limit cannot be read - #17741

Merged
danielhanchen merged 1 commit into
mainfrom
studio-speed-limit-unreadable-endpoints
Nov 14, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
studio-speed-limit-unreadable-endpoints

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Follow-up to #17645, which made the download speed limit getter raise DownloadSpeedLimitUnavailableError when the settings database cannot be read. Two other readers of that getter were not updated and turned the new error into an unhandled 500:

  • GET /api/settings/download-speed-limit now answers 503 with the same sanitized retry message the download start uses.
  • GET /api/studio/download-transport-capabilities keeps answering, with speed_limited: true when the limit cannot be read. Before this change, a 500 here dropped the whole capabilities object the download dialog reads (Xet availability included), not just the limit flag. The download start still refuses on its own, so reporting "limited" only makes the preflight assume HTTP.
  • The getter logs the underlying read error as a warning again, so a locked database still shows up in the server log while the client message stays sanitized.

When the setting can be read, nothing changes: all 37 existing tests in test_download_speed_limit.py behave the same on main and on this branch.

Tests

  • Two new tests, test_unreadable_limit_is_a_503_on_the_settings_route and test_unreadable_limit_keeps_capabilities_answering_as_limited, fail on main and pass here.
  • studio/backend/tests/test_download_speed_limit.py: 39 passed.
  • I ran all 84 download / settings / transport / hf test files in studio/backend/tests on both main and this branch, and this branch adds no failures.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T09:22:50.917539Z 28713be Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danielhanchen danielhanchen self-assigned this Nov 14, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 28713be25b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit dbe95f2 into main Nov 14, 2026
@danielhanchen
danielhanchen deleted the studio-speed-limit-unreadable-endpoints branch November 14, 2026 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant