mobygate 0.8.3 → 0.8.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.
Files changed (3) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/package.json +1 -1
  3. package/server.js +17 -6
package/CHANGELOG.md CHANGED
@@ -4,6 +4,45 @@ All notable changes to mobygate are documented here. Format loosely follows
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); version numbers are
5
5
  [Semantic Versioning](https://semver.org/).
6
6
 
7
+ ## [0.8.4] — 2026-04-28
8
+
9
+ Sonnet 1M context fix — gated billing tier mismatch. v0.8.3's "match
10
+ the opus pattern" change auto-upgraded all `claude-sonnet-4-6` requests
11
+ to `claude-sonnet-4-6[1m]`, but **Sonnet 1M context requires paid
12
+ "extra usage" billing on Claude Max plans, while Opus 1M is included.**
13
+ Users without extra-usage enabled would see silent failures whenever
14
+ their agents hit sonnet through mobygate.
15
+
16
+ Discovered via OpenClaw multi-bot configuration testing — Lux and
17
+ Mercury (configured for moby-native sonnet) couldn't make calls until
18
+ this was diagnosed.
19
+
20
+ ### Fixed
21
+
22
+ - **Sonnet routes default to 200k (Max-included), not 1M.**
23
+ `claude-sonnet-4-6` now passes through unchanged. Same for the
24
+ `claude-sonnet-4` shorthand and the `sonnet` alias.
25
+
26
+ - **Explicit 1M opt-in via new alias `claude-sonnet-4-6-1m`** — for
27
+ users who have enabled Max extra-usage and genuinely need 1M context
28
+ on sonnet sub-tasks. Maps to `claude-sonnet-4-6[1m]`.
29
+
30
+ - **`/v1/models` advertises sonnet's actual default context (200k)**
31
+ instead of the unreachable 1M. New entry `claude-sonnet-4-6-1m`
32
+ exposes the 1M variant for clients that want to opt in.
33
+
34
+ - **`sonnet-1m` shorthand alias** for clients using short model names.
35
+
36
+ ### Notes
37
+
38
+ Opus 1M context remains the default (`opus`, `claude-opus-4-7`, etc.
39
+ all map to `[1m]`) because Max plans include it. Sonnet's smaller
40
+ 1M-context allowance is a separate billing line item.
41
+
42
+ If you've enabled extra-usage on your Max plan and want all sonnet
43
+ calls at 1M, override your client's model name to `claude-sonnet-4-6-1m`
44
+ or `sonnet-1m` instead of `claude-sonnet-4-6` / `sonnet`.
45
+
7
46
  ## [0.8.3] — 2026-04-28
8
47
 
9
48
  OpenClaw .26 compatibility, sonnet 1M context, and observability for
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobygate",
3
- "version": "0.8.3",
3
+ "version": "0.8.4",
4
4
  "description": "OpenAI-compatible local proxy for Claude Max. The Möbius-strip gateway: OpenAI shape in, Claude Max out.",
5
5
  "type": "module",
6
6
  "main": "server.js",
package/server.js CHANGED
@@ -186,14 +186,22 @@ const MODEL_MAP = {
186
186
  'claude-opus-4-7[1m]': 'claude-opus-4-7[1m]',
187
187
  'claude-opus-4-7-1m': 'claude-opus-4-7[1m]',
188
188
  'claude-opus-4-7-200k': 'claude-opus-4-7',
189
- 'claude-sonnet-4': 'claude-sonnet-4-6[1m]', // current latest sonnet, 1M context
189
+ // Sonnet 1M context note: unlike Opus 1M (included in Claude Max),
190
+ // Sonnet 1M context requires paid "extra usage" on Max plans —
191
+ // routing all sonnet calls through [1m] gates them on extra-usage
192
+ // billing, so users without it see silent failures. v0.8.4 fix:
193
+ // default sonnet routes to plain `claude-sonnet-4-6` (200k, included);
194
+ // explicit 1M opt-in via the new `claude-sonnet-4-6-1m` alias.
195
+ 'claude-sonnet-4': 'claude-sonnet-4-6', // current latest sonnet, 200k (Max-included)
190
196
  'claude-sonnet-4-5': 'claude-sonnet-4-5-20250929', // explicit request for older 4-5
191
- 'claude-sonnet-4-6': 'claude-sonnet-4-6[1m]', // SDK supports natively; [1m] unlocks 1M context (same pattern as opus 4.7)
192
- 'claude-sonnet-4-6-200k': 'claude-sonnet-4-6', // explicit 200k variant
197
+ 'claude-sonnet-4-6': 'claude-sonnet-4-6', // 200k context (Max-included)
198
+ 'claude-sonnet-4-6-1m': 'claude-sonnet-4-6[1m]', // explicit 1M opt-in (requires Max extra-usage)
199
+ 'claude-sonnet-4-6-200k': 'claude-sonnet-4-6', // explicit 200k alias (redundant, kept for clarity)
193
200
  'claude-haiku-4': 'claude-haiku-4-5-20251001',
194
201
  'claude-haiku-4-5': 'claude-haiku-4-5-20251001',
195
- 'opus': 'claude-opus-4-7[1m]',
196
- 'sonnet': 'claude-sonnet-4-6[1m]', // current latest sonnet, 1M context
202
+ 'opus': 'claude-opus-4-7[1m]', // Opus 1M is Max-included
203
+ 'sonnet': 'claude-sonnet-4-6', // 200k default; use 'sonnet-1m' for explicit 1M
204
+ 'sonnet-1m': 'claude-sonnet-4-6[1m]', // alias for 'sonnet' + explicit 1M opt-in
197
205
  'haiku': 'claude-haiku-4-5-20251001',
198
206
  };
199
207
 
@@ -1564,7 +1572,10 @@ app.get('/v1/models', (_req, res) => {
1564
1572
  { id: 'claude-opus-4-7', object: 'model', owned_by: 'anthropic', created: now, context_length: 1000000 },
1565
1573
  { id: 'claude-opus-4-7-200k', object: 'model', owned_by: 'anthropic', created: now, context_length: 200000 },
1566
1574
  { id: 'claude-opus-4-6', object: 'model', owned_by: 'anthropic', created: now, context_length: 1000000 },
1567
- { id: 'claude-sonnet-4-6', object: 'model', owned_by: 'anthropic', created: now, context_length: 1000000 },
1575
+ // Sonnet defaults to 200k (Max-included). Use claude-sonnet-4-6-1m
1576
+ // for the 1M variant, which requires paid extra usage on Max.
1577
+ { id: 'claude-sonnet-4-6', object: 'model', owned_by: 'anthropic', created: now, context_length: 200000 },
1578
+ { id: 'claude-sonnet-4-6-1m', object: 'model', owned_by: 'anthropic', created: now, context_length: 1000000 },
1568
1579
  { id: 'claude-haiku-4-5', object: 'model', owned_by: 'anthropic', created: now, context_length: 200000 },
1569
1580
  ],
1570
1581
  });