🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

190proof

Package Overview
Dependencies
Maintainers
1
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

190proof - npm Package Compare versions

Comparing version
1.0.90
to
1.0.91
+2
-0
dist/index.d.mts

@@ -80,2 +80,4 @@ /** @deprecated Use provider prefix strings instead, e.g. `"anthropic:claude-sonnet-4-5"` */

total_tokens: number;
/** Prompt tokens served from the provider's cache (subset of prompt_tokens). */
cached_tokens?: number;
} | null;

@@ -82,0 +84,0 @@ }

@@ -80,2 +80,4 @@ /** @deprecated Use provider prefix strings instead, e.g. `"anthropic:claude-sonnet-4-5"` */

total_tokens: number;
/** Prompt tokens served from the provider's cache (subset of prompt_tokens). */
cached_tokens?: number;
} | null;

@@ -82,0 +84,0 @@ }

+15
-10

@@ -453,3 +453,3 @@ "use strict";

async function callOpenAI(id, openAiPayload, openAiConfig) {
var _a, _b;
var _a, _b, _c, _d;
const { endpoint, headers } = buildOpenAIRequestConfig(

@@ -503,3 +503,4 @@ id,

completion_tokens: data.usage.completion_tokens,
total_tokens: data.usage.total_tokens
total_tokens: data.usage.total_tokens,
cached_tokens: (_d = (_c = data.usage.prompt_tokens_details) == null ? void 0 : _c.cached_tokens) != null ? _d : 0
} : null

@@ -646,3 +647,3 @@ };

async function callAnthropic(id, payload, config) {
var _a;
var _a, _b;
const anthropicMessages = jigAnthropicMessages(payload.messages);

@@ -745,3 +746,4 @@ const tools = (_a = payload.functions) == null ? void 0 : _a.map((f) => ({

completion_tokens: data.usage.output_tokens,
total_tokens: data.usage.input_tokens + data.usage.output_tokens
total_tokens: data.usage.input_tokens + data.usage.output_tokens,
cached_tokens: (_b = data.usage.cache_read_input_tokens) != null ? _b : 0
} : null

@@ -839,3 +841,3 @@ };

async function callGoogleAI(id, payload) {
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
const googleMessages = jigGoogleMessages(payload.messages);

@@ -908,3 +910,4 @@ const history = googleMessages.slice(0, -1);

completion_tokens: (_h = response.usageMetadata.candidatesTokenCount) != null ? _h : 0,
total_tokens: (_i = response.usageMetadata.totalTokenCount) != null ? _i : 0
total_tokens: (_i = response.usageMetadata.totalTokenCount) != null ? _i : 0,
cached_tokens: (_j = response.usageMetadata.cachedContentTokenCount) != null ? _j : 0
} : null

@@ -1010,3 +1013,3 @@ };

async function callGroq(id, payload) {
var _a, _b;
var _a, _b, _c, _d;
const response = await import_axios.default.post(

@@ -1045,3 +1048,4 @@ "https://api.groq.com/openai/v1/chat/completions",

completion_tokens: response.data.usage.completion_tokens,
total_tokens: response.data.usage.total_tokens
total_tokens: response.data.usage.total_tokens,
cached_tokens: (_d = (_c = response.data.usage.prompt_tokens_details) == null ? void 0 : _c.cached_tokens) != null ? _d : 0
} : null

@@ -1070,3 +1074,3 @@ };

async function callOpenRouter(id, payload) {
var _a, _b;
var _a, _b, _c, _d;
const response = await import_axios.default.post(

@@ -1105,3 +1109,4 @@ "https://openrouter.ai/api/v1/chat/completions",

completion_tokens: response.data.usage.completion_tokens,
total_tokens: response.data.usage.total_tokens
total_tokens: response.data.usage.total_tokens,
cached_tokens: (_d = (_c = response.data.usage.prompt_tokens_details) == null ? void 0 : _c.cached_tokens) != null ? _d : 0
} : null

@@ -1108,0 +1113,0 @@ };

@@ -422,3 +422,3 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {

async function callOpenAI(id, openAiPayload, openAiConfig) {
var _a, _b;
var _a, _b, _c, _d;
const { endpoint, headers } = buildOpenAIRequestConfig(

@@ -472,3 +472,4 @@ id,

completion_tokens: data.usage.completion_tokens,
total_tokens: data.usage.total_tokens
total_tokens: data.usage.total_tokens,
cached_tokens: (_d = (_c = data.usage.prompt_tokens_details) == null ? void 0 : _c.cached_tokens) != null ? _d : 0
} : null

@@ -615,3 +616,3 @@ };

async function callAnthropic(id, payload, config) {
var _a;
var _a, _b;
const anthropicMessages = jigAnthropicMessages(payload.messages);

@@ -714,3 +715,4 @@ const tools = (_a = payload.functions) == null ? void 0 : _a.map((f) => ({

completion_tokens: data.usage.output_tokens,
total_tokens: data.usage.input_tokens + data.usage.output_tokens
total_tokens: data.usage.input_tokens + data.usage.output_tokens,
cached_tokens: (_b = data.usage.cache_read_input_tokens) != null ? _b : 0
} : null

@@ -808,3 +810,3 @@ };

async function callGoogleAI(id, payload) {
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
const googleMessages = jigGoogleMessages(payload.messages);

@@ -877,3 +879,4 @@ const history = googleMessages.slice(0, -1);

completion_tokens: (_h = response.usageMetadata.candidatesTokenCount) != null ? _h : 0,
total_tokens: (_i = response.usageMetadata.totalTokenCount) != null ? _i : 0
total_tokens: (_i = response.usageMetadata.totalTokenCount) != null ? _i : 0,
cached_tokens: (_j = response.usageMetadata.cachedContentTokenCount) != null ? _j : 0
} : null

@@ -979,3 +982,3 @@ };

async function callGroq(id, payload) {
var _a, _b;
var _a, _b, _c, _d;
const response = await axios.post(

@@ -1014,3 +1017,4 @@ "https://api.groq.com/openai/v1/chat/completions",

completion_tokens: response.data.usage.completion_tokens,
total_tokens: response.data.usage.total_tokens
total_tokens: response.data.usage.total_tokens,
cached_tokens: (_d = (_c = response.data.usage.prompt_tokens_details) == null ? void 0 : _c.cached_tokens) != null ? _d : 0
} : null

@@ -1039,3 +1043,3 @@ };

async function callOpenRouter(id, payload) {
var _a, _b;
var _a, _b, _c, _d;
const response = await axios.post(

@@ -1074,3 +1078,4 @@ "https://openrouter.ai/api/v1/chat/completions",

completion_tokens: response.data.usage.completion_tokens,
total_tokens: response.data.usage.total_tokens
total_tokens: response.data.usage.total_tokens,
cached_tokens: (_d = (_c = response.data.usage.prompt_tokens_details) == null ? void 0 : _c.cached_tokens) != null ? _d : 0
} : null

@@ -1077,0 +1082,0 @@ };

{
"name": "190proof",
"version": "1.0.90",
"version": "1.0.91",
"description": "",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display