claudmax 3.4.3 → 3.4.4
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/index.js +7 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -26,7 +26,7 @@ const BANNER_SIDE = C.magenta('\u2551');
|
|
|
26
26
|
const MCP_PKG = 'claudmax-mcp';
|
|
27
27
|
const API_BASE = 'https://api.claudmax.pro';
|
|
28
28
|
const HOME = os.homedir();
|
|
29
|
-
const VERSION = '3.4.
|
|
29
|
+
const VERSION = '3.4.4';
|
|
30
30
|
|
|
31
31
|
// ── Helpers ────────────────────────────────────────────────────────────────────
|
|
32
32
|
function readJson(filePath) {
|
|
@@ -254,11 +254,14 @@ function configureClaudeCodeCLI(apiKey, apiBase) {
|
|
|
254
254
|
const settingsPath = path.join(HOME, '.claude', 'settings.json');
|
|
255
255
|
const dotClaudePath = path.join(HOME, '.claude.json');
|
|
256
256
|
|
|
257
|
-
// settings.json — set
|
|
257
|
+
// settings.json — MUST set ANTHROPIC_AUTH_TOKEN + ANTHROPIC_BASE_URL
|
|
258
|
+
// These are essential for Claude Code to route API calls through the proxy.
|
|
258
259
|
preCleanForClaudeCodeCLI();
|
|
259
|
-
const settings = readJson(settingsPath);
|
|
260
|
+
const settings = readJson(settingsPath) || {};
|
|
260
261
|
deepMerge(settings, {
|
|
261
262
|
env: {
|
|
263
|
+
ANTHROPIC_AUTH_TOKEN: apiKey,
|
|
264
|
+
ANTHROPIC_BASE_URL: apiBase,
|
|
262
265
|
ANTHROPIC_MODEL: 'Opus 4.6',
|
|
263
266
|
ANTHROPIC_SMALL_FAST_MODEL: 'Haiku 4.5',
|
|
264
267
|
ANTHROPIC_DEFAULT_SONNET_MODEL: 'Sonnet 4.5',
|
|
@@ -272,7 +275,7 @@ function configureClaudeCodeCLI(apiKey, apiBase) {
|
|
|
272
275
|
console.log(` ${C.green('\u2713')} Wrote ${settingsPath}`);
|
|
273
276
|
|
|
274
277
|
// .claude.json — MCP server for routing (cleans OpusMax first)
|
|
275
|
-
const dotClaude = readJson(dotClaudePath);
|
|
278
|
+
const dotClaude = readJson(dotClaudePath) || {};
|
|
276
279
|
// Remove OpusMax to avoid auth conflicts
|
|
277
280
|
if (dotClaude.mcpServers) {
|
|
278
281
|
delete dotClaude.mcpServers['OpusMax'];
|
package/package.json
CHANGED