Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

602 B
Raw Blame
// Require the server's authored error category and the actual failure report.
// Report text alone does not establish why the run failed.
const PAYMENT_REQUIRED_MESSAGE = 'The LLM provider cannot process this request within its current billing or usage limits.';

function isProviderUsageLimitReport(content, errorMessage) {
    return typeof content === 'string' &&
        errorMessage === PAYMENT_REQUIRED_MESSAGE &&
        /^\s*(?:\u26a0\ufe0f?\s*)?Research Failed(?:\s|$)/u.test(content) &&
        content.includes(PAYMENT_REQUIRED_MESSAGE);
}

module.exports = { isProviderUsageLimitReport };