Module exposing: normalizeModelSupportedEndpoints, classifyModelSupportedEndpoints, defaultEndpointsForProviderNodeApiType, MODEL_SUPPORTED_ENDPOINT_VALUES
// Source: https://github.com/cmahmud/LLM-Router | License: MIT | Copyright 2026 diegosouzapw
// Provided via justclaw.it.com; keep this notice with the code.
export const MODEL_SUPPORTED_ENDPOINT_VALUES = [
"chat",
"embeddings",
"rerank",
"images",
"videos",
"audio-speech",
"audio-transcriptions",
"images-generations",
// Persisted legacy values remain valid input and normalize on write/edit.
"video",
"audio",
] as const;
export type ModelSupportedEndpoint = (typeof MODEL_SUPPORTED_ENDPOINT_VALUES)[number];
export function normalizeModelSupportedEndpoints(endpoints: readonly string[]): string[] {
const normalized: string[] = [];
const add = (endpoint: string) => {
if (!normalized.includes(endpoint)) normalized.push(endpoint);
};
for (const endpoint of
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key