From 16b6b2f08ae4c95667d582e8f1ad47f9d0eaaf64 Mon Sep 17 00:00:00 2001 From: Spencer Qian Date: Tue, 4 Aug 2026 13:19:40 -0700 Subject: [PATCH] docs: follow the API's shorter 429 wording (0.11.2 / cli 0.8.2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The per-minute message now says "Please retry after 1 minute" rather than explaining the fixed window inline, and both messages ask politely. The SDK and CLI READMEs quote them verbatim, so they move together — a quoted sentence the server no longer sends is the exact problem this round set out to fix. The window explanation moves into the prose around the quote, where it reads as background rather than as an error message. No runtime change; the errors test that pins verbatim passthrough is updated to the new text. Patch bumps on both packages so the READMEs reach PyPI. --- README.md | 18 +++++++++--------- pyproject.toml | 2 +- sonilo-cli/README.md | 4 ++-- sonilo-cli/pyproject.toml | 2 +- tests/test_errors.py | 9 ++++----- 5 files changed, 17 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 4e505f5..ce3ecfe 100644 --- a/README.md +++ b/README.md @@ -475,16 +475,16 @@ The class and `.code` (`rate_limit_exceeded`) are identical for both — only the message tells them apart: - **Requests per minute** — `Rate limit exceeded: your account allows 60 - requests per minute. Rejected requests count toward the limit too, so wait - for the next minute window (up to 60 sec) rather than retrying right away. - To raise your limit, contact info@sonilo.com.` Calls are going out too fast. - The counter runs on a fixed 60-second window, so back off past the window - boundary instead of retrying inside it. + requests per minute. Please retry after 1 minute. To raise your limit, + please contact info@sonilo.com.` Calls are going out too fast. The counter + runs on a fixed 60-second window and rejected requests count toward it too, + so a retry inside the window cannot succeed — a full minute always clears + it, whatever your phase within the window. - **Concurrent generations** — `Too many concurrent generations: 5 of 5 in - progress. Wait for one to finish before starting another. To raise your - limit, contact info@sonilo.com.` Every generation slot is busy. Waiting - alone frees nothing — retry when one of your own in-flight generations - finishes, not on a timer. + progress. Please wait for one to finish before starting another. To raise + your limit, please contact info@sonilo.com.` Every generation slot is busy. + Waiting alone frees nothing — retry when one of your own in-flight + generations finishes, not on a timer. The numbers are the account's own limits; `account.services()` reports them as `rpm_limit` and `concurrency_limit`. Email info@sonilo.com to raise diff --git a/pyproject.toml b/pyproject.toml index 1cbd999..2b6d57e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "sonilo" -version = "0.11.1" +version = "0.11.2" description = "Official Python client for the Sonilo API" readme = "README.md" license = "MIT" diff --git a/sonilo-cli/README.md b/sonilo-cli/README.md index c0d082f..5494a15 100644 --- a/sonilo-cli/README.md +++ b/sonilo-cli/README.md @@ -187,8 +187,8 @@ That is the one 402 a retry can never fix. Two separate limits return `HTTP 429`, and they want opposite handling. The CLI prints the API's own sentence, so the wording says which one you hit: - sonilo: HTTP 429: Rate limit exceeded: your account allows 60 requests per minute. Rejected requests count toward the limit too, so wait for the next minute window (up to 60 sec) rather than retrying right away. To raise your limit, contact info@sonilo.com. (rate_limit_exceeded) - sonilo: HTTP 429: Too many concurrent generations: 5 of 5 in progress. Wait for one to finish before starting another. To raise your limit, contact info@sonilo.com. (rate_limit_exceeded) + sonilo: HTTP 429: Rate limit exceeded: your account allows 60 requests per minute. Please retry after 1 minute. To raise your limit, please contact info@sonilo.com. (rate_limit_exceeded) + sonilo: HTTP 429: Too many concurrent generations: 5 of 5 in progress. Please wait for one to finish before starting another. To raise your limit, please contact info@sonilo.com. (rate_limit_exceeded) The first means calls are going out too fast. The counter runs on a fixed 60-second window and rejected calls count toward it too, so wait the window out instead of retrying inside it. The diff --git a/sonilo-cli/pyproject.toml b/sonilo-cli/pyproject.toml index 9ab9c7e..29d4d70 100644 --- a/sonilo-cli/pyproject.toml +++ b/sonilo-cli/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "sonilo-cli" -version = "0.8.1" +version = "0.8.2" description = "Command-line interface for the Sonilo API: generate music and sound effects from text or video" readme = "README.md" license = "MIT" diff --git a/tests/test_errors.py b/tests/test_errors.py index 5916115..2682ab1 100644 --- a/tests/test_errors.py +++ b/tests/test_errors.py @@ -143,12 +143,11 @@ def test_429_without_header_has_no_retry_after(): "message", [ "Rate limit exceeded: your account allows 60 requests per minute. " - "Rejected requests count toward the limit too, so wait for the next " - "minute window (up to 60 sec) rather than retrying right away. " - "To raise your limit, contact info@sonilo.com.", - "Too many concurrent generations: 5 of 5 in progress. Wait for one to " - "finish before starting another. To raise your limit, contact " + "Please retry after 1 minute. To raise your limit, please contact " "info@sonilo.com.", + "Too many concurrent generations: 5 of 5 in progress. Please wait for " + "one to finish before starting another. To raise your limit, please " + "contact info@sonilo.com.", ], ) def test_429_carries_the_message_through_verbatim(message):