You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: regenerate the client from the current Stream API - #321
Since 8.0.0, the Stream API has added agent review and a review queue count, and it now publishes expected_value on custom-property moderation rules. The webhook helper also decompresses gzip bodies before the signature check, with no size cap.
Solution
This PR regenerates the client from chat 0cdfce10f9c, the current master. That commit includes GetStream/chat#20571 (expected_value) and GetStream/chat#20645 (gzip cap). The same two changes go to v7 in #320.
Compared with 8.0.0, no API is removed and no types change, so this is a minor release. The new optional parameters are inserted in alphabetical order:
In update_app, agent_review comes before apn_config.
In submit_action, agent_recommendation comes before ban.
The optional parameters that follow move one position. Since v8, optional parameters are passed by keyword (see MIGRATION_v7_to_v8.md).
How to verify
make lint
uv sync --all-extras --dev --no-install-package getstream-rtc && make typecheck
make test (507 passed locally)
BEGIN_COMMIT_OVERRIDE
feat(moderation): add agent review: submit_agent_feedback, list_agent_feedback and get_agent_review_status, plus agent_review on update_app and agent_recommendation on submit_action
feat(moderation): add count_review_queue to count the review queue items that match a filter
feat(moderation): add expected_value to UserCustomPropertyParameters, CallCustomPropertyParameters, ContentCustomPropertyParameters and ContentCustomPropertyCountParameters, so value-operator custom-property rules can be set
fix: cap decompressed gzip webhook bodies at 10 MiB (getstream.webhook.MAX_WEBHOOK_PAYLOAD_BYTES) and reject data after the gzip stream, because decompression runs before the signature check
END_COMMIT_OVERRIDE
Note
Medium Risk
Adds many optional moderation APIs and types (low breakage risk), but webhook gzip handling changes behavior for malicious or oversized compressed payloads—intentional hardening that may reject previously accepted bad input.
Overview
Regenerates the Python client from the current Stream API to expose agent review (Nora) moderation: app-level agent_review settings on update_app, review-queue payloads with agent verdicts, submit_action support for agent_recommendation, and new moderation calls list_agent_feedback, submit_agent_feedback, and get_agent_review_status, plus count_review_queue for filter-matched queue totals.
Moderation models gain stream-engine options (providerstream, strictness) and expected_value on custom-property rule parameters (user, call, content) for value-based operators.
Webhook security:gunzip_payload now caps decompressed bodies at MAX_WEBHOOK_PAYLOAD_BYTES (10 MiB) and rejects truncated or trailing data after gzip, because decompression runs before signature verification. Tests cover oversized and trailing-data cases.
Reviewed by Cursor Bugbot for commit d0d76ff. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
New Features
Added agent-review configuration, status, feedback, and recommendation support, including review-queue counts.
Added moderation settings for strictness and custom-property expected values.
Added review-queue item counts to moderation responses.
Bug Fixes
Webhook verification now rejects compressed payloads larger than 10 MiB, as well as malformed, truncated, or trailing-data gzip streams.
No actionable comments were generated in the recent review.
Walkthrough
The changes add agent-review models and client methods, including app configuration, feedback, review status, queue counts, and recommendations. Webhook gzip decompression now has a 10 MiB output limit and rejects malformed, incomplete, or trailing data.
Changes: Agent Review and Moderation APIs
Layer / File(s)
Summary
Agent-review and moderation contracts getstream/models/__init__.py
Adds agent-review and feedback models, app and review-queue fields, recommendation data, queue-count models, and moderation configuration fields.
Client methods and app updates getstream/moderation/*_rest_client.py, getstream/common/*_rest_client.py
Adds feedback, review-status, and review-queue count methods to both clients. submit_action accepts an agent recommendation, and update_app accepts agent-review settings.
Webhook Gzip Validation
Layer / File(s)
Summary
Bounded decompression and validation getstream/webhook.py, getstream/tests/test_webhook.py, tests/assets/webhooks/_invalid/oversized_compression/*
Limits decompressed gzip payloads to 10 MiB and raises InvalidWebhookError for oversized, incomplete, corrupt, or trailing-data input. Adds tests and an oversized-payload fixture.
GetStream/stream-py#313: Regenerates overlapping client signatures and webhook fixtures from another specification revision.
Suggested reviewers:itsmeadi, hifaizsk
Merge Risk: Minimal · up to d0d76
This change adds agent-review APIs and caps webhook gzip decompression at 10 MiB. No concrete merge-blocking issue was found. The binary gzip fixture was not available for direct inspection, but that alone does not establish a defect.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title "feat: regenerate the client from the current Stream API" is related to the changeset. The PR regenerates the client from a Stream chat commit and adds agent review methods, count_review_que…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "feat: regenerate the client from the current Stream API" is related to the changeset. The PR regenerates the client from a Stream chat commit and adds agent review methods, count_review_queue, expected_value fields, and webhook gzip limits. The title names the regeneration, which is the main change, but does not name a specific feature such as agent review. It is therefore a partial match that is broad but still accurate.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
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
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.
Problem
Since 8.0.0, the Stream API has added agent review and a review queue count, and it now publishes
expected_valueon custom-property moderation rules. The webhook helper also decompresses gzip bodies before the signature check, with no size cap.Solution
This PR regenerates the client from chat
0cdfce10f9c, the current master. That commit includes GetStream/chat#20571 (expected_value) and GetStream/chat#20645 (gzip cap). The same two changes go to v7 in #320.Compared with 8.0.0, no API is removed and no types change, so this is a minor release. The new optional parameters are inserted in alphabetical order:
update_app,agent_reviewcomes beforeapn_config.submit_action,agent_recommendationcomes beforeban.The optional parameters that follow move one position. Since v8, optional parameters are passed by keyword (see
MIGRATION_v7_to_v8.md).How to verify
make lintuv sync --all-extras --dev --no-install-package getstream-rtc && make typecheckmake test(507 passed locally)BEGIN_COMMIT_OVERRIDE
feat(moderation): add agent review:
submit_agent_feedback,list_agent_feedbackandget_agent_review_status, plusagent_reviewonupdate_appandagent_recommendationonsubmit_actionfeat(moderation): add
count_review_queueto count the review queue items that match a filterfeat(moderation): add
expected_valuetoUserCustomPropertyParameters,CallCustomPropertyParameters,ContentCustomPropertyParametersandContentCustomPropertyCountParameters, so value-operator custom-property rules can be setfix: cap decompressed gzip webhook bodies at 10 MiB (
getstream.webhook.MAX_WEBHOOK_PAYLOAD_BYTES) and reject data after the gzip stream, because decompression runs before the signature checkEND_COMMIT_OVERRIDE
Note
Medium Risk
Adds many optional moderation APIs and types (low breakage risk), but webhook gzip handling changes behavior for malicious or oversized compressed payloads—intentional hardening that may reject previously accepted bad input.
Overview
Regenerates the Python client from the current Stream API to expose agent review (Nora) moderation: app-level
agent_reviewsettings onupdate_app, review-queue payloads with agent verdicts,submit_actionsupport foragent_recommendation, and new moderation callslist_agent_feedback,submit_agent_feedback, andget_agent_review_status, pluscount_review_queuefor filter-matched queue totals.Moderation models gain stream-engine options (
providerstream,strictness) andexpected_valueon custom-property rule parameters (user, call, content) for value-based operators.Webhook security:
gunzip_payloadnow caps decompressed bodies atMAX_WEBHOOK_PAYLOAD_BYTES(10 MiB) and rejects truncated or trailing data after gzip, because decompression runs before signature verification. Tests cover oversized and trailing-data cases.Reviewed by Cursor Bugbot for commit d0d76ff. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
New Features
Bug Fixes