Mintplex-Labs/anything-llm · warning · RetryError
error.message
Error message
error.message
What it means
GiteeAiProvider.stream() catch (giteeai.js:84-95) rethrows RateLimitError/InternalServerError/APIError as RetryError(error.message) and logs via console.error; AuthenticationError is rethrown. This is the Gitee AI (Serverless OpenAI-compatible) provider.
Source
Thrown at server/utils/agents/aibitat/providers/giteeai.js:91
try {
return await tooledStream(
this.client,
this.model,
messages,
functions,
eventHandler,
{ provider: this }
);
} catch (error) {
console.error(error.message, error);
if (error instanceof OpenAI.AuthenticationError) throw error;
if (
error instanceof OpenAI.RateLimitError ||
error instanceof OpenAI.InternalServerError ||
error instanceof OpenAI.APIError
) {
throw new RetryError(error.message);
}
throw error;
}
}
async complete(messages, functions = []) {
const useNative = this.supportsNativeToolCalling();
if (!useNative) {
return await UnTooled.prototype.complete.call(
this,
messages,
functions,
this.#handleFunctionCallChat.bind(this)
);
}
try {View on GitHub (pinned to 526360e320)
Solutions
- Verify the Gitee AI API key and base path configuration.
- Confirm the model id is in Gitee AI's catalog.
- Lower request rate / add backoff for 429s.
- Let the AIbitat retry loop handle transient 5xx.
- Reproduce with curl to capture the exact upstream message.
Defensive patterns
Strategy: retry
Validate before calling
if (!process.env.GITEE_AI_API_KEY && !process.env.GITEEAI_API_KEY)
throw new Error("Gitee AI API key is not set."); Try / catch
const { RetryError } = require("./server/utils/agents/aibitat/error.js");
try {
return await provider.stream(messages, functions, handler);
} catch (e) {
if (e instanceof RetryError && attempt < MAX) {
await new Promise((r) => setTimeout(r, 1000 * attempt));
return await provider.stream(messages, functions, handler);
}
throw e;
} Prevention
- Confirm the Gitee AI key and base path at startup.
- Pick a model id from Gitee AI's catalog before the first call.
- Let RetryError flow to the framework's retry loop.
- Reproduce persistent failures with curl to see the raw upstream error.
When it happens
Trigger: Gitee AI returns 429, 5xx, or a non-auth APIError during a streaming tooled completion.
Common situations: Gitee AI free-tier rate limits, a wrong model id, an expired/invalid token surfaced as APIError, or upstream Gitee AI maintenance.
Related errors
AI-assisted analysis of Mintplex-Labs/anything-llm@526360e320 (2026-08-13).
Data as JSON: /api/errors/50397d474155271c.
Report an issue: GitHub.