First Error Message Expansion Catalogue: Provider Interfaces - #394
Merged
Conversation
… error formatting and cataloguing. Add immediate aborting of AUTH/CREDIT/QUOTA/MODEL/BLOCKED/BAD_REQUEST errors instead of silent retries.
…tant + Fix Chat persistency
…ge gen, video gen, factory + plan migration to actions, browser_adapter, CLI commands
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.
What
Why
Before this change, every AI feature (vision, image gen, video gen, embeddings) generated its own error messages by hand. That meant duplicated wording/errors, inconsistent detail, and no way for the UI to reliably tell "your API key is wrong" apart from "the provider is down" apart from "try again" because the error was just a loose string, not a typed category. This is the first part of the error-catalogue work: last week I built the shared classifier, while this pass extends it to the provider interfaces (LLM, VLM, image gen, video gen, embedding, etc.) so that a fix or wording improvement to one error type now applies everywhere at once instead of needing to be copy-pasted into five files. Actions, browser adapter, CLI, and frontend toasts are left for a follow-up. This first PR is focused on provider interfaces and is large enough as it is.
How to test
python -m pytest tests/test_error_catalog.py tests/test_llm_error_classification.py tests/test_error_presentation_tiers.py tests/test_llm_fail_fast.py tests/test_error_category_sync.py -q. All should pass.Example:
RuntimeError: Gemini client was not initialised.Provider not configured. Gemini client was not initialised. Check LLM configuration, API credentials, and service availability.(tagged as a "config" error, so the UI can offer an "Open Settings" action instead of just showing red text)