squeezr-ai 1.14.4 → 1.14.5

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/bin/squeezr.js CHANGED
@@ -198,8 +198,9 @@ function setupWindows() {
198
198
  openai_base_url: `http://localhost:${port}`,
199
199
  GEMINI_API_BASE_URL: `http://localhost:${port}`,
200
200
  HTTPS_PROXY: `http://localhost:${mitmPort}`,
201
- // Node.js does NOT use the Windows Certificate Store — this makes Codex (Node.js) trust the MITM CA
202
201
  NODE_EXTRA_CA_CERTS: caPath,
202
+ // Bypass MITM for OpenAI auth and non-Codex endpoints — only chatgpt.com needs interception
203
+ NO_PROXY: 'auth.openai.com,login.openai.com,api.openai.com,api.anthropic.com,generativelanguage.googleapis.com',
203
204
  }
204
205
  for (const [key, value] of Object.entries(vars)) {
205
206
  try {
@@ -37,7 +37,9 @@ async function compressWithHaiku(text, apiKey) {
37
37
  }
38
38
  async function compressWithGptMini(text, apiKey) {
39
39
  // apiKey can be a real key (sk-...) or an OAuth bearer token
40
- const client = new OpenAI({ apiKey });
40
+ // Force real API URL openai_base_url points to this proxy, which would cause
41
+ // infinite recursion if we let the SDK inherit it from the environment.
42
+ const client = new OpenAI({ apiKey, baseURL: 'https://api.openai.com/v1' });
41
43
  const resp = await client.chat.completions.create({
42
44
  model: 'gpt-4o-mini',
43
45
  max_tokens: 300,
package/dist/config.js CHANGED
@@ -107,7 +107,8 @@ export class Config {
107
107
  if (!this.localEnabled)
108
108
  return false;
109
109
  const k = key.trim().toLowerCase();
110
- return this.localDummyKeys.has(k) || (k.length > 0 && !k.startsWith('sk-') && !k.startsWith('aiza'));
110
+ // JWT OAuth tokens (Codex) start with 'eyj' never route those to local
111
+ return this.localDummyKeys.has(k) || (k.length > 0 && !k.startsWith('sk-') && !k.startsWith('aiza') && !k.startsWith('eyj'));
111
112
  }
112
113
  }
113
114
  export const config = new Config();
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "1.14.4";
1
+ export declare const VERSION = "1.14.5";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.14.4';
1
+ export const VERSION = '1.14.5';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squeezr-ai",
3
- "version": "1.14.4",
3
+ "version": "1.14.5",
4
4
  "description": "AI proxy that compresses Claude Code, Codex, Aider, Gemini CLI and Ollama context windows to save thousands of tokens per session",
5
5
  "keywords": [
6
6
  "claude",