Update Python SDK WS endpoint and tests#44
Merged
willwashburn merged 1 commit intomainfrom Feb 20, 2026
Merged
Conversation
Switch Python SDK websocket URL from /v1/stream to /v1/ws and update the ws test to assert the new endpoint. Remove the stale root-level test-prod-ws.mjs smoke script (coverage duplicated by CI and used the legacy /v1/stream route). Add trajectory metadata files and update .trajectories index lastUpdated and entries.
|
Preview deployed!
This preview shares the staging database and will be cleaned up when the PR is merged or closed. Run E2E testsnpm run e2e -- https://pr44-api.relaycast.dev --ciOpen observer dashboard |
There was a problem hiding this comment.
Pull request overview
This PR updates the Python SDK’s WebSocket connection URL to match the server’s /v1/ws route, adjusts the Python SDK test to assert the new endpoint, and removes a stale production WS smoke script that relied on the legacy /v1/stream route. It also adds/updates trajectory metadata entries documenting the work.
Changes:
- Switch Python SDK WS connect URL from
/v1/streamto/v1/ws. - Update Python SDK WS test to assert the new endpoint is used.
- Delete
test-prod-ws.mjsand add corresponding.trajectoriesmetadata entries.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test-prod-ws.mjs | Removes an outdated manual production WS smoke test script. |
| packages/python-sdk/src/relay_sdk/ws.py | Updates the SDK WebSocket endpoint to /v1/ws. |
| packages/python-sdk/tests/test_ws.py | Adds a regression assertion ensuring /v1/ws is used. |
| .trajectories/index.json | Updates trajectory index timestamp and adds new entries for this work. |
| .trajectories/completed/2026-02/traj_nck4ip3pfbfz.md | Adds trajectory summary for the Python SDK WS endpoint update. |
| .trajectories/completed/2026-02/traj_nck4ip3pfbfz.json | Adds trajectory JSON metadata for the Python SDK WS endpoint update. |
| .trajectories/completed/2026-02/traj_vwrhp5hvaml2.md | Adds trajectory summary for removing the stale smoke script. |
| .trajectories/completed/2026-02/traj_vwrhp5hvaml2.json | Adds trajectory JSON metadata for removing the stale smoke script. |
Comments suppressed due to low confidence (1)
packages/python-sdk/src/relay_sdk/ws.py:80
- Repo docs still reference the legacy WebSocket route
/v1/stream(e.g., ARCHITECTURE.md and several docs/* specs). Since the SDK now uses/v1/ws, please update those docs (or add a brief note about the migration/deprecation) so users aren’t guided to a 404 endpoint.
url = (
f"{self._base_url}/v1/ws"
f"?token={quote(self._token, safe='')}"
f"&origin_surface={quote(self._origin_surface, safe='')}"
f"&origin_client={quote(self._origin_client, safe='')}"
f"&origin_version={quote(self._origin_version, safe='')}"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Switch Python SDK websocket URL from /v1/stream to /v1/ws and update the ws test to assert the new endpoint. Remove the stale root-level test-prod-ws.mjs smoke script (coverage duplicated by CI and used the legacy /v1/stream route). Add trajectory metadata files and update .trajectories index lastUpdated and entries.