ruvnet/ruflo · error
Only 'openai' endpoint type is supported in this build
Error message
Only 'openai' endpoint type is supported in this build
What it means
Even when a model has endpoints, this build only implements the "openai" endpoint type. getEndpoint() checks endpoints[0].type and throws on anything else (models.ts:140) — endpoint families from upstream huggingface/chat-ui ("hf_inference", "anthropic", "vertex", "tgi", …) are not compiled into this OpenAI-only build.
Solutions
- Change the endpoint type to "openai" and point baseURL at an OpenAI-compatible gateway for that provider (most providers expose one)
- Remove the unsupported endpoint entry so the default OPENAI_BASE_URL endpoint applies
- Grep MODELS/config for non-openai type values and fix them all at once
- Add a startup validation that rejects models whose endpoints[0].type !== "openai" so they never reach the picker
Example fix
// before
"endpoints": [{ "type": "hf_inference", "model": "meta-llama/Llama-3.1-8B-Instruct" }]
// after
"endpoints": [{
"type": "openai",
"baseURL": "https://router.huggingface.co/v1",
"completion": "chat_completions"
}] Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED = new Set(["openai"]);
for (const m of modelsRaw) {
const bad = m.endpoints?.filter((e) => !SUPPORTED.has(e.type)) ?? [];
if (bad.length) throw new Error(`Unsupported endpoint type(s) ${bad.map((e) => e.type).join(",")} on ${m.id}`);
} Type guard
function isOpenAiEndpoint(e: { type: string }): boolean {
return e.type === "openai";
}
function isServableModel(m: { endpoints?: { type: string }[] }): boolean {
return (m.endpoints?.length ?? 0) > 0 && m.endpoints!.every(isOpenAiEndpoint);
} Prevention
- Grep incoming configs for non-openai endpoint types before deploy
- Front non-OpenAI providers with an OpenAI-compatible gateway and use type "openai"
- Add a CI schema check that rejects model configs with unsupported endpoint types
When it happens
Trigger: A MODELS override (or imported model config) carrying "endpoints": [{ "type": "hf_inference" | "anthropic" | "tgi" | ... }]; the model appears in the picker and fails the moment a generation requests its endpoint.
Common situations: Porting model YAML/JSON from huggingface/chat-ui or another fork that supports many provider types; renaming providers after an upstream refactor; copy-pasting an example config from incompatible docs.
Related errors
- No endpoints configured. This build requires…
- Invalid completion type
- No models available to select task model
- OPENAI_BASE_URL not set
- agents must have ≥1 entry
AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18).
Data as JSON: /api/errors/0f6c089b3e03688b.
Report an issue: GitHub.
Appendix: source
Thrown at ruflo/src/ruvocal/src/lib/server/models.ts:140
...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[] => {
const overridesEnv = (Reflect.get(config, "MODELS") as string | undefined) ?? "";
if (!overridesEnv.trim()) {
return [];
}View on GitHub (pinned to fa13ee4ad6)