UNPKG

@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

612 lines (611 loc) • 25.1 kB
{ "$schema": "./provider-rules.schema.json", "id": "limits", "contextWindows": { "nvidia-nim": { "_default": 128000, "meta/llama-3.3-70b-instruct": 128000, "meta/llama-3.1-405b-instruct": 128000, "meta/llama-3.1-70b-instruct": 128000, "meta/llama-3.2-90b-vision-instruct": 128000, "meta/llama-3.2-11b-vision-instruct": 128000, "nvidia/llama-3.3-nemotron-super-49b-v1": 128000, "nvidia/llama-3.1-nemotron-nano-8b-v1": 128000, "nvidia/llama-3.1-nemotron-70b-instruct": 128000, "deepseek-ai/deepseek-r1": 128000, "deepseek-ai/deepseek-r1-distill-llama-70b": 128000, "mistralai/mixtral-8x22b-instruct-v0.1": 65536, "mistralai/mixtral-8x7b-instruct-v0.1": 32768, "microsoft/phi-4": 16384, "google/gemma-3-27b-it": 8192, "openai/gpt-oss-20b": 131072 }, "lm-studio": { "_default": 8192 }, "llamacpp": { "_default": 8192 }, "cohere": { "_default": 128000, "command-r-plus": 128000, "command-r": 128000, "command-r7b-12-2024": 128000 }, "replicate": { "_default": 32768 }, "voyage": { "_default": 32000, "voyage-4": 32000, "voyage-4-large": 32000, "voyage-4-lite": 32000, "voyage-code-4": 32000, "voyage-3.5": 32000, "voyage-3.5-lite": 32000, "voyage-3-large": 32000, "voyage-code-3": 32000, "voyage-finance-2": 32000, "voyage-law-2": 16000, "voyage-multilingual-2": 32000 }, "jina": { "_default": 8192, "jina-embeddings-v3": 8192, "jina-embeddings-v2-base-en": 8192, "jina-embeddings-v2-small-en": 8192, "jina-colbert-v2": 32000 }, "stability": { "_default": 2000 }, "ideogram": { "_default": 2000 }, "recraft": { "_default": 2000 }, "anthropic": { "_default": 200000, "claude-opus-5-5": 1000000, "claude-sonnet-5-5": 1000000, "claude-fable-5-1": 1000000, "claude-sonnet-5": 1000000, "claude-opus-5": 1000000, "claude-fable-5": 1000000, "claude-opus-4-8": 1000000, "claude-opus-4-7": 1000000, "claude-opus-4-6": 1000000, "claude-sonnet-4-6": 1000000, "claude-opus-4-5-20251101": 200000, "claude-sonnet-4-5-20250929": 200000, "claude-haiku-4-5-20251001": 200000, "claude-opus-4-1-20250805": 200000, "claude-opus-4-20250514": 200000, "claude-sonnet-4-20250514": 200000, "claude-3-7-sonnet-20250219": 200000, "claude-3-5-sonnet-20241022": 200000, "claude-3-5-haiku-20241022": 200000, "claude-3-opus-20240229": 200000, "claude-3-sonnet-20240229": 200000, "claude-3-haiku-20240307": 200000 }, "openai": { "_default": 128000, "gpt-6-astra": 1050000, "gpt-6-sol": 1050000, "gpt-6-luna": 1050000, "gpt-5.4": 1050000, "gpt-5.4-mini": 400000, "gpt-5.4-nano": 400000, "gpt-5.4-pro": 1050000, "gpt-5.3-codex": 400000, "gpt-5.2": 400000, "gpt-5.2-pro": 400000, "gpt-5.2-codex": 400000, "gpt-5.2-chat-latest": 128000, "gpt-5.1": 400000, "gpt-5.1-codex": 400000, "gpt-5.1-codex-max": 400000, "gpt-5.1-codex-mini": 400000, "gpt-5.1-chat-latest": 128000, "gpt-5": 400000, "gpt-5-mini": 400000, "gpt-5-nano": 400000, "gpt-5-pro": 400000, "gpt-5-codex": 400000, "gpt-5-chat-latest": 128000, "gpt-oss-120b": 128000, "gpt-oss-20b": 128000, "gpt-4.1": 1047576, "gpt-4.1-mini": 1047576, "gpt-4.1-nano": 1047576, "gpt-4o": 128000, "gpt-4o-mini": 128000, "o1": 200000, "o1-mini": 128000, "o1-pro": 200000, "o3": 200000, "o3-mini": 200000, "o3-pro": 200000, "o4-mini": 200000, "gpt-4-turbo": 128000, "gpt-4": 8192, "gpt-3.5-turbo": 16385 }, "google-ai": { "_default": 1048576, "gemini-4-hydrogen": 1048576, "gemini-4-neon": 1048576, "gemini-4-argon": 1048576, "gemini-4-carbon": 1048576, "gemini-3.8-flash": 1048576, "gemini-3.7-flash": 1048576, "gemini-3.6-flash": 1048576, "gemini-3.5-flash": 1048576, "gemini-3.5-flash-lite": 1048576, "gemini-3.1-flash-lite": 1048576, "gemini-robotics-er-2-preview": 131072, "gemini-flash-latest": 1048576, "gemini-flash-lite-latest": 1048576, "gemini-pro-latest": 1048576, "gemini-3.1-pro-preview": 1048576, "gemini-3.1-flash-lite-preview": 1048576, "gemini-3.1-flash-image-preview": 1048576, "gemini-3.1-pro-preview-customtools": 1048576, "gemini-3-flash-preview": 1048576, "gemini-3-pro-image-preview": 65536, "gemini-3-pro-preview": 1048576, "gemini-2.5-pro": 1048576, "gemini-2.5-flash": 1048576, "gemini-2.5-flash-lite": 1048576, "gemini-2.5-flash-image": 32768, "gemini-2.0-flash": 1048576, "gemini-1.5-pro": 2097152, "gemini-1.5-flash": 1048576 }, "vertex": { "_default": 1048576, "gemini-4-hydrogen": 1048576, "gemini-4-neon": 1048576, "gemini-4-argon": 1048576, "gemini-4-carbon": 1048576, "gemini-3.8-flash": 1048576, "gemini-3.7-flash": 1048576, "gemini-3.6-flash": 1048576, "gemini-3.5-flash": 1048576, "gemini-3.5-flash-lite": 1048576, "gemini-3.1-flash-lite": 1048576, "gemini-robotics-er-2-preview": 131072, "claude-opus-5-5": 1000000, "claude-sonnet-5-5": 1000000, "claude-fable-5-1": 1000000, "claude-sonnet-5": 1000000, "claude-opus-5": 1000000, "claude-fable-5": 1000000, "claude-opus-4-8": 1000000, "claude-opus-4-7": 1000000, "claude-opus-4-6": 1000000, "claude-sonnet-4-6": 1000000, "claude-sonnet-4-5": 200000, "claude-opus-4-5": 200000, "claude-haiku-4-5": 200000, "claude-sonnet-4": 200000, "claude-sonnet-4-20250514": 200000, "claude-opus-4-20250514": 200000, "claude-opus-4": 200000, "claude-": 200000, "gemini-3.1-pro-preview": 1048576, "gemini-3.1-flash-lite-preview": 1048576, "gemini-3.1-flash-image-preview": 1048576, "gemini-3.1-pro-preview-customtools": 1048576, "gemini-3-flash-preview": 1048576, "gemini-3-pro-image-preview": 65536, "gemini-3-pro-preview": 1048576, "gemini-2.5-pro": 1048576, "gemini-2.5-flash": 1048576, "gemini-2.0-flash": 1048576, "gemini-1.5-pro": 2097152, "gemini-1.5-flash": 1048576 }, "bedrock": { "_default": 200000, "anthropic.claude-opus-5-5": 1000000, "anthropic.claude-sonnet-5-5": 1000000, "anthropic.claude-fable-5-1": 1000000, "anthropic.claude-opus-4-6-v1": 1000000, "anthropic.claude-sonnet-4-6": 1000000, "anthropic.claude-opus-4-5-20251101-v1:0": 200000, "anthropic.claude-sonnet-4-5-20250929-v1:0": 200000, "anthropic.claude-haiku-4-5-20251001-v1:0": 200000, "anthropic.claude-opus-4-1-20250805-v1:0": 200000, "anthropic.claude-sonnet-4-20250514-v1:0": 200000, "anthropic.claude-3-7-sonnet-20250219-v1:0": 200000, "us.anthropic.claude-3-7-sonnet-20250219-v1:0": 200000, "anthropic.claude-3-5-sonnet-20241022-v1:0": 200000, "anthropic.claude-3-5-haiku-20241022-v1:0": 200000, "anthropic.claude-3-opus-20240229-v1:0": 200000, "anthropic.claude-3-sonnet-20240229-v1:0": 200000, "anthropic.claude-3-haiku-20240307-v1:0": 200000, "amazon.nova-pro-v1:0": 300000, "amazon.nova-lite-v1:0": 300000, "amazon.nova-2-lite-v1:0": 1000000, "writer.palmyra-x5-v1:0": 1000000, "writer.palmyra-x4-v1:0": 128000, "nvidia.nemotron-nano-3-30b": 256000 }, "azure": { "_default": 128000, "gpt-6-astra": 1050000, "gpt-6-sol": 1050000, "gpt-6-luna": 1050000, "gpt-5.6-sol": 1050000, "gpt-5.6-terra": 1050000, "gpt-5.6-luna": 1050000, "gpt-5.5": 1050000, "gpt-5.4": 1050000, "gpt-5.4-mini": 400000, "gpt-5.4-nano": 400000, "gpt-5.4-pro": 1050000, "gpt-5.2": 400000, "gpt-5.2-pro": 400000, "gpt-5.2-codex": 400000, "gpt-5.1": 400000, "gpt-5": 400000, "gpt-5-mini": 400000, "gpt-4.1": 1047576, "gpt-4.1-mini": 1047576, "gpt-4o": 128000, "gpt-4o-mini": 128000, "o3": 200000, "o3-mini": 200000, "o4-mini": 200000, "gpt-4-turbo": 128000, "gpt-4": 8192 }, "ollama": { "_default": 128000 }, "litellm": { "_default": 128000 }, "huggingface": { "_default": 32000 }, "sagemaker": { "_default": 128000, "nvidia-nemotron-3-nano-30b": 1000000, "qwen3-vl-8b-instruct": 32768 } }, "contextWindowNotes": { "replicate": { "_default": "Per-model — Replicate hosts arbitrary models; sensible default." }, "voyage": { "_default": "Voyage embeddings: max input tokens vary 16K-32K per model" }, "jina": { "_default": "Jina embeddings: 8K input tokens for v3; 8K for v2; 32K for ColBERT-v2" }, "stability": { "_default": "Image-gen — context is prompt length only; ~2000 char limit" }, "anthropic": { "claude-opus-5-5": "Claude 5.5 / 5.1 (Sep 2026) — 1M context window, confirmed on platform.claude.com/docs/en/about-claude/models/overview", "claude-sonnet-5": "Claude 5 (mid 2026) — 1M context window", "claude-opus-4-8": "Claude 4.7 / 4.8 — 1M context window (platform.claude.com/docs/en/models)", "claude-opus-4-6": "Claude 4.6 (Feb 2026) — 1M context window", "claude-opus-4-5-20251101": "Claude 4.5", "claude-opus-4-1-20250805": "Claude 4.x", "claude-3-7-sonnet-20250219": "Claude 3.x" }, "openai": { "gpt-6-astra": "GPT-6 family (Sep 2026) — 1.05M context, per developers.openai.com/api/docs/models", "gpt-5.4": "GPT-5.4 family — 1.05M context", "gpt-5.3-codex": "GPT-5.x family — 400K context", "gpt-oss-120b": "GPT Open Source", "gpt-4.1": "GPT-4.1 family — 1M context", "gpt-4o": "GPT-4o", "o1": "O-series reasoning — 200K context", "gpt-4-turbo": "Legacy" }, "google-ai": { "gemini-3.1-pro-preview": "Gemini 3.1 Series (all require -preview suffix)", "gemini-3-flash-preview": "Gemini 3 Series", "gemini-3-pro-preview": "@deprecated SHUT DOWN March 9, 2026. Migrate to gemini-3.1-pro-preview.", "gemini-3.8-flash": "inputTokenLimit and outputTokenLimit from the Google AI Studio models API (GET /v1beta/models), read 2026-11-30; each model also answered a live generate on this provider." }, "vertex": { "claude-opus-5-5": "Claude on Vertex", "claude-opus-5": "Placed before the 200K `claude-opus-4` prefix key below: the lookup takes the first prefix that matches, so a dated `claude-opus-4-8@...` id would otherwise land on 200K.", "claude-": "Catch-all for UNKNOWN Claude models on Vertex (prefix match runs after the specific keys above). Without this, an unlisted Claude model falls to the Gemini-shaped _default (1,048,576) — ABOVE Anthropic's real 1M API cap — so the pre-dispatch budget check and the in-loop context guard both under-guard it (the claude-sonnet-5 1,005,647-token 400s). 200K is the conservative Anthropic floor; list real models explicitly.", "gemini-3.1-pro-preview": "Gemini 3.1 on Vertex (all require -preview suffix)", "gemini-3-flash-preview": "Gemini 3 on Vertex", "gemini-3-pro-preview": "@deprecated SHUT DOWN March 9, 2026. Migrate to gemini-3.1-pro-preview.", "gemini-2.5-pro": "Gemini 2.x on Vertex", "gemini-3.8-flash": "Same limits as the Google AI Studio models API reports (read 2026-11-30); each model answered a live generate on Vertex (global). The -latest aliases are AI Studio only: Vertex answers 404." }, "bedrock": { "anthropic.claude-opus-5-5": "Claude 5.5 / 5.1 (Sep 2026)", "anthropic.claude-opus-4-6-v1": "Claude 4.6", "anthropic.claude-opus-4-5-20251101-v1:0": "Claude 4.5", "anthropic.claude-opus-4-1-20250805-v1:0": "Claude 4.1 / 4 — the AWS Bedrock model cards state 200K tokens", "anthropic.claude-3-7-sonnet-20250219-v1:0": "Claude legacy. AWS lists no model card for 3.7 Sonnet; 200K is the window of the same model in the Anthropic manifest. The `us.` id is its cross-region inference profile, the form tokens.ts keys its output cap by.", "amazon.nova-pro-v1:0": "Amazon Nova", "writer.palmyra-x5-v1:0": "Writer", "nvidia.nemotron-nano-3-30b": "NVIDIA" }, "azure": { "gpt-6-astra": "GPT-6 family (Sep 2026) — 1.05M context, per learn.microsoft.com/azure/ai-foundry/openai/concepts/models", "gpt-5.6-sol": "GPT-5.6 / GPT-5.5 — Azure-only as of Sep 2026, same 1.05M context", "gpt-5.4": "GPT-5.4", "gpt-5.2": "GPT-5.x", "gpt-4.1": "GPT-4.1", "gpt-4o": "GPT-4o", "o3": "O-series", "gpt-4-turbo": "Legacy" }, "sagemaker": { "nvidia-nemotron-3-nano-30b": "NVIDIA Nemotron 3 Nano (February 2026) — 1M context", "qwen3-vl-8b-instruct": "Qwen3 VL — 32K context" } }, "providerAliases": { "aws": "bedrock", "googleaistudio": "google-ai", "googleai": "google-ai", "lmstudio": "lm-studio", "llamacpp": "llamacpp", "nvidianim": "nvidia-nim", "nim": "nvidia-nim", "nvidia": "nvidia-nim", "deepseek": "deepseek" }, "outputTokenLimits": { "tables": { "ANTHROPIC": { "claude-sonnet-4-5-20250929": 8192, "claude-opus-4-5-20251101": 8192, "claude-haiku-4-5-20251001": 8192, "claude-3-5-sonnet-20241022": 4096, "claude-3-5-haiku-20241022": 4096, "claude-3-haiku-20240307": 4096, "claude-3-opus-20240229": 4096, "claude-3-sonnet-20240229": 4096, "default": 4096 }, "OPENAI": { "gpt-6-astra": 128000, "gpt-6-sol": 128000, "gpt-6-luna": 128000, "gpt-5.4": 128000, "gpt-5.4-mini": 128000, "gpt-5.4-nano": 128000, "gpt-5.4-pro": 128000, "gpt-4o": 16384, "gpt-4o-mini": 16384, "gpt-3.5-turbo": 4096, "gpt-4": 8192, "gpt-4-turbo": 4096, "o1-preview": 8192, "o1-mini": 8192, "default": 8192 }, "GOOGLE_AI": { "gemini-4-hydrogen": 65536, "gemini-4-neon": 65536, "gemini-4-argon": 32768, "gemini-4-carbon": 32768, "gemini-3.8-flash": 65536, "gemini-3.7-flash": 65536, "gemini-3.6-flash": 65536, "gemini-3.5-flash": 65536, "gemini-3.5-flash-lite": 65536, "gemini-3.1-flash-lite": 65536, "gemini-robotics-er-2-preview": 65536, "gemini-flash-latest": 65536, "gemini-flash-lite-latest": 65536, "gemini-pro-latest": 65536, "gemini-3.1-pro-preview": 8192, "gemini-3.1-flash-lite-preview": 65536, "gemini-3.1-flash-image-preview": 8192, "gemini-3.1-pro-preview-customtools": 8192, "gemini-3-flash-preview": 65536, "gemini-3-pro-image-preview": 8192, "gemini-3-pro-preview": 8192, "gemini-2.5-pro": 65536, "gemini-2.5-flash": 65536, "gemini-2.5-flash-lite": 65536, "gemini-2.0-flash-001": 8192, "gemini-2.0-flash-lite": 8192, "gemini-1.5-pro": 8192, "gemini-1.5-flash": 8192, "gemini-1.5-flash-lite": 8192, "default": 4096 }, "VERTEX": { "gemini-4-hydrogen": 65536, "gemini-4-neon": 65536, "gemini-4-argon": 32768, "gemini-4-carbon": 32768, "gemini-3.8-flash": 65536, "gemini-3.7-flash": 65536, "gemini-3.6-flash": 65536, "gemini-3.5-flash": 65536, "gemini-3.5-flash-lite": 65536, "gemini-3.1-flash-lite": 65536, "gemini-robotics-er-2-preview": 65536, "gemini-3.1-pro-preview": 8192, "gemini-3.1-flash-lite-preview": 65536, "gemini-3.1-flash-image-preview": 8192, "gemini-3.1-pro-preview-customtools": 8192, "gemini-3-flash-preview": 65536, "gemini-3-pro-image-preview": 8192, "gemini-3-pro-preview": 8192, "gemini-2.5-pro": 65536, "gemini-2.5-flash": 65536, "gemini-2.5-flash-lite": 65536, "gemini-2.0-flash-001": 8192, "gemini-2.0-flash-lite": 8192, "gemini-1.5-pro": 8192, "gemini-1.5-flash": 8192, "claude-sonnet-4-5@20250929": 8192, "claude-opus-4-5@20251101": 8192, "claude-haiku-4-5@20251001": 8192, "claude-sonnet-4@20250514": 4096, "claude-opus-4@20250514": 4096, "claude-3-5-sonnet-20241022": 4096, "claude-3-5-haiku-20241022": 4096, "claude-3-sonnet-20240229": 4096, "claude-3-haiku-20240307": 4096, "claude-3-opus-20240229": 4096, "default": 4096 }, "BEDROCK": { "anthropic.claude-sonnet-4-5-20250929-v1:0": 8192, "anthropic.claude-opus-4-5-20251101-v1:0": 8192, "anthropic.claude-haiku-4-5-20251001-v1:0": 8192, "us.anthropic.claude-3-7-sonnet-20250219-v1:0": 4096, "anthropic.claude-3-5-sonnet-20241022-v1:0": 4096, "anthropic.claude-3-5-haiku-20241022-v1:0": 4096, "anthropic.claude-3-sonnet-20240229-v1:0": 4096, "anthropic.claude-3-haiku-20240307-v1:0": 4096, "anthropic.claude-3-opus-20240229-v1:0": 4096, "default": 4096 }, "AZURE": { "gpt-4o": 16384, "gpt-4o-mini": 16384, "gpt-4": 8192, "gpt-35-turbo": 4096, "default": 8192 }, "OLLAMA": { "llama3.2:latest": 8192, "llama2": 4096, "codellama": 8192, "mistral": 4096, "default": 8192 }, "HUGGINGFACE": { "default": 2048 }, "MISTRAL": { "mistral-small-latest": 4096, "mistral-medium-latest": 4096, "mistral-large-latest": 8192, "default": 4096 }, "LITELLM": { "default": 4096 } }, "default": 4096, "providerTables": { "anthropic": "ANTHROPIC", "openai": "OPENAI", "googleai": "GOOGLE_AI", "vertex": "VERTEX", "aws": "BEDROCK", "bedrock": "BEDROCK", "azure": "AZURE", "ollama": "OLLAMA", "huggingface": "HUGGINGFACE", "mistral": "MISTRAL", "litellm": "LITELLM" }, "inferenceProfileTables": ["BEDROCK"] }, "outputTokenLimitNotes": { "scope": "Safe output token limits, by table and model, read by TokenUtils.getProviderTokenLimit() and exported as PROVIDER_TOKEN_LIMITS (each table, plus DEFAULT). A model missing from its table gets the table's default, and a provider with no table gets the top-level default.", "providerTables": "Provider name, lowercased with '-' and '_' removed, to its table.", "inferenceProfileTables": "Tables whose callers may pass a Bedrock inference-profile ARN or alias; the id is resolved to its foundation model and looked up again.", "ANTHROPIC.default": "Conservative default for Anthropic.", "OPENAI.default": "OpenAI generally supports higher limits.", "GOOGLE_AI.default": "Conservative default: Google AI answered 500 at high limits.", "GOOGLE_AI.gemini-3-pro-preview": "Deprecated: shut down March 9, 2026. Migrate to gemini-3.1-pro-preview.", "VERTEX.gemini-3-pro-preview": "Deprecated: shut down March 9, 2026. Migrate to gemini-3.1-pro-preview.", "OLLAMA.default": "Ollama typically supports higher limits.", "HUGGINGFACE.default": "Conservative default for Hugging Face.", "LITELLM.default": "Conservative default." }, "modelTokenLimits": { "gemini-4-hydrogen": { "input": 1048576, "output": 65536 }, "gemini-4-neon": { "input": 1048576, "output": 65536 }, "gemini-4-argon": { "input": 1048576, "output": 32768 }, "gemini-4-carbon": { "input": 1048576, "output": 32768 }, "gemini-3.8-flash": { "input": 1048576, "output": 65536 }, "gemini-3.7-flash": { "input": 1048576, "output": 65536 }, "gemini-3.6-flash": { "input": 1048576, "output": 65536 }, "gemini-3.5-flash": { "input": 1048576, "output": 65536 }, "gemini-3.5-flash-lite": { "input": 1048576, "output": 65536 }, "gemini-3.1-flash-lite": { "input": 1048576, "output": 65536 }, "gemini-robotics-er-2-preview": { "input": 131072, "output": 65536 }, "gemini-flash-latest": { "input": 1048576, "output": 65536 }, "gemini-flash-lite-latest": { "input": 1048576, "output": 65536 }, "gemini-pro-latest": { "input": 1048576, "output": 65536 }, "gemini-3.1-pro-preview": { "input": 1048576, "output": 65536 }, "gemini-3.1-flash-lite-preview": { "input": 1048576, "output": 65536 }, "gemini-3.1-flash-image-preview": { "input": 1048576, "output": 8192 }, "gemini-3.1-pro-preview-customtools": { "input": 1048576, "output": 65536 }, "gemini-3-flash-preview": { "input": 1000000, "output": 65536 } } }