Skip to content

feat: redesign LLM error panel and suppress duplicate log lines - #103

Merged
Brian Krabach (bkrabach) merged 8 commits into
mainfrom
feat/llm-error-display-v2
Feb 25, 2026
Merged

feat: redesign LLM error panel and suppress duplicate log lines#103
Brian Krabach (bkrabach) merged 8 commits into
mainfrom
feat/llm-error-display-v2

Conversation

@bkrabach

Copy link
Copy Markdown
Collaborator

Phase 2 of LLM error display improvements:

  • Redesigned display_llm_error() panel: compact provider / model line (no labels), extracted human-readable message from JSON, raw details section below separator
  • New LLMErrorLogFilter suppresses duplicate [PROVIDER] * API error: and Execution failed: console lines — users now see only the Rich panel
  • 228/228 tests pass (25 display tests rewritten + 7 new log filter tests)

🤖 Generated with Amplifier

Co-Authored-By: Amplifier 240397093+microsoft-amplifier@users.noreply.github.com

Add a Rich panel formatter for LLM errors to the CLI's error_display
module. Handles RateLimitError (yellow panel with retry-after and tips),
AuthenticationError, ContextLengthError, ContentFilterError, and generic
LLMError (red panels with actionable guidance).

Matches the existing display_validation_error() pattern: accepts any
Exception, returns True if handled as LLMError, False otherwise.
Truncates long error messages to ~200 chars and supports verbose=True
for traceback output.

Includes 17 tests covering all error types, truncation, verbose mode,
and non-LLMError pass-through.

🤖 Generated with [Amplifier](https://github.com/microsoft/amplifier)

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
Add except LLMError handlers to both interactive_chat() and
execute_single() so that LLM errors (especially RateLimitError) are
caught and displayed with friendly Rich panels via display_llm_error()
instead of falling through to the generic Exception handler.

- Import LLMError from amplifier_core.llm_errors
- Import display_llm_error from .ui.error_display
- REPL handler: catch LLMError between ModuleValidationError and Exception
- Single-shot handler: catch LLMError with JSON output path (matching
  the ModuleValidationError pattern) and Rich panel display path

🤖 Generated with [Amplifier](https://github.com/microsoft/amplifier)

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
🤖 Generated with Amplifier

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
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.

1 participant