Skip to content

fix(llm): force non-streaming OpenAI-compatible calls - #1482

Closed
jiangyq9 wants to merge 1 commit into
Graphify-Labs:v8from
jiangyq9:fix/openai-compat-stream-false
Closed

jiangyq9 wants to merge 1 commit into
Graphify-Labs:v8from
jiangyq9:fix/openai-compat-stream-false

Conversation

@jiangyq9

Copy link
Copy Markdown
Contributor

Summary

  • pass stream: False on OpenAI-compatible chat completion calls
  • add regression coverage that captures the request kwargs

Fixes #1223

Testing

  • python -m pytest tests/test_llm_backends.py -k "openai_compat or ollama_extra_body or non_ollama_backend"

@safishamsi

Copy link
Copy Markdown
Member

Thanks @jiangyq9 — verified safe (nothing in llm.py ever consumes a stream; every result is read as resp.choices[0]). Landed on v8 in 666093f with your authorship. Maintainer fix on top: applied the same stream: False to the second OpenAI-compatible call site (_call_llm, used by the --dedup-llm tiebreaker), which had the identical bug. Closing as merged-by-port.

@safishamsi safishamsi closed this Jun 27, 2026
safishamsi pushed a commit that referenced this pull request Jun 27, 2026
Some OpenAI-compatible gateways default to SSE streaming when `stream` is omitted,
but graphify always reads the result as a single resp.choices[0]. The call would
then fail against those gateways. Pass `stream: False` explicitly.

Ported from PR #1482 by @jiangyq9 (covers the extraction dispatch path,
_call_openai_compat). Maintainer fix on top: applied the same `stream: False` to
the second OpenAI-compatible call site, _call_llm, which feeds the --dedup-llm
tiebreaker and had the identical bug.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
PerryLin-0420 pushed a commit to PerryLin-0420/graphify-decouple that referenced this pull request Aug 13, 2026
…bs#1223)

Some OpenAI-compatible gateways default to SSE streaming when `stream` is omitted,
but graphify always reads the result as a single resp.choices[0]. The call would
then fail against those gateways. Pass `stream: False` explicitly.

Ported from PR Graphify-Labs#1482 by @jiangyq9 (covers the extraction dispatch path,
_call_openai_compat). Maintainer fix on top: applied the same `stream: False` to
the second OpenAI-compatible call site, _call_llm, which feeds the --dedup-llm
tiebreaker and had the identical bug.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
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.

OpenAI-compatible backends: allow forcing stream:false (gateways that stream on omission break the SDK)

2 participants