@evandu/super-pi 0.1.195 → 0.1.197
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.
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"src/client/types.ts": "0d32fd568f188507ce2b48266f44fa20da1bcf436090893b1ff0c164ed0f3132",
|
|
41
41
|
"src/client/vite-env.d.ts": "65996936fbb042915f7b74a200fcdde7e410f32a669b1ab9597cfaa4b0faddb5"
|
|
42
42
|
},
|
|
43
|
-
"recordedAt": "2026-11-
|
|
43
|
+
"recordedAt": "2026-11-12T07:48:53.097Z"
|
|
44
44
|
}
|
|
@@ -171,6 +171,10 @@ const EVENT_TEXT = {
|
|
|
171
171
|
submitted: "提交交付", reviewed: "复核", review_requested: "启动复核", task_updated: "任务更新", status: "状态变更",
|
|
172
172
|
budget: "预算变更", report: "进展汇报", escalated: "例外升级", decision: "决定",
|
|
173
173
|
completed: "项目完成", ready: "依赖就绪", unreachable: "转述对象不可达",
|
|
174
|
+
// THE REPORT IS READ BY PEOPLE. Every other line of the timeline is printed in Chinese, so the
|
|
175
|
+
// one warning that says "your leader landed on the workspace default agent" must not be the
|
|
176
|
+
// only line a reader meets as an English identifier.
|
|
177
|
+
"leader-profile-missing": "负责人配置缺失",
|
|
174
178
|
};
|
|
175
179
|
const ESCALATION_STATUS_TEXT = { open: "未决", resolved: "已解决", dismissed: "已忽略", returned: "已退回补充材料" };
|
|
176
180
|
const SEVERITY_TEXT = { low: "低", medium: "中", high: "高" };
|
|
@@ -6,6 +6,15 @@ import { type ModelStore } from "./models-store.js";
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const SUPER_PI_DEFAULT_CONTEXT_WINDOW = 128000;
|
|
8
8
|
export declare const SUPER_PI_DEFAULT_MAX_TOKENS = 16384;
|
|
9
|
+
/**
|
|
10
|
+
* THE OUTPUT LIMIT SUPER PI GUESSES FOR A MODEL THAT THINKS.
|
|
11
|
+
*
|
|
12
|
+
* A reasoning model is given a bigger answer budget than an ordinary one, and 32768 is that guess.
|
|
13
|
+
* **It is a GUESS, and a guess is not a decision** — exactly like the 128000 above. When the
|
|
14
|
+
* provider publishes the real figure, that figure wins; and when the guess is what ends up in the
|
|
15
|
+
* person's file, the arbitration must not later read it as something somebody typed.
|
|
16
|
+
*/
|
|
17
|
+
export declare const SUPER_PI_GUESSED_MAX_TOKENS = 32768;
|
|
9
18
|
/** One model's declared window, as the person's file states it. */
|
|
10
19
|
export type DeclaredWindow = {
|
|
11
20
|
provider: string;
|
|
@@ -48,6 +48,15 @@ import { readModelStore, storeWindowFor } from "./models-store.js";
|
|
|
48
48
|
*/
|
|
49
49
|
export const SUPER_PI_DEFAULT_CONTEXT_WINDOW = 128000;
|
|
50
50
|
export const SUPER_PI_DEFAULT_MAX_TOKENS = 16384;
|
|
51
|
+
/**
|
|
52
|
+
* THE OUTPUT LIMIT SUPER PI GUESSES FOR A MODEL THAT THINKS.
|
|
53
|
+
*
|
|
54
|
+
* A reasoning model is given a bigger answer budget than an ordinary one, and 32768 is that guess.
|
|
55
|
+
* **It is a GUESS, and a guess is not a decision** — exactly like the 128000 above. When the
|
|
56
|
+
* provider publishes the real figure, that figure wins; and when the guess is what ends up in the
|
|
57
|
+
* person's file, the arbitration must not later read it as something somebody typed.
|
|
58
|
+
*/
|
|
59
|
+
export const SUPER_PI_GUESSED_MAX_TOKENS = 32768;
|
|
51
60
|
/**
|
|
52
61
|
* The windows the person's `models.json` declares, keyed by `provider/modelId`.
|
|
53
62
|
*
|
|
@@ -263,7 +272,13 @@ export function arbitrateContextWindow(declared, store, provider, modelId, repor
|
|
|
263
272
|
* catalogue's real figure.
|
|
264
273
|
*/
|
|
265
274
|
function isDeliberateMaxTokens(maxTokens) {
|
|
266
|
-
|
|
275
|
+
// BOTH OF SUPER PI'S OWN NUMBERS ARE PLACEHOLDERS, NOT DECISIONS. 16384 is the default it stamps
|
|
276
|
+
// on every model the provider did not describe, and 32768 is the bigger budget it guesses for a
|
|
277
|
+
// model that thinks. A value equal to either of them is Super Pi's own guess coming back from
|
|
278
|
+
// the file it was written to - and a guess must never outrank the catalogue's real figure.
|
|
279
|
+
return (maxTokens !== undefined &&
|
|
280
|
+
maxTokens !== SUPER_PI_DEFAULT_MAX_TOKENS &&
|
|
281
|
+
maxTokens !== SUPER_PI_GUESSED_MAX_TOKENS);
|
|
267
282
|
}
|
|
268
283
|
/**
|
|
269
284
|
* What the catalogue says about how long ONE ANSWER of this model may be.
|
package/dist/server/providers.js
CHANGED
|
@@ -2,6 +2,7 @@ import { randomUUID } from "node:crypto";
|
|
|
2
2
|
import { mkdir, readFile, rename, stat, writeFile } from "node:fs/promises";
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
import { readModelStore, storeWindowFor } from "./models-store.js";
|
|
5
|
+
import { SUPER_PI_DEFAULT_MAX_TOKENS, SUPER_PI_GUESSED_MAX_TOKENS as GUESSED_MAX_TOKENS } from "./model-context-window.js";
|
|
5
6
|
/**
|
|
6
7
|
* The API adapters Pi ships, as the ids a provider may name.
|
|
7
8
|
*
|
|
@@ -25,7 +26,9 @@ export const KNOWN_APIS = [
|
|
|
25
26
|
/** The context window a model gets when the form does not say. Pi's own default. */
|
|
26
27
|
const DEFAULT_CONTEXT_WINDOW = 128000;
|
|
27
28
|
/** The output budget a model gets when the form does not say. Pi's own default. */
|
|
28
|
-
|
|
29
|
+
// THE SAME NUMBER AS `SUPER_PI_DEFAULT_MAX_TOKENS`, READ FROM THERE: the placeholder Super Pi
|
|
30
|
+
// stamps is the placeholder the arbitration must recognise later, so they cannot be two literals.
|
|
31
|
+
const DEFAULT_MAX_TOKENS = SUPER_PI_DEFAULT_MAX_TOKENS;
|
|
29
32
|
/**
|
|
30
33
|
* Pi's global configuration directory - where `models.json` and `auth.json` live.
|
|
31
34
|
*
|
|
@@ -820,7 +823,12 @@ export function parseRemoteModels(payload) {
|
|
|
820
823
|
const contextWindow = typeof rec.context_window === "number"
|
|
821
824
|
? rec.context_window
|
|
822
825
|
: catalogue?.contextWindow ?? DEFAULT_CONTEXT_WINDOW;
|
|
823
|
-
|
|
826
|
+
// THE CATALOGUE OUTRANKS THE REASONING GUESS, AND THE ORDER IS THE WHOLE POINT. A reasoning
|
|
827
|
+
// model used to be stamped with 32768 BEFORE the catalogue was consulted, so a model whose
|
|
828
|
+
// provider publishes a bigger answer limit got a smaller one - the same hole as the window
|
|
829
|
+
// one number over, with the same consequence: the limit Super Pi invented is the limit the
|
|
830
|
+
// session runs on. The guess is what is left when nobody knows better.
|
|
831
|
+
const maxTokens = catalogue?.maxTokens ?? (reasoning ? GUESSED_MAX_TOKENS : DEFAULT_MAX_TOKENS);
|
|
824
832
|
discovered.push({
|
|
825
833
|
id,
|
|
826
834
|
name: id,
|