Skip to content

fix(coder): Ollama-friendly empty LLM tool warning#538

Merged
dwash96 merged 1 commit into
cecli-dev:v0.100.2from
Digital-Defiance:fix/empty-llm-ollama-warning
May 30, 2026
Merged

fix(coder): Ollama-friendly empty LLM tool warning#538
dwash96 merged 1 commit into
cecli-dev:v0.100.2from
Digital-Defiance:fix/empty-llm-ollama-warning

Conversation

@JessicaMulein
Copy link
Copy Markdown

Summary

Replace legacy “Check your provider account?” tool warnings when the model returns no tokens or tool calls. Ollama/local models get a timeout/context hint; cloud models keep an API-keys/quota message.

Scope

  • One file: cecli/coders/base_coder.py (empty_llm_tool_warning())
  • Cherry-picked from integration work (818f046ca on dev-integration)

Why

BrightVision already rewrites this in the React UI; this aligns tool_output / terminal paths for local LLM dogfood.

Test plan

  • pytest (or CI) on fork
  • Optional: trigger empty Ollama reply in headless session and confirm warning text

PR Summary by Typo

Overview

This PR refines the warning message displayed when an LLM returns an empty response, making it more informative and specific, especially for users interacting with local Ollama models.

Key Changes

  • Added a new method empty_llm_tool_warning to base_coder.py to generate context-specific warning messages.
  • The warning message now differentiates between Ollama models (suggesting timeouts, unloads, or context limits) and other LLMs (suggesting API key, quota, or provider issues).
  • Updated calls to self.io.tool_warning in show_send_output and show_send_output_stream to utilize the new dynamic warning message.

Work Breakdown

Category Lines Changed
New Work 10 (83.3%)
Rework 2 (16.7%)
Total Changes 12
To turn off PR summary, please visit Notification settings.

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced error messaging for empty AI model responses with intelligent, provider-specific guidance. Users now receive tailored hints appropriate to their model configuration, helping troubleshoot issues more effectively.

Review Change Stack

Replace legacy "provider account" copy when the model returns no tokens
or tool calls; keep cloud-oriented hint for non-Ollama models.

Co-authored-by: Cursor <cursoragent@cursor.com>
@dwash96 dwash96 changed the base branch from main to v0.100.2 May 30, 2026 19:15
@dwash96 dwash96 merged commit dfc1f7c into cecli-dev:v0.100.2 May 30, 2026
12 checks passed
@dwash96 dwash96 mentioned this pull request May 31, 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