@opencompress/opencompress 2.0.0 → 2.0.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.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/config.ts
2
- var VERSION = "2.0.0";
2
+ var VERSION = "2.0.1";
3
3
  var PROXY_PORT = 8401;
4
4
  var PROXY_HOST = "127.0.0.1";
5
5
  var OCC_API = "https://www.opencompress.ai/api";
@@ -277,24 +277,30 @@ function getProviders(api) {
277
277
  function createProvider(api) {
278
278
  return {
279
279
  id: PROVIDER_ID,
280
- label: "OpenCompress (BYOK Compression Proxy)",
280
+ label: "OpenCompress (Save Tokens + Improve Quality)",
281
281
  aliases: ["oc", "compress"],
282
282
  envVars: ["OPENCOMPRESS_API_KEY"],
283
283
  // Dynamic model catalog — mirrors user's existing providers
284
- models: {
285
- baseUrl: `http://${PROXY_HOST}:${PROXY_PORT}/v1`,
286
- api: "openai-completions",
287
- models: generateModelCatalog(getProviders(api))
288
- },
284
+ // Detect primary provider's API type for compatibility
285
+ models: (() => {
286
+ const providers = getProviders(api);
287
+ const firstProvider = Object.values(providers).find((p) => p.api);
288
+ const primaryApi = firstProvider?.api || "openai-completions";
289
+ return {
290
+ baseUrl: `http://${PROXY_HOST}:${PROXY_PORT}/v1`,
291
+ api: primaryApi,
292
+ models: generateModelCatalog(providers)
293
+ };
294
+ })(),
289
295
  auth: [
290
296
  {
291
297
  id: "api-key",
292
298
  label: "OpenCompress",
293
- hint: "Save 20-40% on any LLM. Your API keys stay local.",
299
+ hint: "Save tokens and improve quality on any LLM. Your API keys stay local.",
294
300
  kind: "custom",
295
301
  run: async (ctx) => {
296
302
  ctx.prompter.note(
297
- "\u{1F99E} OpenCompress \u2014 compress every LLM call, save 20-40%\n\nYour existing API keys (Claude, GPT, etc.) stay on your machine.\nWe just compress the prompts before they're sent."
303
+ "\u{1F99E} OpenCompress \u2014 save tokens and improve quality on every LLM call\n\nUse your existing LLM providers. Your API keys stay on your machine.\nWe compress prompts to reduce costs and sharpen output quality."
298
304
  );
299
305
  const spinner = ctx.prompter.progress("Creating your account...");
300
306
  try {
@@ -336,7 +342,7 @@ function createProvider(api) {
336
342
  var plugin = {
337
343
  id: "opencompress",
338
344
  name: "OpenCompress",
339
- description: "BYOK prompt compression \u2014 save 20-40% on any LLM provider",
345
+ description: "Save tokens and improve quality on any LLM \u2014 use your existing providers",
340
346
  version: VERSION,
341
347
  register(api) {
342
348
  api.registerProvider(createProvider(api));
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "opencompress",
3
3
  "name": "OpenCompress",
4
- "description": "BYOK prompt compression save 20-40% on any LLM. Your keys stay local.",
4
+ "description": "Save tokens and improve quality on any LLM. Use your existing providers — keys stay local.",
5
5
  "providers": ["opencompress"],
6
6
  "configSchema": {
7
7
  "type": "object",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencompress/opencompress",
3
- "version": "2.0.0",
3
+ "version": "2.0.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",