Skip to content

Update Python SDK WS endpoint and tests#44

Merged
willwashburn merged 1 commit intomainfrom
fix-bad-path
Feb 20, 2026
Merged

Update Python SDK WS endpoint and tests#44
willwashburn merged 1 commit intomainfrom
fix-bad-path

Conversation

@willwashburn
Copy link
Copy Markdown
Member

@willwashburn willwashburn commented Feb 20, 2026

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.


Open with Devin

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.
@github-actions
Copy link
Copy Markdown

Preview deployed!

Environment URL
API https://pr44-api.relaycast.dev
Health https://pr44-api.relaycast.dev/health
Observer https://pr44-observer.relaycast.dev

This preview shares the staging database and will be cleaned up when the PR is merged or closed.

Run E2E tests

npm run e2e -- https://pr44-api.relaycast.dev --ci

Open observer dashboard

https://pr44-observer.relaycast.dev

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/stream to /v1/ws.
  • Update Python SDK WS test to assert the new endpoint is used.
  • Delete test-prod-ws.mjs and add corresponding .trajectories metadata 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.

Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@willwashburn willwashburn merged commit 72fada7 into main Feb 20, 2026
7 checks passed
@willwashburn willwashburn deleted the fix-bad-path branch February 20, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants