danny-avila/LibreChat · error · Error
No endpoint provided
Error message
No endpoint provided
What it means
filterFile() throws this at process.js:1336 when endpoint is missing from req.body on a non-avatar upload. The endpoint field (e.g. 'openAI', 'azureOpenAI', 'assistants') drives which endpointFileConfig is selected for size/type limits via getEndpointFileConfig. Without it the service cannot choose the correct policy, so it refuses the upload.
Source
Thrown at api/server/services/Files/process.js:1337
function filterFile({ req, image, isAvatar }) {
const { file } = req;
const { endpoint, endpointType, file_id, width, height } = req.body;
if (!file_id && !isAvatar) {
throw new Error('No file_id provided');
}
if (file.size === 0) {
throw new Error('Empty file uploaded');
}
/* parse to validate api call, throws error on fail */
if (!isAvatar) {
isUUID.parse(file_id);
}
if (!endpoint && !isAvatar) {
throw new Error('No endpoint provided');
}
const appConfig = req.config;
const fileConfig = mergeFileConfig(appConfig.fileConfig);
const endpointFileConfig = getEndpointFileConfig({
endpoint,
fileConfig,
endpointType,
});
const fileSizeLimit =
isAvatar === true ? fileConfig.avatarSizeLimit : endpointFileConfig.fileSizeLimit;
if (file.size > fileSizeLimit) {
throw new Error(
`File size limit of ${fileSizeLimit / megabyte} MB exceeded for ${
isAvatar ? 'avatar upload' : `${endpoint} endpoint`
}`,View on GitHub (pinned to 5ff282f900)
Solutions
- Include endpoint in the upload body, set to the active conversation endpoint key.
- Verify the value matches an endpoint registered in your librechat.yaml / fileConfig endpoints.
- If you intended an avatar upload, ensure isAvatar semantics are used via the /files/avatar route, not /files.
Example fix
// before
form.append('file_id', id);
// after
form.append('file_id', id);
form.append('endpoint', currentEndpoint); // e.g. 'openAI' Defensive patterns
Strategy: validation
Validate before calling
const VALID_ENDPOINTS = ['openAI','azureOpenAI','bingAI','chatGPTBrowser','anthropic','google','assistants','gptPlugins'];
function assertEndpoint(body) {
if (!VALID_ENDPOINTS.includes(body.endpoint)) {
throw new Error(`endpoint missing or unknown: ${body.endpoint}`);
}
} Type guard
const hasEndpoint = (body) => typeof body?.endpoint === 'string' && body.endpoint.length > 0;
Prevention
- Derive endpoint from the active conversation and attach it in the same helper that sets file_id.
- Keep a single source of truth for endpoint keys shared between client and server.
When it happens
Trigger: POST /api/files or POST /api/files/images whose body omits endpoint, or sends it under endpointType only. The check fires after file_id and UUID validation pass, so you only reach it for otherwise well-formed payloads.
Common situations: Client refactored to send only the model name and dropped the endpoint field. A new endpoint value that the client derives at runtime but fails to set on a particular screen. Avatar uploads are exempt, so misclassifying a non-avatar call as an avatar call also surfaces this elsewhere.
Related errors
- No file_id provided
- File size limit of ${fileSizeLimit / megabyte} MB exceeded f
- Unsupported file type
- Empty file uploaded
- No width provided
AI-assisted analysis of danny-avila/LibreChat@5ff282f900 (2026-08-12).
Data as JSON: /api/errors/b591d3c09db9465f.
Report an issue: GitHub.