Skip to content

fix(workflows): revert to /stream endpoint after Mastra removed /streamVNext#33

Merged
MiguelPF merged 6 commits intomainfrom
fix-streamvnext-mastra-api
Feb 3, 2026
Merged

fix(workflows): revert to /stream endpoint after Mastra removed /streamVNext#33
MiguelPF merged 6 commits intomainfrom
fix-streamvnext-mastra-api

Conversation

@MiguelPF
Copy link
Contributor

@MiguelPF MiguelPF commented Feb 2, 2026

Summary

  • Reverts workflow streaming endpoint from /streamVNext back to /stream
  • The /streamVNext endpoint was a temporary workaround introduced in November 2025 when Mastra's original /stream endpoint was broken
  • Mastra has since fixed the original endpoint and removed /streamVNext, causing 404 errors in production

Root Cause

The translation workflow started hitting 404 on /api/workflows/translationWorkflow/streamVNext because Mastra deprecated this endpoint after fixing the original /stream endpoint.

Test plan

  • Verified /stream endpoint returns HTTP 200 on local Mastra instance
  • Verified /streamVNext endpoint returns HTTP 404 on local Mastra instance
  • All specs pass (83 examples, 0 failures)
  • Rubocop passes

…amVNext

The /streamVNext endpoint was a temporary workaround introduced in November 2025
when Mastra's original /stream endpoint was broken. Mastra has since fixed the
original endpoint and removed /streamVNext, causing 404 errors in production.
@MiguelPF MiguelPF requested a review from a team as a code owner February 2, 2026 13:14
jacobbamio
jacobbamio previously approved these changes Feb 2, 2026
The execution-result endpoint was also removed by Mastra.
Changed from /runs/{runId}/execution-result to /runs/{runId}
oriolgual
oriolgual previously approved these changes Feb 2, 2026
When streaming fails, response.body returns Net::ReadAdapter after
read_body is called. Now we capture the error body before it's consumed
to provide meaningful error messages.
…tion

Updated the Mastra client to capture streaming error messages and check for workflow failures during execution. Added retry logic for fetching execution results to handle pending statuses, ensuring more robust error reporting and improved reliability in workflow processing.
The cassette was still using the old `/execution-result` suffix which
no longer matches the code after the API endpoint change.
jacobbamio
jacobbamio previously approved these changes Feb 2, 2026
- Replace unless/else with if/else (Style/UnlessElse)
- Use T.anything instead of T.untyped (Sorbet/ForbidTUntyped)
- Use hash access instead of single-arg dig (Style/SingleArgumentDig)
@MiguelPF MiguelPF merged commit d8e0806 into main Feb 3, 2026
1 check passed
@MiguelPF MiguelPF deleted the fix-streamvnext-mastra-api branch February 3, 2026 14:17
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.

3 participants