@opencompress/opencompress 1.9.0 → 1.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +4 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
6
6
  });
7
7
 
8
8
  // src/index.ts
9
- var VERSION = "1.9.0";
9
+ var VERSION = "1.9.1";
10
10
  var DEFAULT_BASE_URL = "https://www.opencompress.ai/api";
11
11
  function getApiKey(api) {
12
12
  const auth = api.config.auth;
@@ -222,10 +222,10 @@ function enableProxy(api, baseUrl) {
222
222
  if (pApi === "anthropic-messages") {
223
223
  provider.headers = {
224
224
  ...provider.headers || {},
225
- "x-api-key": provider.apiKey || ""
225
+ "x-upstream-key": provider.apiKey || ""
226
226
  };
227
227
  provider.baseUrl = `${baseUrl}/v1`;
228
- provider.apiKey = void 0;
228
+ provider.apiKey = occKey;
229
229
  } else {
230
230
  provider.headers = {
231
231
  ...provider.headers || {},
@@ -265,6 +265,7 @@ function disableProxy(api) {
265
265
  delete h["X-Upstream-Key"];
266
266
  delete h["X-Upstream-Base-Url"];
267
267
  delete h["x-api-key"];
268
+ delete h["x-upstream-key"];
268
269
  if (Object.keys(h).length === 0) delete provider.headers;
269
270
  }
270
271
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencompress/opencompress",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "description": "OpenCompress plugin for OpenClaw — automatic 5-layer prompt compression for any LLM",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",