Package com.tnsai.llm.fallback
package com.tnsai.llm.fallback
-
ClassDescriptionSealed predicate over an
LLMExceptiondescribing when aLLMFallbackRuleshould fire (issue #89).Always matches — the catch-all "last resort" condition.Logical AND/OR over child conditions.Match when the failure's classifiedLLMException.ErrorTypeis in the configured set.Match when the upstream HTTP status (fromProviderDetails) is in the configured set.Match when the failure originated from the named provider AND its native error code (from theProviderDetailsenvelope) is in the configured set.Thrown by anLLMFallbackChainwhen every eligible target has been tried and none succeeded (issue #89).One try against one chain target.AnLLMClientthat wraps a primary plus a list ofLLMFallbackRules, transparently routing failed calls to the first matching, not-cooling-down fallback target (issue #89).Fluent configurator.One entry in anLLMFallbackChain: a targetLLMClientto try, theFallbackConditionthat gates it, and an optional cooldown window (issue #89).