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):