Skip to content

fix(opencode): preserve compatible stream errors - #40718

Merged
rekram1-node merged 1 commit into
devfrom
preserve-stream-errors
Aug 5, 2026
Merged

fix(opencode): preserve compatible stream errors#40718
rekram1-node merged 1 commit into
devfrom
preserve-stream-errors

Conversation

@rekram1-node

Copy link
Copy Markdown
Collaborator

Summary

  • patch @ai-sdk/openai-compatible to emit the structured SSE error object instead of only its message
  • align compatible Chat Completions error parts with the official OpenAI and Anthropic adapters
  • cover HTTP 200 midstream server_error retry behavior through the real provider and session processor

Testing

  • bun install --frozen-lockfile
  • bun test test/session/processor-effect.test.ts --test-name-pattern "OpenAI-compatible midstream server errors"
  • bun test test/session/processor-effect.test.ts (15 passed; context-overflow case hit the 5s harness timeout, then passed alone in 463ms with --timeout 15000)
  • bun test test/session/retry.test.ts
  • bun typecheck

@rekram1-node
rekram1-node merged commit 709c195 into dev Aug 5, 2026
12 checks passed
@rekram1-node
rekram1-node deleted the preserve-stream-errors branch August 5, 2026 20:14
charlesverge pushed a commit to charlesverge/opencode that referenced this pull request Aug 11, 2026
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.

1 participant