Skip to content

fix: suppress empty response warnings when finish reason is present#347

Closed
chrisnestrud wants to merge 5 commits intocecli-dev:v0.95.9from
chrisnestrud:fix/empty-response-handling-in-streaming-mode
Closed

fix: suppress empty response warnings when finish reason is present#347
chrisnestrud wants to merge 5 commits intocecli-dev:v0.95.9from
chrisnestrud:fix/empty-response-handling-in-streaming-mode

Conversation

@chrisnestrud
Copy link
Copy Markdown

No description provided.

Co-authored-by: aider-ce (synthetic/hf:MiniMaxAI/MiniMax-M2)
@dwash96
Copy link
Copy Markdown
Collaborator

dwash96 commented Jan 1, 2026

Can we extract these/perform this operation in side of the consolidate_chunks method on the coder class and add to the output tuple. I kind of want to keep the nitty gritty of LiteLLMs response structure as separated as we can

@dwash96 dwash96 changed the base branch from main to v0.92.0 January 1, 2026 21:51
@dwash96 dwash96 changed the base branch from v0.92.0 to v0.92.1 January 3, 2026 00:21
Comment thread cecli/coders/base_coder.py Outdated
try:
asyncio.get_running_loop()
except RuntimeError:
return _run_sync()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this breaks the spirit of testing a code base by intentionally switching the behavior to accommodate the fact that the tests are not initializing a real environment

Comment thread cecli/coders/base_coder.py Outdated
self.consolidate_chunks()
response, _, _, response_meta = self.consolidate_chunks()

completion_choice = None
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is duplicated, because response_meta already contains all of this right?

Move the empty-response detection out of the streaming code paths and into consolidate_chunks metadata so both synchronous and streaming sends share the same finish_reason/content/tool-call bookkeeping. Also drop the sync-only show_send_output_stream wrapper so we no longer change runtime behavior for tests.
@dwash96 dwash96 changed the base branch from v0.92.1 to v0.95.9 January 8, 2026 02:24
@dwash96
Copy link
Copy Markdown
Collaborator

dwash96 commented Jan 17, 2026

Addressing this in 0.96.0

@dwash96 dwash96 closed this Jan 17, 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