Repository navigation
Sherlock 3.0.6
AI search failures now say what went wrong.
Until now a failed AI search said "AI search unavailable. Try again, rephrase your description, or use a normal search." When the real cause was an account out of credit, rephrasing could never help and finding out meant reading the server log.
The provider already explains why it refused, so that reason is passed on as one of six causes: credit exhausted, API key rejected, rate limited, model unavailable to the account, request timed out, or the previous generic line for anything else. The message names the cause without exposing the key or provider internals.
The search page also shows the cause in the case where no query was translated — previously it appeared only after a translation succeeded and the search itself failed, which is the less likely half of the problem.
Covered by 10 new tests, including the overlapping cases: billing details also appears in quota messages and 429 also shows up in credit errors, so the more specific reading has to win.