openzoo 0.48.41 → 0.48.42
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/lib/launch.js +38 -0
- package/package.json +1 -1
package/lib/launch.js
CHANGED
|
@@ -143,6 +143,25 @@ export async function launchClaude(argv) {
|
|
|
143
143
|
delete env.ANTHROPIC_API_KEY;
|
|
144
144
|
env.ANTHROPIC_BASE_URL = base;
|
|
145
145
|
env.ANTHROPIC_AUTH_TOKEN = process.env.ANTHROPIC_AUTH_TOKEN || 'sk-openzoo';
|
|
146
|
+
// STOP CLAUDE CODE COMPACTING ON A WINDOW THAT IS NOT REAL.
|
|
147
|
+
//
|
|
148
|
+
// It counts the WHOLE local transcript and compacts against a window it looks
|
|
149
|
+
// up from the MODEL NAME — hardcoded 200k for a recognised Claude id, which is
|
|
150
|
+
// why `/autocompact 1m` answered "capped to 200k by model" and why raising
|
|
151
|
+
// CLAUDE_CODE_MAX_CONTEXT_TOKENS alone did nothing. It never sees that the
|
|
152
|
+
// proxy binds the prefix and forwards ~8 of 166 turns.
|
|
153
|
+
//
|
|
154
|
+
// An `openzoo-` alias is the same model upstream (models.js resolves by
|
|
155
|
+
// SUFFIX, so openzoo-claude-sonnet-5 -> anthropic/claude-sonnet-5) but is not
|
|
156
|
+
// in that table, so the client falls back to the advertised context_length —
|
|
157
|
+
// which this gateway publishes as 128,000,000.
|
|
158
|
+
//
|
|
159
|
+
// OPENZOO_NO_ALIAS=1 opts out. Worth knowing: model-specific client behaviour
|
|
160
|
+
// (thinking budget, tool formats) also keys off the name, so if a session
|
|
161
|
+
// behaves oddly this is the first thing to turn off.
|
|
162
|
+
if (process.env.OPENZOO_NO_ALIAS !== '1' && !process.env.ANTHROPIC_MODEL) {
|
|
163
|
+
env.ANTHROPIC_MODEL = process.env.OPENZOO_CLAUDE_ALIAS || 'openzoo-claude-sonnet-5';
|
|
164
|
+
}
|
|
146
165
|
// RAISE THE CEILING, because the proxy already removed it.
|
|
147
166
|
//
|
|
148
167
|
// Claude Code counts the WHOLE local transcript against the model's window and
|
|
@@ -360,6 +379,25 @@ export async function launchHarness(cmd, args) {
|
|
|
360
379
|
delete env.ANTHROPIC_API_KEY; // conflicts with the gateway auth-token path
|
|
361
380
|
env.ANTHROPIC_BASE_URL = base;
|
|
362
381
|
env.ANTHROPIC_AUTH_TOKEN = process.env.ANTHROPIC_AUTH_TOKEN || 'sk-openzoo';
|
|
382
|
+
// STOP CLAUDE CODE COMPACTING ON A WINDOW THAT IS NOT REAL.
|
|
383
|
+
//
|
|
384
|
+
// It counts the WHOLE local transcript and compacts against a window it looks
|
|
385
|
+
// up from the MODEL NAME — hardcoded 200k for a recognised Claude id, which is
|
|
386
|
+
// why `/autocompact 1m` answered "capped to 200k by model" and why raising
|
|
387
|
+
// CLAUDE_CODE_MAX_CONTEXT_TOKENS alone did nothing. It never sees that the
|
|
388
|
+
// proxy binds the prefix and forwards ~8 of 166 turns.
|
|
389
|
+
//
|
|
390
|
+
// An `openzoo-` alias is the same model upstream (models.js resolves by
|
|
391
|
+
// SUFFIX, so openzoo-claude-sonnet-5 -> anthropic/claude-sonnet-5) but is not
|
|
392
|
+
// in that table, so the client falls back to the advertised context_length —
|
|
393
|
+
// which this gateway publishes as 128,000,000.
|
|
394
|
+
//
|
|
395
|
+
// OPENZOO_NO_ALIAS=1 opts out. Worth knowing: model-specific client behaviour
|
|
396
|
+
// (thinking budget, tool formats) also keys off the name, so if a session
|
|
397
|
+
// behaves oddly this is the first thing to turn off.
|
|
398
|
+
if (process.env.OPENZOO_NO_ALIAS !== '1' && !process.env.ANTHROPIC_MODEL) {
|
|
399
|
+
env.ANTHROPIC_MODEL = process.env.OPENZOO_CLAUDE_ALIAS || 'openzoo-claude-sonnet-5';
|
|
400
|
+
}
|
|
363
401
|
// RAISE THE CEILING, because the proxy already removed it.
|
|
364
402
|
//
|
|
365
403
|
// Claude Code counts the WHOLE local transcript against the model's window and
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openzoo",
|
|
3
|
-
"version": "0.48.
|
|
3
|
+
"version": "0.48.42",
|
|
4
4
|
"description": "Local x402-paying proxy + MCP server for openzoo.fun — point any OpenAI-compatible harness (Cursor, Claude Code, aider, SDKs) at localhost and it pays per call from a local burner wallet. Solana and Base rails live; Robinhood experimental.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|