{"record":{"id":"0f6c089b3e03688b","repo":"ruvnet/ruflo","slug":"only-openai-endpoint-type-is-supported-in-this-b","errorCode":null,"errorMessage":"Only 'openai' endpoint type is supported in this build","messagePattern":"Only 'openai' endpoint type is supported in this build","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"ruflo/src/ruvocal/src/lib/server/models.ts","lineNumber":140,"sourceCode":"\t...m,\n\tchatPromptRender: await getChatPromptRender(m),\n\tid: m.id || m.name,\n\tdisplayName: m.displayName || m.name,\n\tpreprompt: m.prepromptUrl ? await fetch(m.prepromptUrl).then((r) => r.text()) : m.preprompt,\n\tparameters: { ...m.parameters, stop_sequences: m.parameters?.stop },\n\tunlisted: m.unlisted ?? false,\n});\n\nconst addEndpoint = (m: Awaited<ReturnType<typeof processModel>>) => ({\n\t...m,\n\tgetEndpoint: async (): Promise<Endpoint> => {\n\t\tif (!m.endpoints || m.endpoints.length === 0) {\n\t\t\tthrow new Error(\"No endpoints configured. This build requires OpenAI-compatible endpoints.\");\n\t\t}\n\t\t// Only support OpenAI-compatible endpoints in this build\n\t\tconst endpoint = m.endpoints[0];\n\t\tif (endpoint.type !== \"openai\") {\n\t\t\tthrow new Error(\"Only 'openai' endpoint type is supported in this build\");\n\t\t}\n\t\treturn await endpoints.openai({ ...endpoint, model: m });\n\t},\n});\n\ntype InternalProcessedModel = Awaited<ReturnType<typeof addEndpoint>> & {\n\tisRouter: boolean;\n\thasInferenceAPI: boolean;\n};\n\nconst inferenceApiIds: string[] = [];\n\nconst getModelOverrides = (): ModelOverride[] => {\n\tconst overridesEnv = (Reflect.get(config, \"MODELS\") as string | undefined) ?? \"\";\n\n\tif (!overridesEnv.trim()) {\n\t\treturn [];\n\t}","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/ruflo/src/ruvocal/src/lib/server/models.ts#L122-L158","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\n\"endpoints\": [{ \"type\": \"hf_inference\", \"model\": \"meta-llama/Llama-3.1-8B-Instruct\" }]\n\n// after\n\"endpoints\": [{\n\t\"type\": \"openai\",\n\t\"baseURL\": \"https://router.huggingface.co/v1\",\n\t\"completion\": \"chat_completions\"\n}]","handlingStrategy":"validation","validationCode":"const SUPPORTED = new Set([\"openai\"]);\nfor (const m of modelsRaw) {\n\tconst bad = m.endpoints?.filter((e) => !SUPPORTED.has(e.type)) ?? [];\n\tif (bad.length) throw new Error(`Unsupported endpoint type(s) ${bad.map((e) => e.type).join(\",\")} on ${m.id}`);\n}","typeGuard":"function isOpenAiEndpoint(e: { type: string }): boolean {\n\treturn e.type === \"openai\";\n}\n\nfunction isServableModel(m: { endpoints?: { type: string }[] }): boolean {\n\treturn (m.endpoints?.length ?? 0) > 0 && m.endpoints!.every(isOpenAiEndpoint);\n}","tryCatchPattern":null,"preventionTips":["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"],"tags":["models","endpoints","openai","unsupported-type","configuration"],"backgroundTag":"unsupported-endpoint-type","analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}