Handle flaky LLM provider errors gracefully instead of crashing
503/overloaded/timeout/rate-limit errors from any LLM provider now yield
a user-readable inline message with a retry suggestion and a Settings link,
instead of "Fatal Orchestration Error". Real code bugs still get the full
fault log and error display.

- architect.py: add _is_provider_error() classifier; split except branch
  between provider outages (warning + friendly message) and code faults
  (error log + fatal display); _call_llm re-raises provider errors instead
  of swallowing them to None
- general.py: preserve original exception type after retries exhausted
  instead of wrapping everything in RuntimeError; auth errors raised as
  litellm.AuthenticationError so the classifier handles them correctly

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent be8b63f commit e99b16ec42a1b32173196e0e4cdf8016943a27fd
@axieyangb axieyangb authored 11 days ago
Showing 2 changed files
View
ai-hub/app/core/orchestration/architect.py
View
ai-hub/app/core/providers/llm/general.py