Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions cecli/coders/base_coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -2306,6 +2306,16 @@ async def check_tokens(self, messages):
def get_active_model(self):
return self.main_model

def empty_llm_tool_warning(self) -> str:
"""Ollama-friendly copy for local models; cloud hint otherwise."""
name = str(getattr(getattr(self, "main_model", None), "name", "") or "")
if "ollama" in name.lower():
return (
"Empty response from the local model (Ollama). "
"The model may have timed out, unloaded, or hit context limits."
)
return "Empty response received from LLM. Check API keys, quota, or provider status."

async def send_message(self, inp):
# Notify IO that LLM processing is starting
self.io.llm_started()
Expand Down Expand Up @@ -3363,7 +3373,7 @@ async def show_send_output(self, completion):
and not len(self.partial_response_tool_calls)
and not len(self.partial_response_reasoning_content)
):
self.io.tool_warning("Empty response received from LLM. Check your provider account?")
self.io.tool_warning(self.empty_llm_tool_warning())

self.io.assistant_output(show_resp, pretty=self.show_pretty())

Expand Down Expand Up @@ -3520,7 +3530,7 @@ async def show_send_output_stream(self, completion):
return

if not received_content and len(self.partial_response_tool_calls) == 0:
self.io.tool_warning("Empty response received from LLM. Check your provider account?")
self.io.tool_warning(self.empty_llm_tool_warning())

def consolidate_chunks(self):
if self.partial_response_consolidated:
Expand Down
Loading