Skip to content

First Error Message Expansion Catalogue: Provider Interfaces - #394

Merged
zfoong merged 6 commits into
livingui-redesignfrom
improvement/error-message
Aug 4, 2026
Merged

First Error Message Expansion Catalogue: Provider Interfaces#394
zfoong merged 6 commits into
livingui-redesignfrom
improvement/error-message

Conversation

@makiroll1125

Copy link
Copy Markdown
Collaborator

What

  • Wired the VLM, embeddings, image/video generation, and model-factory interfaces into the shared error catalogue introduced last week, so provider failures (bad key, no credits, rate limits, safety blocks, etc.) are classified the same way everywhere instead of each interface inventing its own wording.
  • Fixed a bug where a mistyped error-classifier call was silently crashing the prompt-enhance feature on every failure.
  • Removed a 2,500-line dead duplicate of the old LLM interface that was still carrying the pre-catalogue error handling.

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

  • Run 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.
  • Manually trigger a real failure and confirm it now shows a clean, categorized message instead of a raw exception dump
    Example:
  • Before: RuntimeError: Gemini client was not initialised.
  • After: 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)

@makiroll1125 makiroll1125 added feature New feature or request priority: medium Improvement Optimization and improvement over existing feature labels Aug 3, 2026
@zfoong
zfoong merged commit 28bd09c into livingui-redesign Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request Improvement Optimization and improvement over existing feature priority: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants