@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
99 lines (98 loc) • 4.67 kB
JSON
{
"$schema": "./provider-rules.schema.json",
"id": "gemini",
"defaultModel": "gemini-3.8-flash",
"defaultModelNote": "The default Gemini model for both Gemini wires, Google AI Studio and Vertex, and for NeuroLink's own internal Gemini calls (summarization, evaluation, routing). gemini-3.8-flash is the newest Flash model on both APIs, probed live 2026-11-30; it replaced gemini-2.5-flash, which Vertex retired on 2026-10-20.",
"finishReasons": {
"generateContent": {
"map": {
"MAX_TOKENS": "length",
"CONTINUATION": "length",
"TOO_MANY_TOOL_CALLS": "tool-calls",
"MALFORMED_FUNCTION_CALL": "error",
"UNEXPECTED_TOOL_CALL": "error",
"SAFETY": "content-filter",
"RECITATION": "content-filter",
"BLOCKLIST": "content-filter",
"PROHIBITED_CONTENT": "content-filter",
"SPII": "content-filter",
"LANGUAGE": "content-filter",
"IMAGE_SAFETY": "content-filter",
"IMAGE_PROHIBITED_CONTENT": "content-filter",
"IMAGE_RECITATION": "content-filter"
},
"default": "stop"
}
},
"usage": {
"input": "promptTokenCount",
"output": "candidatesTokenCount",
"cacheRead": "cachedContentTokenCount",
"reasoning": "thoughtsTokenCount",
"reasoningInOutput": false
},
"toolNames": {
"firstChars": "A-Za-z_",
"allowedChars": "A-Za-z0-9_.:-",
"maxLength": 128
},
"reasoning": {
"defaultLevel": "high",
"defaultBudgetTokens": 10000,
"levelFractions": {
"minimal": 0,
"low": 0.25,
"medium": 0.55,
"high": 1
},
"maxBudgetTokens": {
"rules": [
{
"match": "^gemini-3(\\.\\d+)?-pro",
"value": 100000
},
{
"match": "^gemini-3(\\.\\d+)?-flash",
"value": 50000
},
{
"match": "^gemini-2\\.5",
"value": 32000
}
],
"default": 10000
},
"budgetRanges": {
"rules": [
{
"match": "^gemini-2\\.5-flash-lite",
"min": 512,
"max": 24576
},
{
"match": "^gemini-2\\.5-flash",
"min": 128,
"max": 24576
},
{
"match": "^gemini-2\\.5-pro",
"min": 128,
"max": 32768
}
],
"fallback": {
"min": 512,
"max": 24576
}
},
"restrictedOutputTokenLimit": 32768,
"unrequestedThinkingHeadroomTokens": 1024,
"unrequestedThinkingHeadroomBelowMaxTokens": 8192
},
"reasoningNotes": {
"levelFractions": "A thinking level maps to min + fraction * (max - min) of the model's budget range, rounded.",
"budgetRanges": "Gemini 2.5 thinkingBudget bounds confirmed against live Vertex responses; Vertex rejects others with INVALID_ARGUMENT \"thinking_budget is out of range\". Flash's real floor is 1, but budget 1 measured 0 thoughtsTokenCount, so the floor is 128 (Pro's) so \"minimal\" still thinks. flash-lite must come before flash. The fallback is the intersection of the three verified ranges.",
"unrequestedThinkingHeadroomTokens": "Gemini counts thinking inside maxOutputTokens. A model in model-families.json thinksByDefault thinks even when the caller asked for no thinking, so a small maxTokens was spent on thoughts and the answer came back empty (gemini-3.8-flash and gemini-2.5-pro with maxTokens 20 or 60, measured live 2026-11-30: about 37 to 190 thought tokens for a one-line answer). When the caller sets maxTokens and asks for no thinking, these tokens are added on top, so maxTokens stays the room for the answer. The lowest thinking setting cannot be sent instead: it differs per model, and gemini-2.5-pro, gemini-pro-latest and gemini-4-hydrogen keep thinking at their lowest setting.",
"unrequestedThinkingHeadroomBelowMaxTokens": "The headroom is added only when maxTokens is below this. A larger maxTokens already leaves room for the thoughts and is sent unchanged, and a call with no maxTokens keeps asking for the model's documented output limit."
}
}