Skip to content

Is there a way to disable streaming mode? #785

Open

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. 10 remaining items

  17. Snowy117 commented on Jun 3, 2026

    @Snowy117

    +1

  18. trufae commented on Jun 3, 2026

    @trufae
    Contributor

    +1

  19. sebdanielsson commented on Jun 8, 2026

    @sebdanielsson

    Hitting this too. For us streaming isn't just unsupported, it corrupts output. Our self-hosted vLLM (Gemma 4 31B) backend has a streaming-only tool-call parser bug that duplicates characters in large tool-call arguments (file contents in write/edit): <html → <<htmlhtml. The identical request with stream:false is clean. So every edit OpenCode makes comes back garbled and it loops re-writing the file.

    Setting options.streaming: false in the provider config has no effect (v1.15.13). It looks like the field isn't consumed at runtime (related: #5674, and the buildParams() hardcoded stream:true noted in #24815). Our only workaround is a local proxy that forces stream:false upstream and re-serialises the response as SSE.

    Requesting a respected per-provider/per-model option to disable streaming, e.g.:

    "provider": {
      "vllm": {
        "npm": "@ai-sdk/openai-compatible",
        "options": { "baseURL": "…", "streaming": false },
        "models": { "…": {} }
      }
    }

    so it actually sends stream:false to the provider. This unblocks both providers that can't stream and providers whose streaming output is broken.

  20. added a commit that references this issue on Jul 3, 2026
    9204bca
  21. 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.

  22. 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).

  23. 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...

  24. 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
    
  25. 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 :

  26. crashr commented on Aug 28, 2026

    @crashr

    Reminder: https://github.com/crashr/llama-stream could be a workaround.

  27. StroepWafel commented on Sep 24, 2026

    @StroepWafel

    +1

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