feat: redesign LLM error panel and suppress duplicate log lines - #103
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 2 of LLM error display improvements:
display_llm_error()panel: compactprovider / modelline (no labels), extracted human-readable message from JSON, raw details section below separatorLLMErrorLogFiltersuppresses duplicate[PROVIDER] * API error:andExecution failed:console lines — users now see only the Rich panel🤖 Generated with Amplifier
Co-Authored-By: Amplifier 240397093+microsoft-amplifier@users.noreply.github.com