Skip to content

feat(opencode): support non-streaming provider mode + fallback tests#15828

Closed
75ACOL wants to merge 2 commits intoanomalyco:devfrom
75ACOL:codex/pr14786-followup-tests
Closed

feat(opencode): support non-streaming provider mode + fallback tests#15828
75ACOL wants to merge 2 commits intoanomalyco:devfrom
75ACOL:codex/pr14786-followup-tests

Conversation

@75ACOL
Copy link
Copy Markdown

@75ACOL 75ACOL commented Mar 3, 2026

Summary

What changed

  • packages/opencode/src/config/config.ts
    • add optional provider.*.options.streaming: boolean
  • packages/opencode/src/session/llm.ts
    • when provider.options.streaming === false, apply simulateStreamingMiddleware()
  • packages/opencode/test/session/llm.test.ts
    • add test: supports non-streaming openai-compatible backends when provider streaming is disabled
    • verifies non-SSE JSON response still emits text via textStream
    • verifies request is not sent as stream: true

Validation

  • cd packages/opencode && bun test test/session/llm.test.ts
  • cd packages/opencode && bun run typecheck

Context

poelzi and others added 2 commits February 22, 2026 20:51
…g backends

Add a 'streaming' boolean option to the provider configuration schema.
When set to false, the AI SDK's simulateStreamingMiddleware is used to
make non-streaming (doGenerate) requests and convert the response into
a simulated stream, allowing the rest of the processing pipeline to
work unchanged.

This is useful for custom OpenAI-compatible backends that do not
support server-sent events / streaming responses.

Usage in opencode.json:
  {
    "provider": {
      "myprovider": {
        "options": {
          "streaming": false
        }
      }
    }
  }
@github-actions github-actions bot added the needs:compliance This means the issue will auto-close after 2 hours. label Mar 3, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 3, 2026

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 3, 2026

The following comment was made by an LLM, it may be inaccurate:

Based on the search results, I found a related PR:

Related PR:

No duplicate PRs found that would represent the same feature or issue. The current PR appears to be a follow-up/enhancement to #14786, not a duplicate.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 3, 2026

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Mar 3, 2026
@github-actions github-actions bot closed this Mar 3, 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.

2 participants