@juspay/neurolink
Version:
The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002
583 lines (582 loc) • 34.2 kB
JSON
{
"$schema": "./provider-rules.schema.json",
"id": "descriptors",
"descriptors": [
{
"name": "bedrock",
"defaultHealthSweepPriority": 5,
"autoSelectPreference": 7,
"aliases": ["aws"],
"credentialsKey": "bedrock",
"envVars": {
"apiKey": "AWS_ACCESS_KEY_ID",
"extraRequired": ["AWS_SECRET_ACCESS_KEY"],
"model": "BEDROCK_MODEL"
},
"defaultModel": "",
"toolSupport": "native",
"localRuntime": false,
"healthCheck": "env-only",
"setupUrl": "https://console.aws.amazon.com/iam/",
"timeouts": {
"generateMs": 45000,
"streamMs": 120000
},
"autoSelectPriority": 7,
"apiKeyFormat": "bedrock",
"credentialsResolvedExternally": true,
"notes": {
"credentialsResolvedExternally": "Falls back to the AWS SDK's own default credential chain (shared profile, IAM role) when these env vars are absent — see field JSDoc.",
"liveStatusCheck": "Status probes are billable generate() calls signed with ambient AWS credentials, against models the account may not be allowed to call, so they are never made."
},
"liveStatusCheck": false
},
{
"name": "openai",
"defaultHealthSweepPriority": 4,
"autoSelectPreference": 3,
"aliases": ["gpt", "chatgpt"],
"credentialsKey": "openai",
"envVars": {
"apiKey": "OPENAI_API_KEY",
"baseURL": "OPENAI_BASE_URL"
},
"defaultModel": "gpt-4o-mini",
"toolSupport": "native",
"wire": "openai-chat",
"localRuntime": false,
"healthCheck": "models-probe",
"setupUrl": "https://platform.openai.com/api-keys",
"timeouts": {
"generateMs": 30000,
"streamMs": 120000
},
"autoSelectPriority": 5,
"apiKeyFormat": "openai"
},
{
"name": "openai-compatible",
"aliases": ["vllm", "compatible"],
"credentialsKey": "openaiCompatible",
"envVars": {
"apiKey": "OPENAI_COMPATIBLE_API_KEY",
"baseURL": "OPENAI_COMPATIBLE_BASE_URL",
"model": "OPENAI_COMPATIBLE_MODEL"
},
"defaultModel": "",
"toolSupport": "native",
"wire": "openai-chat",
"localRuntime": false,
"healthCheck": "env-only"
},
{
"name": "openrouter",
"aliases": ["or"],
"credentialsKey": "openrouter",
"envVars": {
"apiKey": "OPENROUTER_API_KEY",
"baseURL": "OPENROUTER_BASE_URL",
"model": "OPENROUTER_MODEL"
},
"defaultModelFrom": "openrouter",
"toolSupport": "model-dependent",
"wire": "openai-chat",
"localRuntime": false,
"healthCheck": "env-only",
"setupUrl": "https://openrouter.ai/keys"
},
{
"name": "vertex",
"defaultHealthSweepPriority": 1,
"autoSelectPreference": 5,
"aliases": ["googleVertex"],
"credentialsKey": "vertex",
"envVars": {
"apiKey": "GOOGLE_CLOUD_PROJECT_ID",
"fallbacks": [
"VERTEX_PROJECT_ID",
"GOOGLE_VERTEX_PROJECT",
"GOOGLE_CLOUD_PROJECT"
],
"extraRequired": ["GOOGLE_APPLICATION_CREDENTIALS"],
"extraRequiredFallbacks": [
"GOOGLE_APPLICATION_CREDENTIALS_NEUROLINK",
"GOOGLE_SERVICE_ACCOUNT_KEY",
["GOOGLE_AUTH_CLIENT_EMAIL", "GOOGLE_AUTH_PRIVATE_KEY"]
]
},
"defaultModel": "claude-sonnet-4-6",
"toolSupport": "native",
"localRuntime": false,
"healthCheck": "env-only",
"setupUrl": "https://console.cloud.google.com/",
"timeouts": {
"generateMs": 60000,
"streamMs": 120000
},
"autoSelectPriority": 3,
"credentialsResolvedExternally": true,
"notes": {
"envVars.apiKey": "\"apiKey\" here names the primary identity env var, not a secret — Vertex's real auth is the extraRequired file-or-individual-creds check below. See checkVertexAuthentication() in providerHealth.ts.",
"envVars.extraRequiredFallbacks": "GOOGLE_APPLICATION_CREDENTIALS_NEUROLINK is checked with higher priority than GOOGLE_APPLICATION_CREDENTIALS by the real gating logic (hasGoogleCredentials() in googleVertex/client.ts and googleVertex/utils.ts) — corrected here vs. the plan snippet, which omitted it. GOOGLE_AUTH_CLIENT_EMAIL and GOOGLE_AUTH_PRIVATE_KEY are nested together because hasGoogleCredentials() only accepts them as a pair — either alone is not valid auth, unlike the other flat entries here which are each independently sufficient.",
"credentialsResolvedExternally": "OR-of-multiple-auth-paths (file / individual fields / base64 key) — not a flat AND-list of required env vars. See field JSDoc."
}
},
{
"name": "anthropic",
"defaultHealthSweepPriority": 3,
"autoSelectPreference": 4,
"aliases": ["claude"],
"credentialsKey": "anthropic",
"envVars": {
"apiKey": "ANTHROPIC_API_KEY",
"fallbacks": [
"ANTHROPIC_OAUTH_TOKEN",
"CLAUDE_OAUTH_TOKEN",
"ANTHROPIC_OAUTH_ACCESS_TOKEN"
],
"baseURL": "ANTHROPIC_BASE_URL"
},
"defaultModelFrom": "anthropic",
"toolSupport": "native",
"localRuntime": false,
"healthCheck": "env-only",
"setupUrl": "https://console.anthropic.com/settings/keys",
"timeouts": {
"generateMs": 60000,
"streamMs": 120000
},
"autoSelectPriority": 6,
"apiKeyFormat": "anthropic"
},
{
"name": "azure",
"defaultHealthSweepPriority": 6,
"autoSelectPreference": 8,
"aliases": ["azureOpenai"],
"credentialsKey": "azure",
"envVars": {
"apiKey": "AZURE_OPENAI_API_KEY",
"extraRequired": ["AZURE_OPENAI_ENDPOINT"],
"model": "AZURE_MODEL",
"modelFallbacks": [
"AZURE_OPENAI_MODEL",
"AZURE_OPENAI_DEPLOYMENT",
"AZURE_OPENAI_DEPLOYMENT_ID"
]
},
"defaultModel": "gpt-4o-mini",
"toolSupport": "native",
"wire": "openai-chat",
"localRuntime": false,
"healthCheck": "env-only",
"setupUrl": "https://portal.azure.com/",
"timeouts": {
"generateMs": 30000,
"streamMs": 120000
},
"autoSelectPriority": 8,
"apiKeyFormat": "azure"
},
{
"name": "google-ai",
"defaultHealthSweepPriority": 2,
"autoSelectPreference": 6,
"aliases": ["googleAiStudio", "google", "gemini", "google-ai-studio"],
"credentialsKey": "googleAiStudio",
"envVars": {
"apiKey": "GOOGLE_AI_API_KEY",
"fallbacks": ["GOOGLE_GENERATIVE_AI_API_KEY"],
"baseURL": "GOOGLE_AI_BASE_URL"
},
"defaultModelFrom": "gemini",
"toolSupport": "native",
"localRuntime": false,
"healthCheck": "env-only",
"setupUrl": "https://aistudio.google.com/apikey",
"timeouts": {
"generateMs": 60000,
"streamMs": 120000
},
"autoSelectPriority": 4,
"apiKeyFormat": "google-ai"
},
{
"name": "ollama",
"defaultHealthSweepPriority": 8,
"autoSelectPreference": 2,
"aliases": ["local"],
"credentialsKey": "ollama",
"envVars": {
"baseURL": "OLLAMA_BASE_URL",
"baseURLFallbacks": ["OLLAMA_API_BASE"],
"model": "OLLAMA_MODEL",
"optional": true
},
"defaultModelFrom": "ollama",
"toolSupport": "model-dependent",
"wire": "openai-chat",
"localRuntime": true,
"healthCheck": "models-probe",
"setupUrl": "https://ollama.com/download",
"timeouts": {
"generateMs": 300000,
"streamMs": 120000
},
"autoSelectPriority": 2,
"notes": {
"(descriptor)": "HuggingFace migrated to the JSON catalog (catalog/huggingface.json) — its descriptor is now derived by buildCatalogDescriptors() below.",
"hooks": "ollama.serviceDiagnostic checks the local service and the pulled model before a call; ollama.streamToolGate turns tools off on stream() for models the model configuration marks as tool-less.",
"availabilityProbe": "Availability is asked of the running service, for the model in envVars.model or defaultModel, instead of read from environment variables."
},
"hooks": ["ollama.serviceDiagnostic", "ollama.streamToolGate"],
"availabilityProbe": "service"
},
{
"name": "litellm",
"defaultHealthSweepPriority": 7,
"autoSelectPreference": 1,
"aliases": [],
"credentialsKey": "litellm",
"envVars": {
"apiKey": "LITELLM_API_KEY",
"baseURL": "LITELLM_BASE_URL",
"model": "LITELLM_MODEL",
"optional": true
},
"defaultModel": "openai/gpt-4o-mini",
"toolSupport": "native",
"wire": "openai-chat",
"localRuntime": false,
"healthCheck": "models-probe",
"setupUrl": "https://docs.litellm.ai/docs/proxy/quick_start",
"timeouts": {
"generateMs": 300000,
"streamMs": 120000
},
"autoSelectPriority": 1,
"credentialsResolvedExternally": true,
"notes": {
"(descriptor)": "Mistral migrated to the JSON catalog (catalog/mistral.json, which now carries timeouts/autoSelectPriority/apiKeyFormat/setup.url matching this removed block exactly) — its descriptor is derived by buildCatalogDescriptors() below like deepseek's.",
"credentialsResolvedExternally": "Documented zero-config local proxy — see field JSDoc.",
"availabilityProbe": "Availability is asked of the running service, for the model in envVars.model or defaultModel, instead of read from environment variables."
},
"availabilityProbe": "service"
},
{
"name": "sagemaker",
"aliases": ["aws-sagemaker"],
"credentialsKey": "sagemaker",
"envVars": {
"apiKey": "AWS_ACCESS_KEY_ID",
"extraRequired": ["AWS_SECRET_ACCESS_KEY"],
"model": "SAGEMAKER_MODEL",
"modelFallbacks": [
"SAGEMAKER_MODEL_NAME",
"SAGEMAKER_DEFAULT_ENDPOINT",
"SAGEMAKER_ENDPOINT_NAME"
],
"baseURL": "SAGEMAKER_ENDPOINT"
},
"defaultModel": "sagemaker-model",
"toolSupport": "native",
"localRuntime": false,
"healthCheck": "live-generate",
"setupUrl": "https://console.aws.amazon.com/iam/",
"apiKeyFormat": "aws",
"notes": {
"healthCheck": "Deliberate: SageMaker has no models-list endpoint, so a live minimal generate() call is the only real reachability check (mirrors providerUtils.isProviderAvailable()'s legacy fallback).",
"liveStatusCheck": "Status probes are billable generate() calls signed with ambient AWS credentials, against models the account may not be allowed to call, so they are never made."
},
"liveStatusCheck": false
},
{
"name": "nvidia-nim",
"aliases": ["nvidia", "nim"],
"credentialsKey": "nvidiaNim",
"envVars": {
"apiKey": "NVIDIA_NIM_API_KEY",
"baseURL": "NVIDIA_NIM_BASE_URL",
"model": "NVIDIA_NIM_MODEL"
},
"defaultModel": "openai/gpt-oss-20b",
"toolSupport": "native",
"wire": "openai-chat",
"localRuntime": false,
"healthCheck": "env-only",
"setupUrl": "https://build.nvidia.com/settings/api-keys",
"notes": {
"(descriptor)": "DeepSeek migrated to the JSON catalog (catalog/deepseek.json) — its descriptor is now derived by buildCatalogDescriptors() below, with no exclusion needed (unlike mistral): every field it derives matches this block byte-for-byte (credentialsKey, envVars, defaultModel, toolSupport, setupUrl), so removing the hand entry changes nothing observable."
}
},
{
"name": "lm-studio",
"aliases": ["lmstudio", "lms"],
"credentialsKey": "lmStudio",
"envVars": {
"baseURL": "LM_STUDIO_BASE_URL",
"model": "LM_STUDIO_MODEL",
"optional": true
},
"defaultModel": "",
"toolSupport": "native",
"wire": "openai-chat",
"localRuntime": true,
"healthCheck": "env-only",
"setupUrl": "https://lmstudio.ai/"
},
{
"name": "llamacpp",
"aliases": ["llama.cpp", "llama-cpp"],
"credentialsKey": "llamacpp",
"envVars": {
"baseURL": "LLAMACPP_BASE_URL",
"model": "LLAMACPP_MODEL",
"optional": true
},
"defaultModel": "",
"toolSupport": "native",
"wire": "openai-chat",
"localRuntime": true,
"healthCheck": "env-only",
"setupUrl": "https://github.com/ggerganov/llama.cpp"
},
{
"name": "cohere",
"aliases": [],
"credentialsKey": "cohere",
"envVars": {
"apiKey": "COHERE_API_KEY",
"baseURL": "COHERE_BASE_URL",
"model": "COHERE_MODEL"
},
"defaultModel": "command-r-plus-08-2024",
"toolSupport": "native",
"wire": "openai-chat",
"localRuntime": false,
"healthCheck": "env-only",
"setupUrl": "https://dashboard.cohere.com/api-keys"
},
{
"name": "replicate",
"aliases": [],
"credentialsKey": "replicate",
"envVars": {
"apiKey": "REPLICATE_API_TOKEN",
"model": "REPLICATE_MODEL"
},
"defaultModel": "meta/meta-llama-3-70b-instruct",
"toolSupport": "none",
"localRuntime": false,
"healthCheck": "env-only",
"setupUrl": "https://replicate.com/account/api-tokens",
"notes": {
"envVars": "NOTE: Replicate's NeurolinkCredentials shape uses non-standard field names (apiToken not apiKey, baseUrl not baseURL) — envVars below still describes the *environment variable* names, which follow the usual convention; only the credentials object's field names differ."
}
},
{
"name": "voyage",
"aliases": ["voyage-ai"],
"credentialsKey": "voyage",
"envVars": {
"apiKey": "VOYAGE_API_KEY",
"baseURL": "VOYAGE_BASE_URL",
"model": "VOYAGE_MODEL"
},
"defaultModel": "voyage-3.5",
"toolSupport": "none",
"localRuntime": false,
"healthCheck": "env-only",
"setupUrl": "https://dash.voyageai.com/api-keys"
},
{
"name": "jina",
"aliases": ["jina-ai"],
"credentialsKey": "jina",
"envVars": {
"apiKey": "JINA_API_KEY",
"baseURL": "JINA_BASE_URL",
"model": "JINA_MODEL"
},
"defaultModel": "jina-embeddings-v3",
"toolSupport": "none",
"localRuntime": false,
"healthCheck": "env-only",
"setupUrl": "https://jina.ai/?sui=apikey"
},
{
"name": "stability",
"aliases": ["stability-ai", "sd"],
"credentialsKey": "stability",
"envVars": {
"apiKey": "STABILITY_API_KEY",
"baseURL": "STABILITY_BASE_URL",
"model": "STABILITY_MODEL"
},
"defaultModel": "stable-image-ultra",
"toolSupport": "none",
"localRuntime": false,
"healthCheck": "env-only",
"setupUrl": "https://platform.stability.ai/account/keys"
},
{
"name": "ideogram",
"aliases": [],
"credentialsKey": "ideogram",
"envVars": {
"apiKey": "IDEOGRAM_API_KEY",
"baseURL": "IDEOGRAM_BASE_URL",
"model": "IDEOGRAM_MODEL"
},
"defaultModel": "V_3",
"toolSupport": "none",
"localRuntime": false,
"healthCheck": "env-only",
"setupUrl": "https://developer.ideogram.ai/"
},
{
"name": "recraft",
"aliases": [],
"credentialsKey": "recraft",
"envVars": {
"apiKey": "RECRAFT_API_KEY",
"baseURL": "RECRAFT_BASE_URL",
"model": "RECRAFT_MODEL"
},
"defaultModel": "recraftv3",
"toolSupport": "none",
"localRuntime": false,
"healthCheck": "env-only",
"setupUrl": "https://www.recraft.ai/api"
},
{
"name": "typesafe",
"aliases": ["jev", "typesafe-ai"],
"credentialsKey": "typesafe",
"envVars": {
"apiKey": "TYPESAFE_API_KEY",
"fallbacks": ["AI_GATEWAY_API_KEY"],
"baseURL": "TYPESAFE_BASE_URL",
"model": "TYPESAFE_MODEL"
},
"defaultModel": "jev-latest",
"inferenceKinds": ["decide"],
"decideOrder": 1,
"toolSupport": "none",
"localRuntime": false,
"healthCheck": "env-only",
"timeouts": {
"decideMs": 5000
},
"decisionLimits": {
"maxStateTokens": 33000,
"advisory": true
},
"setupUrl": "https://console.typesafe.ai/keys",
"notes": {
"envVars.fallbacks": "A Vercel AI Gateway key reaches the same model through a different transport, so it satisfies this provider on its own. Listing it here is what makes `resolveDefaultDecisionProvider()` — and therefore \"if somebody sets the key, we start using it\" — true for gateway users who never hold a TypeSafe key at all.",
"inferenceKinds": "Jev serves only the `decide` inference type. Declaring that here is what keeps it out of every generation code path, rather than each of those having to special-case the provider name.",
"toolSupport": "It emits no text, so it cannot call tools and cannot answer a \"live-generate\" health probe.",
"timeouts": "Deliberately NO autoSelectPriority / autoSelectPreference / defaultHealthSweepPriority: all three feed generation fallback chains, and a text-less provider must never be reachable from them.",
"decisionLimits": "ADVISORY, not enforced: Jev's server refuses an over-limit request itself (measured by bisection — a 33,002-token state accepted, 33,003 rejected), so this row exists for `decisionLimits()` to report, and the pre-flight check skips it. Refusing locally would turn a measured server ceiling into a client one that drifts from it silently. The number mirrors TYPESAFE_MAX_STATE_TOKENS in providers/typesafe.ts (which cannot be imported here without a provider → descriptor cycle); the decide suite pins the two equal. No question COUNT cap has been measured — 400 questions beside a near-ceiling state were accepted — because TypeSafe bounds a request by tokens (TYPESAFE_MAX_REQUEST_TOKENS, 64K on state plus all questions), not by count."
}
},
{
"name": "perplexity-decider",
"aliases": [],
"credentialsKey": "perplexityDecider",
"envVars": {
"apiKey": "PERPLEXITY_API_KEY",
"baseURL": "PERPLEXITY_DECIDER_BASE_URL",
"model": "PERPLEXITY_DECIDER_MODEL"
},
"defaultModel": "pplx-decider-v1-27b",
"inferenceKinds": ["decide"],
"decideOrder": 5,
"toolSupport": "none",
"localRuntime": false,
"healthCheck": "env-only",
"timeouts": {
"decideMs": 10000
},
"decisionLimits": {
"maxStateTokens": 100000,
"maxQuestions": 128,
"nonAsciiTokensPerChar": 0.5,
"media": {
"maxImages": 8,
"video": false,
"maxRequestBytes": 33554432
}
},
"setupUrl": "https://console.perplexity.ai",
"notes": {
"(descriptor)": "Decision precedence is decideOrder, not position: typesafe 1, laya 2 and xor 3 (from catalog/laya.json and catalog/xor.json), subq 4 (from catalog/subq.json), perplexity-decider 5, cloudflare-clef 6, openai-decisions 7 (catalog/openai-decisions.json) and scaledown 8 (catalog/scaledown.json). resolveDefaultDecisionProvider() returns the first configured DECISION_PROVIDERS entry in that order, so a host configured for several keeps Jev for every built-in consumer and reaches the others only by naming them. Renumbering silently changes which model routes, compacts and plans for every such host. perplexity-decider, cloudflare-clef and openai-decisions come after subq because each shares its environment key with a text provider: a key set only for that text provider must not displace a decision provider a host set up on purpose. subq is ahead of them only because SUBQ_API_KEY belongs to no other provider. scaledown is last by the owner's decision of 2026-10-15, not by that rule: SCALEDOWN_API_KEY belongs to no other provider either, so an ambient OPENAI_API_KEY, PERPLEXITY_API_KEY or Cloudflare pair outranks a ScaleDown key a host set on purpose, and ScaleDown is reached by naming it.",
"envVars.apiKey": "The same key the `perplexity` text provider reads, so an ambient PERPLEXITY_API_KEY configures this provider too. Its decideOrder (5) sits after XOR's (3) and SubQ's (4), which have keys of their own, which is what keeps that from displacing any other decision provider a host has configured.",
"envVars.baseURL": "Optional: the API is hosted at a public endpoint, so a key alone is enough and there is no extraRequired.",
"inferenceKinds": "Serves only `decide`, like the other decision providers — the one declaration that keeps it out of every generation code path, and out of the way of the `perplexity` text provider.",
"timeouts": "Deliberately NO autoSelectPriority / autoSelectPreference / defaultHealthSweepPriority, for the same reason as TypeSafe above. Measured live: 4s at 65,000 input tokens, 10s at 146,000 and 23s at 251,000 (faster than linear: about 17,000, 15,000 and 11,000 tokens a second), plus about 65 ms for each question after the first (128 minimal questions took 8.9s). 10s is the allowance for the state and covers every one the window below admits except log text or number arrays close to it; the provider adds 100 ms a question on top, so a request at the 128-question cap waits about 22.8s. A larger state passes a per-call `timeoutMs`.",
"decisionLimits": "The server reads 262,144 input tokens in all and answers an over-long request with an explicit 400, never a silent truncation. The state, the questions and the images were all measured to count toward it, an image at one token for each 32 x 32 tile. The window below is deliberately lower: a state of 100,000 tokens takes about 7s of the 10s above (interpolated from those points), and a much larger one would outlast it and be retried into the same wait. The estimate is about four characters per token. Measured on 40,000-character samples: English prose 4.3, TypeScript 3.8, a minified JSON catalog 3.4, log lines with timestamps and ids 1.35 and arrays of numbers 1.2. Only the last two run low enough to pass the window and still be refused by the server; JSON is under-counted by about 13%. A request over the window fails locally as max_tokens_exceeded, which every consumer treats as \"carry on as before\". 128 questions is the documented cap, confirmed live. Non-ASCII text is charged at the measured rate for CJK (0.46 tokens per code point) and Devanagari (0.44), not for emoji (2.6), because an over-charge silently shuts every non-Latin caller out while an under-charge is caught by that 400.",
"decisionLimits.media": "Images only; the API has no video input. A ninth image in one request is refused with a 400, and the 32 MiB body is the documented cap."
}
},
{
"name": "cloudflare-clef",
"aliases": [],
"credentialsKey": "cloudflareClef",
"envVars": {
"apiKey": "CLOUDFLARE_API_KEY",
"extraRequired": ["CLOUDFLARE_ACCOUNT_ID"],
"extraRequiredCredentialFields": {
"CLOUDFLARE_ACCOUNT_ID": "accountId"
},
"baseURL": "CLOUDFLARE_CLEF_BASE_URL",
"model": "CLOUDFLARE_CLEF_MODEL"
},
"defaultModel": "clef",
"inferenceKinds": ["decide"],
"decideOrder": 6,
"toolSupport": "none",
"localRuntime": false,
"healthCheck": "env-only",
"timeouts": {
"decideMs": 5000
},
"decisionLimits": {
"maxStateTokens": 16000,
"maxQuestions": 64,
"nonAsciiTokensPerChar": 1.5,
"digitTokensPerChar": 1,
"symbolTokensPerChar": 0.75,
"astralTokensPerChar": 3,
"media": {
"maxImages": 4,
"video": false,
"maxRequestBytes": 256000
}
},
"setupUrl": "https://dash.cloudflare.com/profile/api-tokens",
"notes": {
"envVars.apiKey": "The same token and account id the `cloudflare` text provider reads, so ambient Workers AI settings configure this provider too. Its place in the decision order (see the comment above) keeps that from displacing TypeSafe, Laya, XOR or SubQ.",
"envVars.extraRequired": "Cloudflare's own API is the endpoint, so a base URL is optional; but the path carries the account id, so a token alone is useless. Both are required for it to count as configured, from the environment or from credentials.cloudflareClef.",
"inferenceKinds": "Serves only `decide`, like the other decision providers — the one declaration that keeps it out of every generation code path, and out of the way of the `cloudflare` text provider.",
"timeouts": "Deliberately NO autoSelectPriority / autoSelectPreference / defaultHealthSweepPriority, for the same reason as TypeSafe above. Measured 2026-10-03: 0.3 to 1.0 s for a small request, 1.1 s for 64 questions on clef-flash and 1.3 s on clef, and 2.2 s at most for any of 60 requests sent at once. On 2026-10-04, 64 questions took 1.5 s (flash) / 2.3 s (clef). 5s covers a small request and keeps a fail-open consumer from waiting on a stuck call. The state adds time, so the provider adds 250 ms for each full 1,000 estimated state tokens (9s at the limit below). Measured 2026-10-07 at about 0.2 s per 1,000 input tokens from 50,000 tokens up on both models (clef-flash 4.9 s at 52,154 tokens, clef 11.8 s, clef-flash 19.2 s at 86,819 and 30.9 s at 158,153), and 1.7 to 1.9 s at 20,954 tokens.",
"decisionLimits": "On 2026-10-03 and 2026-10-04 the Workers AI endpoint ignored state text past about 2,048 tokens (hosted service or model: unknown), and the local limit was 1,500. On 2026-10-07 it no longer did: clef-flash read a fact at the very end of a 190,153-token digit array and of an 86,819-token prose state, and clef read a 52,154-token prose state, while clef answered HTTP 529 (code 5012, \"Clef inference failed\") after 15 s for the digit array. The limit is now 16,000 estimated tokens. The estimate runs 35% over real tokens for prose and 14% under for a digit array, whose commas cost a token each, so the limit is at most about 18,400 real tokens, 2.8 times less than the 52,154 clef read in full. It also bounds how long a fail-open consumer can wait (the timeout above). The service changed twice in four days, so live canaries 19.10 and 19.10b read a fact at the end of a state at this limit on both models. Digits cost 1, ASCII symbols 0.75, BMP non-ASCII 1.5 and astral characters 3: the rates now approximate real tokens and no longer stand for a cut. The 2026-10-04 follow-up on the old cut (logs, number lists, digit arrays and compact JSON on both models; natural Chinese, Japanese, Korean and Hindi prose and emoji-rich English on clef; a many-key object) is in the guide; it explains where the rates come from, not what limit applies now.",
"decisionLimits.media": "Images only. Exactly four tiny images succeeded and five were refused on both models. image/jpg also succeeded and is normalized to JPEG. The 256,000-byte cap on the whole encoded body is NeuroLink's own and is the same for both models. It is well below what the service takes with images, since the 413/code 5021 gate does not count them (2026-10-24: bodies of up to 1.17 MB, images included, passed it on clef-flash). It is not below clef-flash's edge for the text: the estimate is the characters of the JSON without `images`, over four, and the refusal is past twice the window the message prints (24,576 for clef-flash, so 196,608 characters; 65,536 for clef, so 524,288). That is checked on the text alone, per model, in cloudflareClef.ts, 1,024 characters short of the edge. A text that large is out of reach of the state limit below except through the questions or control characters, which JSON writes as up to six characters each, so the margin costs a caller nothing. History: on 2026-10-04 both models accepted 520,000 text characters and refused 525,000 with 413/code 5021 (the window was then 65,536 for both). On 2026-10-03, clef-flash accepted 262,000 and refused 270,000. The threshold had moved from 65,527 accepted / 67,527 refused to 130,026 / 131,276 (clef) and 130,027 / 131,277 (flash) in a day, and the window of clef-flash has since fallen to 24,576 (by 2026-10-20), which moved its edge to 196,608. On 2026-10-05 both models accepted PNG bodies up to 492,485 bytes and refused 532,505 (flash) and 532,499 (clef) with the same 413, whose estimate (133,126) was the whole body over four, images included, which they no longer are. The old 195/202 KB boundary is historical. See the guide for exact model and date coverage."
}
}
],
"descriptorNotes": {
"scope": "Identity, credentials, defaults and runtime classification of every provider that is not a catalog entry. Catalog providers get theirs from src/lib/providers/catalog/*.json. providerDescriptors.ts reads this file; the order here is the order of PROVIDER_DESCRIPTORS.",
"apiKeyFormat": "A key into credentials.json apiKeyFormats.",
"wire": "openai-chat marks the providers built on the shared Chat Completions base (catalog providers get it from providerDescriptors.ts). The runCore collect path covers exactly these providers.",
"defaultModelFrom": "Take the default model from that rules file's defaultModel, so it is written once.",
"traitLists": "Labels the MCP provider report shows. Lists, not descriptor fields, so they can name catalog providers too. openWeights: providers that serve open-weight models; LM Studio and llama.cpp were missing from the hand-written check. noTextOutput: embedding and image providers; the report says they do not stream, without changing the inference kinds that the fallback chain and the health sweep read.",
"hooks": "Named code hooks, as <provider>.<hook>. Shared code asks whether a descriptor lists a hook instead of comparing provider names."
},
"traitLists": {
"costEfficient": ["google-ai", "vertex", "huggingface", "ollama"],
"openWeights": ["huggingface", "ollama", "lm-studio", "llamacpp"],
"noTextOutput": ["voyage", "jina", "stability", "ideogram", "recraft"]
}
}