@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
52 lines (51 loc) • 1.67 kB
JSON
{
"$schema": "./provider-rules.schema.json",
"id": "usage",
"usageFields": {
"input": { "paths": ["input", "inputTokens", "promptTokens"] },
"output": { "paths": ["output", "outputTokens", "completionTokens"] },
"total": { "paths": ["total", "totalTokens"], "positiveOnly": true },
"reasoning": {
"paths": [
"reasoningTokens",
"thinkingTokens",
"reasoning_tokens",
"reasoning"
],
"positiveOnly": true
},
"cacheCreation": {
"paths": [
"cacheCreationInputTokens",
"cacheCreationTokens",
"inputTokenDetails.cacheWriteTokens"
],
"positiveOnly": true
},
"cacheRead": {
"paths": [
"cacheReadInputTokens",
"cacheReadTokens",
"cachedInputTokens",
"inputTokenDetails.cacheReadTokens"
],
"positiveOnly": true
},
"cacheReadIncludedInInput": {
"paths": ["prompt_tokens_details.cached_tokens"],
"positiveOnly": true
}
},
"usageRebase": {
"whenAnyPresent": ["cachedInputTokens", "inputTokenDetails"],
"unlessAnyPresent": [
"cacheReadInputTokens",
"cacheReadTokens",
"cacheCreationInputTokens",
"cacheCreationTokens",
"prompt_tokens_details.cached_tokens"
],
"uncachedInput": "inputTokenDetails.noCacheTokens",
"cacheWrite": "inputTokenDetails.cacheWriteTokens"
}
}