ruvnet/ruflo · error · Error
No endpoints configured. This build requires OpenAI-compatib
Error message
No endpoints configured. This build requires OpenAI-compatible endpoints.
What it means
Thrown by the getEndpoint closure created in addEndpoint (models.ts) when a processed model has no endpoints array or an empty one. chat-ui's OpenAI-only build requires every model to resolve to an OpenAI-compatible endpoint at call time; buildModels normally injects endpoints:[{type:'openai', baseURL}] for every upstream model, so this throws when a MODELS override or a manually-constructed ProcessedModel (e.g. the router alias) ends up with no endpoints.
Source
Thrown at ruflo/src/ruvocal/src/lib/server/models.ts:135
return parts.join("\n\n");
};
}
const processModel = async (m: ModelConfig) => ({
...m,
chatPromptRender: await getChatPromptRender(m),
id: m.id || m.name,
displayName: m.displayName || m.name,
preprompt: m.prepromptUrl ? await fetch(m.prepromptUrl).then((r) => r.text()) : m.preprompt,
parameters: { ...m.parameters, stop_sequences: m.parameters?.stop },
unlisted: m.unlisted ?? false,
});
const addEndpoint = (m: Awaited<ReturnType<typeof processModel>>) => ({
...m,
getEndpoint: async (): Promise<Endpoint> => {
if (!m.endpoints || m.endpoints.length === 0) {
throw new Error("No endpoints configured. This build requires OpenAI-compatible endpoints.");
}
// Only support OpenAI-compatible endpoints in this build
const endpoint = m.endpoints[0];
if (endpoint.type !== "openai") {
throw new Error("Only 'openai' endpoint type is supported in this build");
}
return await endpoints.openai({ ...endpoint, model: m });
},
});
type InternalProcessedModel = Awaited<ReturnType<typeof addEndpoint>> & {
isRouter: boolean;
hasInferenceAPI: boolean;
};
const inferenceApiIds: string[] = [];
const getModelOverrides = (): ModelOverride[] => {View on GitHub (pinned to 6b01dc5a68)
Solutions
- Ensure each MODELS override entry either omits endpoints (so the default OpenAI endpoint is inherited) or explicitly provides endpoints: [{type:'openai', baseURL: '...'}].
- Audit overrides for accidental endpoints: [] or endpoints set to a non-array.
- If you need a non-OpenAI backend, switch to a build that supports additional endpoint types.
Example fix
// before (MODELS env)
[{"id":"my-model","displayName":"My Model","endpoints":[]}]
// after
[{"id":"my-model","displayName":"My Model"}]
// or explicit:
[{"id":"my-model","endpoints":[{"type":"openai","baseURL":"https://router.huggingface.co/v1"}]}] Defensive patterns
Strategy: validation
Validate before calling
function modelsHaveEndpoints(models: { endpoints?: unknown }[]): boolean {
return models.every((m) => Array.isArray(m.endpoints) && m.endpoints.length > 0);
}
// before assigning MODELS env, ensure no entry strips endpoints to []. Type guard
function hasOpenAiEndpoint(m: { endpoints?: { type?: string }[] }): boolean {
return Array.isArray(m.endpoints) && m.endpoints.length > 0 && m.endpoints[0]?.type === "openai";
} Try / catch
try { const ep = await model.getEndpoint(); }
catch (e) {
if (e instanceof Error && /No endpoints configured/.test(e.message)) {
// fall back to default OpenAI endpoint or remove model from the registry
return endpoints.openai({ type: "openai", baseURL: openaiBaseUrl, model });
}
throw e;
} Prevention
- In MODELS overrides, either omit endpoints (inherit the default OpenAI endpoint) or set endpoints:[{type:'openai', baseURL:'...'}].
- Never set endpoints:[] in an override.
- Add a config lint step that rejects overrides with empty/non-openai endpoint arrays in this build.
When it happens
Trigger: A MODELS override entry that explicitly sets endpoints: [] (or omits endpoints while also removing the default); a model constructed by another code path (router alias, custom plugin) that did not populate endpoints; calling model.getEndpoint() on such a model during a chat completion.
Common situations: Migration from a chat-ui config that relied on 'tgi'/'aws'/'anthropic' endpoints that this OpenAI-only build ignores; hand-edited MODELS env that strips endpoints; a model override that sets only display fields and clobbers the inherited endpoints via spread semantics.
Related errors
- Only 'openai' endpoint type is supported in this build
- OPENAI_BASE_URL not set
- Failed to fetch ${baseURL}/models: ${response.status} ${resp
- Failed to load any models from upstream
- User token not found
AI-assisted analysis of ruvnet/ruflo@6b01dc5a68 (2026-08-12).
Data as JSON: /api/errors/07894dab46da43a9.
Report an issue: GitHub.