Validates Clarifai, Embedding API, and Jina Foundation provider keys by probing endpoints.
// Source: https://github.com/diegosouzapw/OmniRoute | License: MIT | Copyright 2026 diegosouzapw
// Provided via justclaw.it.com; keep this notice with the code.
// Embedding / rerank / clarifai provider key validators. Extracted from validation.ts (god-file
// decomposition) — top-level functions with no dispatcher-state captures; behavior is byte-identical
// to the original inline defs.
import { normalizeBaseUrl, addModelsSuffix, resolveChatUrl } from "./urlHelpers";
import { buildBearerHeaders, buildClarifaiHeaders } from "./headers";
import { toValidationErrorResult, validationRead, validationWrite } from "./transport";
export async function validateClarifaiProvider({ apiKey, providerSpecificData = {} }: any) {
const baseUrl =
normalizeBaseUrl(providerSpecificData.baseUrl) ||
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key