opencode-zen-freex 0.2.4 → 0.2.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/MAINTAINING.md CHANGED
@@ -21,7 +21,8 @@ ids the catalogue is wrong in the one direction nothing complains about: too
21
21
  small. `deepseek-v4.1-flash-free` is declared 200000/32000 while
22
22
  `deepseek-v4.1-flash` — the paid id serving the same upstream model, which
23
23
  `x-opencode-upstream-model-id` confirms — is declared 1000000/384000 in that
24
- same catalogue.
24
+ same catalogue, and `mimo-v2.6-flash-free` is declared 200000/32000 against a
25
+ model whose own vendor publishes 1048576/131072.
25
26
 
26
27
  Both numbers are acted on. The window decides when a conversation is compacted
27
28
  and how much of it is ever sent; the output cap is sent as `max_tokens` on every
@@ -32,10 +33,12 @@ quietly never used, which is why this stayed invisible for so long.
32
33
  `limits.mjs` holds what was measured, per axis, with the catalogue value it was
33
34
  measured against. Each axis carries `samples` and `how`; the short of it:
34
35
 
35
- | axis | value | from |
36
- | --- | --- | --- |
37
- | context | 1048576 | the route's own refusal, in its own words |
38
- | output | 384000 | what this route declares for the same upstream model |
36
+ | id | axis | value | from |
37
+ | --- | --- | --- | --- |
38
+ | `deepseek-v4.1-flash-free` | context | 1048576 | the route's own refusal, in its own words |
39
+ | `deepseek-v4.1-flash-free` | output | 384000 | what this route declares for the same upstream model |
40
+ | `mimo-v2.6-flash-free` | context | 1048576 | the route's own refusal, in its own words |
41
+ | `mimo-v2.6-flash-free` | output | 131072 | the vendor's own catalogue entry |
39
42
 
40
43
  A prompt sized just over the window is refused with
41
44
 
@@ -53,10 +56,20 @@ published what that model does; a single reply of 306,880 completion tokens
53
56
  number out of the refusal, three times, interleaved, per the rule below. The
54
57
  filler measured 4.887 characters per token with about 1700 tokens of fixed
55
58
  request overhead, and a request that is *served* says nothing about where the
56
- wall is. The output: re-read the paid id's `limit` in
57
- `https://models.opencode.ai/api.json`. A value Zen accepts is not evidence —
58
- `max_tokens: 2000000` under a short prompt answers 200 and writes nothing like
59
- it — and neither is a generation nobody watched finish.
59
+ wall is — it is what the calibration is checked against, since
60
+ `usage.prompt_tokens` is the real count while the refusal's "requested about"
61
+ figure is a rough one (characters, not tokens) and must not be read as a count.
62
+ A second upstream words the same fact as "This endpoint's maximum context length
63
+ is …" and breaks the request into text input, tool input and output.
64
+
65
+ The output: a paid twin's `limit` in `https://models.opencode.ai/api.json` is
66
+ the stronger source, and re-reading it is the whole job. With no twin — `mimo`
67
+ has none — the figure rests on the vendor's own entry, which is weaker evidence
68
+ and has to say so in `samples`: what is declared is what a vendor publishes, not
69
+ something watched. A value Zen accepts is not evidence — `max_tokens: 2000000`
70
+ under a short prompt answers 200 and writes nothing like it, and `mimo`'s refusal
71
+ came back with the 200000 it was asked for rather than with a ceiling — and
72
+ neither is a generation nobody watched finish.
60
73
 
61
74
  **What voids it.** Each axis records the catalogue value it was measured
62
75
  against, and an axis whose declaration moved is dropped rather than kept: a
@@ -71,10 +84,24 @@ start and hourly after, so a route that changes the window it enforces is
71
84
  followed without anyone editing this file. Nothing is persisted: a restart falls
72
85
  back to what is measured here.
73
86
 
