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

171 lines (170 loc) • 11.1 kB
{ "$schema": "./provider-rules.schema.json", "id": "model-families", "modelFamilies": { "samplingParamsRejected": [ "sonnet[-_.]?5(?![0-9])", "opus[-_.]?4[-_.]?(?:[7-9]|\\d{2,})(?![0-9])", "opus[-_.]?5(?![0-9])", "haiku[-_.]?5(?![0-9])", "fable", "mythos" ], "adaptiveThinkingOnly": [ "sonnet[-_.]?5(?![0-9])", "opus[-_.]?4[-_.]?(?:[7-9]|\\d{2,})(?![0-9])", "opus[-_.]?5(?![0-9])", "haiku[-_.]?5(?![0-9])", "fable", "mythos" ], "forcedToolChoiceRejected": [ "sonnet[-_.]?5[-_.]5(?![0-9])", "opus[-_.]?5[-_.]5(?![0-9])", "(?:fable|mythos)[-_.]?5[-_.]1(?![0-9])", "fable[-_.]?5[-_.]2(?![0-9])" ], "betweenToolsThinking": ["sonnet[-_.]?5[-_.]5(?![0-9])"], "claudeModernVision": [ "claude-(?:opus|sonnet|haiku)-(?:[4-9]|\\d{2,})", "claude-(?:fable|mythos)-\\d" ], "claudeId": ["^claude-"], "claudeRoutedOnVertex": ["claude"], "vertexGlobalLocation": ["^gemini-", "/gemini-"], "claudeImageFormat": ["claude"], "geminiImageFormat": ["gemini"], "geminiPricedAsGoogle": ["^gemini"], "gpt4Prompt": ["^gpt-4"], "claude3Prompt": ["^claude-3"], "gemini3": [ "^gemini-3(\\.\\d+)?(-.*)?$", "^gemini-4(-.*)?$", "^gemini-(?:flash|flash-lite|pro)-latest$", "^gemini-robotics-er" ], "gemini25": ["^gemini-2\\.5(-.*)?$"], "thinkingConfig": ["^gemini-3", "^gemini-2\\.5-pro", "^gemini-2\\.5-flash"], "thinksByDefault": [ "^gemini-2\\.5-(?:pro|flash)(?!-lite)", "^gemini-[34](?!.*-lite)", "^gemini-(?:flash|pro)-latest$", "^gemini-robotics-er" ], "promptCaching": ["^gemini-3", "^gemini-2\\.5", "^gpt-4", "^claude-3"], "restrictedOutput": ["^gemini-3", "^gemini-4-(?:argon|carbon)"], "maxCompletionTokens": ["^(o\\d|gpt-5)"], "samplingExclusive": [ "opus[-_.]?4[-_.]?[1-6](?![0-9])", "sonnet[-_.]?4[-_.]?[5-9](?![0-9])", "haiku[-_.]?4[-_.]?[5-9](?![0-9])" ] }, "caseSensitiveFamilies": [ "claudeId", "claudeImageFormat", "geminiImageFormat", "geminiPricedAsGoogle" ], "modelProviderGuess": { "openai": ["^gpt-", "^o1-", "^o3-", "^davinci", "^curie"], "anthropic": ["^claude-"], "google-ai": ["^gemini-", "^palm-"], "vertex": ["^gemini-", "^palm-", "^codechat-"], "mistral": ["^mistral-", "^codestral-"], "bedrock": ["^anthropic\\.", "^amazon\\."], "azure": ["^azure-"] }, "modelFamilyNotes": { "vertexGlobalLocation": "Vertex serves these from the global location (with modelLists.vertexGlobalLocationText and the image models).", "modelProviderGuess": "The client SDK adapter guesses a provider from a model id with these case-sensitive patterns, providers tried in this order; no match uses its default provider.", "claudeId": "A Claude model id as Anthropic and Vertex spell it (\"claude-\" first, lower case). structuredOutputPolicy.isGeminiProvider treats every other Vertex model as Gemini, and toVertexAnthropicModelId rewrites only these ids. Case-sensitive, as the startsWith checks it replaced were.", "claudeRoutedOnVertex": "Vertex model ids the Vertex provider sends to the Anthropic SDK: \"claude\" anywhere, any case, matching GoogleVertexProvider.isAnthropicModel. audioFormatSupport and videoFormatSupport read it so they never call a Claude-routed model Gemini.", "claudeImageFormat": "Vertex model ids whose images take the Anthropic format (ImageProcessor.processImageForVertex) and the Claude image limit (ProviderImageAdapter.validateImageCount): \"claude\" anywhere. Case-sensitive, as the includes checks it replaced were.", "geminiImageFormat": "Vertex model ids whose images take the Google format and the Gemini image limit: \"gemini\" anywhere. Case-sensitive, as the includes checks it replaced were; a Vertex id that is in neither family gets the Google format and the Vertex default limit.", "geminiPricedAsGoogle": "Vertex model ids that fall back to the google pricing table when vertex has no entry (pricing.ts): \"gemini\" first. Case-sensitive, as the startsWith check it replaced was.", "gpt4Prompt": "Models that get the GPT-4 prompt additions in modelSpecificPrompts.getModelSpecificInstructions.", "claude3Prompt": "Models that get the Claude 3 prompt additions in modelSpecificPrompts.getModelSpecificInstructions.", "samplingParamsRejected": "Reject temperature/topP in favour of reasoning-effort controls: Claude Sonnet 5, Opus 4.7+ (including Opus 5), Haiku 5 and the Fable/Mythos 5 tier, notably as served through Vertex. Patterns, because gateway ids carry arbitrary prefixes and suffixes (vertex_ai/claude-sonnet-5@20260203).", "adaptiveThinkingOnly": "Answer thinking: {type: \"enabled\", budget_tokens} with a 400: \"thinking.type.enabled\" is not supported for this model. Use \"thinking.type.adaptive\" ...\". Probed live on the Anthropic API on 2026-11-30 for claude-sonnet-5, claude-sonnet-5-5, claude-opus-4-7, claude-opus-4-8, claude-opus-5, claude-opus-5-5, claude-haiku-5-5, claude-fable-5-1 and claude-fable-5-2 (claude-sonnet-4-6 still accepts enabled), and on Vertex for claude-sonnet-5-5. A request for thinking is sent to these as {type: \"adaptive\"}; the budget does not apply.", "forcedToolChoiceRejected": "Answer a forced tool_choice (any or tool) with a 400: \"tool_choice: type \\\"tool\\\" and \\\"any\\\" are not supported for this model.\" Sonnet 5.5 and Opus 5.5 were probed live on Vertex; the Fable 5.1 docs state the same, and Mythos 5.1 shares Fable 5.1's capabilities. Fable 5.2 was probed live on the Anthropic API on 2026-11-30: it rejects a forced tool_choice, thinking disabled and thinking between_tools. The same families also refuse thinking: {type: \"disabled\"}.", "betweenToolsThinking": "Of forcedToolChoiceRejected, the ones that accept thinking: {type: \"between_tools\"} as their lowest setting. The rest think adaptively, always on, and take no thinking field in its place.", "claudeModernVision": "Name-first Claude ids with major version 4 or later (claude-sonnet-5, claude-opus-4-7, claude-haiku-4-5) plus Fable/Mythos. Legacy number-first 3.x ids (claude-3-5-haiku) deliberately do not match: claude-3-5-haiku, the last non-vision Claude, must stay rejected.", "gemini3": "Gemini 3 and 3.x, and every newer Gemini model that takes thinkingLevel: the Gemini 4 models, the -latest aliases and gemini-robotics-er-2-preview each accepted thinkingLevel high, medium and low on Google AI Studio (probed live 2026-11-30). Several reject minimal (\"Thinking level MINIMAL is not supported\").", "gemini25": "Gemini 2.5: rejects thinkingLevel with 400 \"thinking_level not supported\"; takes thinkingBudget.", "maxCompletionTokens": "Reasoning-class OpenAI models (o-series, gpt-5+) reject max_tokens and take max_completion_tokens. Matched against the id after its last '/'.", "restrictedOutput": "Output capped at gemini.json reasoning.restrictedOutputTokenLimit, as are the imageGeneration models (matched as prefixes). gemini-4-argon and gemini-4-carbon report an output limit of 32,768 tokens in the Google AI models API (2026-11-30); gemini-4-hydrogen and gemini-4-neon report 65,536.", "samplingExclusive": "Accept temperature or top_p but reject both in one request with a 400 (\"temperature and top_p cannot both be specified for this model\"): Claude Opus 4.1 to 4.6, Sonnet 4.5+ and Haiku 4.5+ (docs.claude.com, what's new in Claude Sonnet 4.5). When a caller sets both, temperature is kept. Opus 4.7+ and Sonnet 5 reject sampling entirely (samplingParamsRejected).", "thinksByDefault": "Gemini models that think when the request carries no thinkingConfig, measured live on Google AI Studio and Vertex 2026-11-30: Gemini 2.5 Pro and Flash, every Gemini 3.x and 4 model except the Flash-Lite ones, gemini-flash-latest, gemini-pro-latest and gemini-robotics-er-2-preview. Flash-Lite models answered with no thought tokens. See gemini.json reasoning.unrequestedThinkingHeadroomTokens." }, "modelFamilyLabels": { "rules": [ { "match": "^gemini-3", "label": "gemini-3" }, { "match": "^gemini-2\\.5", "label": "gemini-2.5" }, { "match": "^gemini-2", "label": "gemini-2" }, { "match": "^gpt-4", "label": "gpt-4" }, { "match": "^claude-3", "label": "claude-3" } ], "default": "unknown" }, "modelLists": { "imageGeneration": [ "gemini-3-pro-image-preview", "gemini-2.5-flash-image", "gemini-3.1-flash-image-preview", "stable-image-ultra", "stable-image-core", "sd3.5-large", "sd3.5-large-turbo", "sd3.5-medium", "V_1", "V_1_TURBO", "V_2", "V_2_TURBO", "V_2A", "V_2A_TURBO", "V_3", "recraftv3", "recraftv2", "gpt-image-1", "dall-e-3", "dall-e-2", "black-forest-labs/flux", "stability-ai/sdxl", "stability-ai/stable-diffusion" ], "pdfImageGeneration": [ "gemini-3-pro-image-preview", "gemini-3.1-flash-image-preview" ], "vertexGlobalLocationText": [ "gemini-3.1-pro-preview", "gemini-3.1-flash-lite-preview", "gemini-3.1-pro-preview-customtools", "gemini-3-pro-preview", "gemini-3-pro-preview-11-2025", "gemini-3-pro-latest", "gemini-3-flash-preview" ] }, "modelListNotes": { "imageGeneration": "Image-generation models, not text. isImageGenerationModel matches an entry exactly or bounded by - _ : . / @ or the ends, so short ids such as V_1 (Ideogram) don't match unrelated names. Groups: Gemini image (Vertex, AI Studio); Stability; Ideogram model versions; Recraft; OpenAI DALL-E and GPT-Image; Replicate slugs (matched as a slug prefix).", "pdfImageGeneration": "Models that can generate images from PDFs.", "vertexGlobalLocationText": "Gemini 3.x text models that Vertex serves only on the global endpoint (aiplatform.googleapis.com). GLOBAL_LOCATION_MODELS is imageGeneration followed by this list, so a new image model is routed to global too." } }