Document the two 429s in the SDK and CLI READMEs - #24
Merged
Conversation
RateLimitError covers two limits that want opposite handling — slow down, or wait for a running generation to finish — and the class and code (rate_limit_exceeded) are identical for both. Only the message tells them apart, so the README now quotes both sentences and says what each one means, alongside the existing "three 402s" section that makes the same point for that status. The per-minute half also documents what the message alone cannot: the counter runs on a fixed 60-second window and rejected requests count toward it too, so a retry inside the window cannot succeed. The CLI prints the API's sentence verbatim, so its README gains the same guidance with the actual terminal output. No runtime change: error_from_response already passes the message through whole. A test pins that, since it is the property the docs now depend on. Patch bumps on both packages so the READMEs reach PyPI; sonilo-cli's >=0.11.0,<0.12 pin already admits the new core.
Sapient docs evalsWaiting for the staging docs URL before running evals. Sapient will start the selected PR evals automatically when GitHub reports a successful docs deployment for this PR. This usually happens within 15 minutes. Commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
RateLimitErrorcovers two limits that want opposite handling, and the class and.code(rate_limit_exceeded) are identical for both. Only the message tells them apart, and nothing in the SDK docs said so: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 info@sonilo.com.A caller who backs off on a timer handles the first correctly and the second not at all — no amount of waiting frees a slot; one of their own in-flight generations has to finish.
What changed
sonilo— a "The two 429s" section under Errors, mirroring the existing "The three 402s": both sentences quoted, what each one means, where the numbers come from (account.services()→rpm_limit/concurrency_limit), and the caveat that.retry_afteris set only when the server sends the header — which today it does not.sonilo-cli— a "Rate limits" section with the actual terminal output, since the CLI prints the API's sentence verbatim.No runtime change:
error_from_responsealready passes the message through whole. A test pins that, because it is now the property the docs depend on.Patch bumps on both packages (0.11.1 / 0.8.1) so the READMEs reach PyPI;
sonilo-cli'ssonilo>=0.11.0,<0.12pin already admits the new core, so no widening needed.Verification
pytest— 237 passed in the core (2 new), 86 passed insonilo-cli.Companion PRs: sonilo-api-dashboard#225 (the messages and the API docs), sonilo-mcp#22, sonilo-js#41.
🤖 Generated with Claude Code