-
Notifications
You must be signed in to change notification settings - Fork 14
[FEEDS-1149] sdk update #216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughRegenerates backend SDKs: adds chat batch channel updates and future-ban queries; expands feeds methods and adds restore_activity; extends models with Changes
Sequence Diagram(s)sequenceDiagram
participant Client as Client (SDK user)
participant CallObj as Call object
participant REST as Video REST client
participant API as Video API server
participant Storage as Recording Storage
Client->>CallObj: start_recording(recording_type, recording_external_storage?)
CallObj->>REST: POST /api/v2/video/call/{type}/{id}/recordings/{recording_type}/start {json}
REST->>API: HTTP request (start recording)
API->>Storage: allocate/create recording stream (optional external storage)
API-->>REST: 200 OK {StartRecordingResponse}
REST-->>CallObj: StreamResponse
CallObj-->>Client: StartRecordingResponse
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Important Action Needed: IP Allowlist UpdateIf your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:
Reviews will stop working after February 8, 2026 if the new IP is not added to your allowlist. 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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@getstream/video/async_rest_client.py`:
- Around line 617-639: The get_call_participant_session_metrics function
currently builds path_params without the required call identifiers referenced in
the path string (the "{type}" and "{id}" placeholders), causing unresolved
placeholders or TypeError; update the method signature of
get_call_participant_session_metrics to accept the call type and id (e.g., add
parameters for type and id) and include those keys in the path_params dict so
the path
"/api/v2/video/call/{type}/{id}/session/{session}/participant/{user}/{user_session}/details/track"
is fully populated before calling self.get; ensure any callers/wrappers that
pass type and id still match the new signature.
In `@getstream/video/rest_client.py`:
- Around line 613-635: The get_call_participant_session_metrics method is
missing the call identifiers used in the URL template ({type} and {id}); update
the function signature to accept type and id (e.g., add parameters named type
and id) and include them in the path_params dict so path_params = {"type": type,
"id": id, "session": session, "user": user, "user_session": user_session};
ensure the parameter names exactly match the placeholders in the URL and update
any callers if necessary.
| @telemetry.operation_name( | ||
| "getstream.api.video.get_call_participant_session_metrics" | ||
| ) | ||
| async def get_call_participant_session_metrics( | ||
| self, | ||
| session: str, | ||
| user: str, | ||
| user_session: str, | ||
| since: Optional[datetime] = None, | ||
| until: Optional[datetime] = None, | ||
| ) -> StreamResponse[GetCallParticipantSessionMetricsResponse]: | ||
| query_params = build_query_param(since=since, until=until) | ||
| path_params = { | ||
| "session": session, | ||
| "user": user, | ||
| "user_session": user_session, | ||
| } | ||
| return await self.get( | ||
| "/api/v2/video/call/{type}/{id}/session/{session}/participant/{user}/{user_session}/details/track", | ||
| GetCallParticipantSessionMetricsResponse, | ||
| query_params=query_params, | ||
| path_params=path_params, | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing call identifiers in async participant session metrics endpoint.
The path includes {type} and {id}, but the method signature and path_params omit them. Call wrappers pass type/id, so this will raise TypeError and/or leave unresolved placeholders.
🛠️ Suggested fix
- async def get_call_participant_session_metrics(
- self,
- session: str,
- user: str,
- user_session: str,
- since: Optional[datetime] = None,
- until: Optional[datetime] = None,
- ) -> StreamResponse[GetCallParticipantSessionMetricsResponse]:
+ async def get_call_participant_session_metrics(
+ self,
+ type: str,
+ id: str,
+ session: str,
+ user: str,
+ user_session: str,
+ since: Optional[datetime] = None,
+ until: Optional[datetime] = None,
+ ) -> StreamResponse[GetCallParticipantSessionMetricsResponse]:
query_params = build_query_param(since=since, until=until)
path_params = {
+ "type": type,
+ "id": id,
"session": session,
"user": user,
"user_session": user_session,
}🤖 Prompt for AI Agents
In `@getstream/video/async_rest_client.py` around lines 617 - 639, The
get_call_participant_session_metrics function currently builds path_params
without the required call identifiers referenced in the path string (the
"{type}" and "{id}" placeholders), causing unresolved placeholders or TypeError;
update the method signature of get_call_participant_session_metrics to accept
the call type and id (e.g., add parameters for type and id) and include those
keys in the path_params dict so the path
"/api/v2/video/call/{type}/{id}/session/{session}/participant/{user}/{user_session}/details/track"
is fully populated before calling self.get; ensure any callers/wrappers that
pass type and id still match the new signature.
| @telemetry.operation_name( | ||
| "getstream.api.video.get_call_participant_session_metrics" | ||
| ) | ||
| def get_call_participant_session_metrics( | ||
| self, | ||
| session: str, | ||
| user: str, | ||
| user_session: str, | ||
| since: Optional[datetime] = None, | ||
| until: Optional[datetime] = None, | ||
| ) -> StreamResponse[GetCallParticipantSessionMetricsResponse]: | ||
| query_params = build_query_param(since=since, until=until) | ||
| path_params = { | ||
| "session": session, | ||
| "user": user, | ||
| "user_session": user_session, | ||
| } | ||
| return self.get( | ||
| "/api/v2/video/call/{type}/{id}/session/{session}/participant/{user}/{user_session}/details/track", | ||
| GetCallParticipantSessionMetricsResponse, | ||
| query_params=query_params, | ||
| path_params=path_params, | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing call identifiers in participant session metrics endpoint.
The path contains {type} and {id}, but the method signature and path_params omit them. Call wrappers pass type/id, so this will raise TypeError and/or leave unresolved placeholders in the URL.
🛠️ Suggested fix
- def get_call_participant_session_metrics(
- self,
- session: str,
- user: str,
- user_session: str,
- since: Optional[datetime] = None,
- until: Optional[datetime] = None,
- ) -> StreamResponse[GetCallParticipantSessionMetricsResponse]:
+ def get_call_participant_session_metrics(
+ self,
+ type: str,
+ id: str,
+ session: str,
+ user: str,
+ user_session: str,
+ since: Optional[datetime] = None,
+ until: Optional[datetime] = None,
+ ) -> StreamResponse[GetCallParticipantSessionMetricsResponse]:
query_params = build_query_param(since=since, until=until)
path_params = {
+ "type": type,
+ "id": id,
"session": session,
"user": user,
"user_session": user_session,
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| @telemetry.operation_name( | |
| "getstream.api.video.get_call_participant_session_metrics" | |
| ) | |
| def get_call_participant_session_metrics( | |
| self, | |
| session: str, | |
| user: str, | |
| user_session: str, | |
| since: Optional[datetime] = None, | |
| until: Optional[datetime] = None, | |
| ) -> StreamResponse[GetCallParticipantSessionMetricsResponse]: | |
| query_params = build_query_param(since=since, until=until) | |
| path_params = { | |
| "session": session, | |
| "user": user, | |
| "user_session": user_session, | |
| } | |
| return self.get( | |
| "/api/v2/video/call/{type}/{id}/session/{session}/participant/{user}/{user_session}/details/track", | |
| GetCallParticipantSessionMetricsResponse, | |
| query_params=query_params, | |
| path_params=path_params, | |
| ) | |
| `@telemetry.operation_name`( | |
| "getstream.api.video.get_call_participant_session_metrics" | |
| ) | |
| def get_call_participant_session_metrics( | |
| self, | |
| type: str, | |
| id: str, | |
| session: str, | |
| user: str, | |
| user_session: str, | |
| since: Optional[datetime] = None, | |
| until: Optional[datetime] = None, | |
| ) -> StreamResponse[GetCallParticipantSessionMetricsResponse]: | |
| query_params = build_query_param(since=since, until=until) | |
| path_params = { | |
| "type": type, | |
| "id": id, | |
| "session": session, | |
| "user": user, | |
| "user_session": user_session, | |
| } | |
| return self.get( | |
| "/api/v2/video/call/{type}/{id}/session/{session}/participant/{user}/{user_session}/details/track", | |
| GetCallParticipantSessionMetricsResponse, | |
| query_params=query_params, | |
| path_params=path_params, | |
| ) |
🤖 Prompt for AI Agents
In `@getstream/video/rest_client.py` around lines 613 - 635, The
get_call_participant_session_metrics method is missing the call identifiers used
in the URL template ({type} and {id}); update the function signature to accept
type and id (e.g., add parameters named type and id) and include them in the
path_params dict so path_params = {"type": type, "id": id, "session": session,
"user": user, "user_session": user_session}; ensure the parameter names exactly
match the placeholders in the URL and update any callers if necessary.
Summary by CodeRabbit