74
- **A lead, not evidence.** `mimo-v2.6-flash-free` is declared 200000/32000 here
75
- too, and another plugin on this route has reported Zen answering that id with
76
- `maximum context length is 1048576 tokens`. That is somebody else's measurement
77
- of a different id, so it is not in `limits.mjs`: measure it before adding it.
87
+ **The same shape on a second upstream.** `mimo-v2.6-flash-free` is declared
88
+ 200000/32000 here too, and its window is a route figure like the one above — an
89
+ 850,249 token prompt was served first, its needle echoed back, and then a prompt
90
+ just over the wall was refused with
91
+
92
+ ```
93
+ This endpoint's maximum context length is 1048576 tokens. However, you requested
94
+ about 1496523 tokens (1295079 of text input, 1444 of tool input, 200000 in the
95
+ output).
96
+ ```
97
+
98
+ which is the route naming its own window, on an upstream that words it
99
+ differently from the DeepSeek ids. Its output is the first figure in this file
100
+ resting on a vendor page: that same refusal came back with the 200000 it was
101
+ asked for, unclamped, so this route states no completion ceiling of its own, and
102
+ 131072 is Xiaomi's entry for `mimo-v2.6-flash` (`api.xiaomimimo.com`, and its
103
+ China token plan). Nothing above 32000 has been watched on this route, and
104
+ `samples` says that rather than implying a witness.
78
105
 
79
106
  ## The loop
80
107
 
package/limits.mjs CHANGED
@@ -48,14 +48,37 @@ export const LIMITS = {
48
48
  how: "deepseek-v4.1-flash, the paid id serving the same upstream model, is declared 384000 in this same catalogue; DeepSeek's own page says 384K, which is 393216 read as binary K",
49
49
  },
50
50
  },
51
+ "mimo-v2.6-flash-free": {
52
+ context: {
53
+ value: 1048576,
54
+ source: "route",
55
+ declaredAt: 200000,
56
+ measured: "2026-10-15",
57
+ samples: "an 850,249 token prompt served, its needle echoed back; a prompt just over the window refused 400",
58
+ how: "a different upstream from the DeepSeek ids, and it says so in its own words: \"This endpoint's maximum context length is 1048576 tokens. However, you requested about 1496523 tokens (1295079 of text input, 1444 of tool input, 200000 in the output).\"",
59
+ },
60
+ output: {
61
+ value: 131072,
62
+ source: "vendor",
63
+ declaredAt: 32000,
64
+ measured: "2026-10-15",
65
+ samples: "nothing above 32000 watched on this route; that same refusal came back with the requested 200000 unclamped",
66
+ how: "Xiaomi's own entry for mimo-v2.6-flash, api.xiaomimimo.com and its China token plan, declares 1048576/131072, as do DeepInfra and nan; this route declares 32000 for the free id and states no completion ceiling of its own",
67
+ },
68
+ },
51
69
  };
52
70
 
53
71
  // "This model's maximum context length is 1048576 tokens. However, you
54
72
  // requested 1422278 tokens (1038278 in the messages, 384000 in the
55
73
  // completion)." — the route's own words, and the only sentence seen on this
56
- // route that states a window. A generic 400 says nothing attributable and is
57
- // left alone; §7 of the measured notes has a context overflow and an invalid
58
- // parameter answering with byte-identical 400s on another Zen model.
74
+ // route that states a window. A second upstream phrases the same fact as "This
75
+ // endpoint's maximum context length is ...", with the request broken into text
76
+ // input, tool input and output; both are the route naming its own window, and
77
+ // its "requested about" figure is a rough one (chars, not tokens) rather than
78
+ // the count a served request reports in `usage.prompt_tokens`. A generic 400
79
+ // says nothing attributable and is left alone; §7 of the measured notes has a
80
+ // context overflow and an invalid parameter answering with byte-identical 400s
81
+ // on another Zen model.
59
82
  const NAMED_CONTEXT = /maximum context length is (\d+) tokens/i;
60
83
 
61
84
  // Windows named by a refusal while this process is running, by model id. Not
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-zen-freex",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "OpenCode Zen's free models, for hosts that are not OpenCode: the public credential, automatic discovery and native streaming protocols",
5
5
  "type": "module",
6
6
  "main": "./index.mjs",