🚀 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.89
to
1.0.90
+7
-1
dist/index.d.mts

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

apiKey: string;
baseUrl: string;
/**
* Override the base URL for the OpenAI service (e.g. an OpenAI-compatible
* proxy or self-hosted endpoint). The path `/chat/completions` is appended.
* Ignored when `service === "azure"` (use `modelConfigMap` instead).
* Defaults to `https://api.openai.com/v1`.
*/
baseUrl?: string;
orgId?: string;

@@ -96,0 +102,0 @@ modelConfigMap?: Record<GPTModel, {

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

apiKey: string;
baseUrl: string;
/**
* Override the base URL for the OpenAI service (e.g. an OpenAI-compatible
* proxy or self-hosted endpoint). The path `/chat/completions` is appended.
* Ignored when `service === "azure"` (use `modelConfigMap` instead).
* Defaults to `https://api.openai.com/v1`.
*/
baseUrl?: string;
orgId?: string;

@@ -96,0 +102,0 @@ modelConfigMap?: Record<GPTModel, {

@@ -267,2 +267,3 @@ "use strict";

function buildOpenAIRequestConfig(identifier, model, config) {
var _a;
if (!config) {

@@ -300,4 +301,8 @@ config = {

}
const base = (((_a = config.baseUrl) == null ? void 0 : _a.trim()) || "https://api.openai.com/v1").replace(
/\/$/,
""
);
return {
endpoint: "https://api.openai.com/v1/chat/completions",
endpoint: `${base}/chat/completions`,
headers: {

@@ -304,0 +309,0 @@ "Content-Type": "application/json",

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

function buildOpenAIRequestConfig(identifier, model, config) {
var _a;
if (!config) {

@@ -269,4 +270,8 @@ config = {

}
const base = (((_a = config.baseUrl) == null ? void 0 : _a.trim()) || "https://api.openai.com/v1").replace(
/\/$/,
""
);
return {
endpoint: "https://api.openai.com/v1/chat/completions",
endpoint: `${base}/chat/completions`,
headers: {

@@ -273,0 +278,0 @@ "Content-Type": "application/json",

+2
-2
{
"name": "190proof",
"version": "1.0.89",
"version": "1.0.90",
"description": "",

@@ -15,3 +15,3 @@ "main": "./dist/index.js",

"build": "tsup",
"send": "npm run build && git add . && git commit -am checkpoint && npm version patch && npm login && npm publish"
"send": "npm run build && git add . && (git diff --cached --quiet || git commit -am checkpoint) && npm version patch && npm login && npm publish"
},

@@ -18,0 +18,0 @@ "author": "",

@@ -315,3 +315,8 @@ # 190proof

apiKey: string;
baseUrl: string;
/**
* Optional base URL. Defaults to `https://api.openai.com/v1`. Set to point
* at any OpenAI-compatible endpoint (e.g. a self-hosted proxy). The path
* `/chat/completions` is appended automatically. Ignored for Azure.
*/
baseUrl?: string;
orgId?: string;

@@ -331,2 +336,19 @@ modelConfigMap?: Record<

To talk to an OpenAI-compatible server instead of OpenAI itself:
```typescript
await callWithRetries(
"my-identifier",
{
model: "openai:gpt-4o-mini",
messages: [{ role: "user", content: "hi" }],
},
{
service: "openai",
apiKey: process.env.SOME_SERVER_API_KEY,
baseUrl: "https://your-proxy.example.com/v1",
},
);
```
#### Anthropic Config

@@ -333,0 +355,0 @@

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

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