Skip to content

Is there a way to disable streaming mode? #785

Closed as not planned
Closed as not planned

Description

@SimonWai

Can OpenCode work without Streaming mode? The proxy provider I'm using doesn't support streaming at the moment:

AI_APICallError: Streaming is not supported in Credal OpenAI Proxy

Image

Activity

  1. self-assigned this
    on Jul 9, 2025
  2. McAvity commented on Aug 8, 2025

    @McAvity

    +1, because you now need to be verified organization to use steaming with gpt5, so being able to turn off streaming would be great.

  3. harkairt commented on Aug 10, 2025

    @harkairt

    Facing the same issue

  4. archodev commented on Aug 17, 2025

    @archodev

    +1

  5. jordanbaindev commented on Sep 8, 2025

    @jordanbaindev

    +1

  6. LeonMusCoden commented on Sep 15, 2025

    @LeonMusCoden

    +1

  7. JeongJuhyeon commented on Sep 25, 2025

    @JeongJuhyeon

    Is this something an outside contribution could solve or does it need a lot of work?

  8. trufae commented on Oct 16, 2025

    @trufae
    Contributor

    im also interested in testing non-streaming mode for opencode, that may save some network, making debugging of problems in the protocol easier too.

  9. HansuHessu commented on Oct 25, 2025

    @HansuHessu

    +1

  10. dayeguilaiye commented on Oct 27, 2025

    @dayeguilaiye

    +1

  11. jayteaftw commented on Nov 7, 2025

    @jayteaftw

    +1

  12. eleqtrizit commented on Jan 17, 2026

    @eleqtrizit

    +1

  13. csawtelle commented on Jan 23, 2026

    @csawtelle

    +1

  14. smetay commented on Feb 2, 2026

    @smetay

    +1

  15. RawthiL commented on Feb 3, 2026

    @RawthiL

    +1

  16. 14 remaining items

  17. added a commit that references this issue on Jul 3, 2026
    9204bca
  18. sebdanielsson commented on Jul 3, 2026

    @sebdanielsson

    FYI: For those of you having problem using Gemma 4 31B on vLLM with OpenCode. Updating vLLM to 0.24.0 and using the vLLM example template solved all of our issues.

  19. izogfif commented on Aug 9, 2026

    @izogfif

    FYI: For those of you having problem using Gemma 4 31B on vLLM with OpenCode. Updating vLLM to 0.24.0 and using the vLLM example template solved all of our issues.

    Any clue how to make DeepSeek v4 Flash 0731 work with streaming? It's the same issue there: corrupted tool calls. Both on vLLM and sglang (used latest dev nightly builds).

  20. sebdanielsson commented on Aug 10, 2026

    @sebdanielsson

    FYI: For those of you having problem using Gemma 4 31B on vLLM with OpenCode. Updating vLLM to 0.24.0 and using the vLLM example template solved all of our issues.

    Any clue how to make DeepSeek v4 Flash 0731 work with streaming? It's the same issue there: corrupted tool calls. Both on vLLM and sglang (used latest dev nightly builds).

    Haven't been able to test, as we're not allowed to deploy Chinese models at work, unfortunately...

  21. junwha commented on Aug 21, 2026

    @junwha

    @izogfif Use a litellm proxy

    model_list:
        -  model_name: deepseek-ai/DeepSeek-V4-Flash
           litellm_params:
                model: hosted_vllm/deepseek-ai/DeepSeek-V4-Flash-0731
                api_base: http://localhost:8000/v1
                api_key: dummy
    
  22. izogfif commented on Aug 28, 2026

    @izogfif

    @junwha

    Use a litellm proxy

    Does it generate fake / empty streaming tokens in response? Opencode has some kind of built-in timeout (around 300 seconds, I think). If it doesn't receive at least one streaming response token within that limit, it will consider API endpoint timed out and retry the request. And I often encounter situations when it takes more than 300 seconds to generate the full non-streaming response.
    Here is what Google AI told me but I'm not sure if it's true:

    While LiteLLM does have an internal "fake streaming" mechanism (MockResponsesAPIStreamingIterator) that translates a stream=true request into a non-streaming upstream call, it waits for the complete upstream non-streaming response to finish before it splits that response up into chunks and sends them back to your consumer. It does not proactively emit periodic "keep-alive" or empty filler tokens to the client while the upstream endpoint is still thinking.

    To prevent opencode from timing out while waiting for a slow non-streaming backend, you will need to intercept the request and handle the keeping-alive yourself.

    Sources :

  23. StroepWafel commented on Sep 24, 2026

    @StroepWafel

    +1

  24. opencodejr commented on Oct 29, 2026

    @opencodejr
    Contributor

    Thanks for the request, and to everyone who added their use cases. The ask is an option to have OpenCode send non-streaming requests (stream: false) to a provider or model. That would cover proxies and backends that can't stream, like the Credal OpenAI Proxy, and backends whose streamed output is broken.

    Right now OpenCode always streams model responses, including in v2, and there is no config setting to turn that off. Maintainers will consider adding one. Until then, the workaround people here have used is a small local proxy that sends stream: false upstream and re-wraps the response as SSE (for example the one linked above by @crashr).

    Related:

  25. neriousy commented on Nov 12, 2026

    @neriousy
    Member

    Thanks for the suggestion. This isn't something we plan to build, so closing to keep the tracker focused.

  26. poelzi commented on Nov 13, 2026

    @poelzi

    40 upvotes, dozens of +1, PRs that fix this....
    TBH, that is the way to move people away

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions