@project-ava-supernova/core 0.2.81 → 0.2.83
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/dist/agent/system-prompt.d.ts +11 -1
- package/dist/agent/system-prompt.d.ts.map +1 -1
- package/dist/agent/system-prompt.js +27 -1
- package/dist/agent/system-prompt.js.map +1 -1
- package/dist/audit/cost.d.ts.map +1 -1
- package/dist/audit/cost.js +1 -0
- package/dist/audit/cost.js.map +1 -1
- package/dist/auto/auto-coordinator.d.ts.map +1 -1
- package/dist/auto/auto-coordinator.js +14 -10
- package/dist/auto/auto-coordinator.js.map +1 -1
- package/dist/auto/coordinator-model.d.ts.map +1 -1
- package/dist/auto/coordinator-model.js +15 -3
- package/dist/auto/coordinator-model.js.map +1 -1
- package/dist/auto/intent-gate.d.ts.map +1 -1
- package/dist/auto/intent-gate.js +9 -3
- package/dist/auto/intent-gate.js.map +1 -1
- package/dist/auto/longxiang-router.d.ts +25 -7
- package/dist/auto/longxiang-router.d.ts.map +1 -1
- package/dist/auto/longxiang-router.js +33 -15
- package/dist/auto/longxiang-router.js.map +1 -1
- package/dist/auto/model-router.d.ts.map +1 -1
- package/dist/auto/model-router.js +3 -2
- package/dist/auto/model-router.js.map +1 -1
- package/dist/auto/supernova-router.d.ts +37 -8
- package/dist/auto/supernova-router.d.ts.map +1 -1
- package/dist/auto/supernova-router.js +69 -35
- package/dist/auto/supernova-router.js.map +1 -1
- package/dist/auto/task-classifier.d.ts.map +1 -1
- package/dist/auto/task-classifier.js +3 -2
- package/dist/auto/task-classifier.js.map +1 -1
- package/dist/billing/credits.d.ts +8 -5
- package/dist/billing/credits.d.ts.map +1 -1
- package/dist/billing/credits.js +27 -5
- package/dist/billing/credits.js.map +1 -1
- package/dist/docs/content/concepts.d.ts.map +1 -1
- package/dist/docs/content/concepts.js +18 -17
- package/dist/docs/content/concepts.js.map +1 -1
- package/dist/docs/content/start.js +1 -1
- package/dist/docs/content/start.js.map +1 -1
- package/dist/docs/data/providers.d.ts.map +1 -1
- package/dist/docs/data/providers.js +20 -17
- package/dist/docs/data/providers.js.map +1 -1
- package/dist/docs/i18n/translations.d.ts.map +1 -1
- package/dist/docs/i18n/translations.js +1 -1
- package/dist/docs/i18n/translations.js.map +1 -1
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +15 -2
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +15 -2
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +8 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +15 -2
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +15 -2
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +15 -2
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +15 -2
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/id.d.ts.map +1 -1
- package/dist/i18n/locales/id.js +15 -2
- package/dist/i18n/locales/id.js.map +1 -1
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +15 -2
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +15 -2
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/ko.d.ts.map +1 -1
- package/dist/i18n/locales/ko.js +14 -1
- package/dist/i18n/locales/ko.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +15 -2
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +15 -2
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +15 -2
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +15 -2
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/th.d.ts.map +1 -1
- package/dist/i18n/locales/th.js +15 -2
- package/dist/i18n/locales/th.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +15 -2
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/uk.d.ts.map +1 -1
- package/dist/i18n/locales/uk.js +15 -2
- package/dist/i18n/locales/uk.js.map +1 -1
- package/dist/i18n/locales/vi.d.ts.map +1 -1
- package/dist/i18n/locales/vi.js +15 -2
- package/dist/i18n/locales/vi.js.map +1 -1
- package/dist/i18n/locales/zh-CN.d.ts.map +1 -1
- package/dist/i18n/locales/zh-CN.js +15 -2
- package/dist/i18n/locales/zh-CN.js.map +1 -1
- package/dist/i18n/locales/zh-TW.d.ts.map +1 -1
- package/dist/i18n/locales/zh-TW.js +15 -2
- package/dist/i18n/locales/zh-TW.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/memory/ambient-capture.d.ts +11 -0
- package/dist/memory/ambient-capture.d.ts.map +1 -1
- package/dist/memory/ambient-capture.js +61 -0
- package/dist/memory/ambient-capture.js.map +1 -1
- package/dist/memory/memory-agent.d.ts.map +1 -1
- package/dist/memory/memory-agent.js +21 -3
- package/dist/memory/memory-agent.js.map +1 -1
- package/dist/memory/types.d.ts +12 -0
- package/dist/memory/types.d.ts.map +1 -1
- package/dist/memory/types.js.map +1 -1
- package/dist/providers/deepseek/models.js +1 -1
- package/dist/providers/deepseek/models.js.map +1 -1
- package/dist/providers/platform/models.d.ts.map +1 -1
- package/dist/providers/platform/models.js +28 -1
- package/dist/providers/platform/models.js.map +1 -1
- package/dist/providers/qwen/models.d.ts.map +1 -1
- package/dist/providers/qwen/models.js +27 -0
- package/dist/providers/qwen/models.js.map +1 -1
- package/package.json +1 -1
|
@@ -97,14 +97,32 @@ export const LONGXIANG_COORDINATOR_ID = 'kimi-k3';
|
|
|
97
97
|
* 81.2 FrontierSWE), so there is nothing to gain by handing the build to a
|
|
98
98
|
* weaker seat. Front and centre by design. */
|
|
99
99
|
export const LONGXIANG_BUILDER_ID = 'kimi-k3';
|
|
100
|
-
/** Vision input override — Qwen 3.
|
|
100
|
+
/** Vision input override — Qwen 3.8 Flash, not K3. This is a COST call, not a
|
|
101
101
|
* capability one: K3 sees natively too (text+image+video), but at $3/$15 it
|
|
102
|
-
* is ~
|
|
103
|
-
* tuned against on Supernova. K3 remains a genuine vision fallback.
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
*
|
|
107
|
-
export const
|
|
102
|
+
* is ~20x this seat, and Qwen is the model our vision paths are already
|
|
103
|
+
* tuned against on Supernova. K3 remains a genuine vision fallback.
|
|
104
|
+
*
|
|
105
|
+
* Moved off 3.7 Plus in the 2026-09-10 fleet evaluation, in step with
|
|
106
|
+
* Supernova so both fleets look at a picture with the same model. */
|
|
107
|
+
export const LONGXIANG_VISION_ID = 'qwen3.8-flash';
|
|
108
|
+
/** Intent gate — Qwen 3.5 Flash, the cheapest and fastest model in the fleet.
|
|
109
|
+
*
|
|
110
|
+
* This was DeepSeek Flash, picked when it was the cheap half of a two-tier
|
|
111
|
+
* DeepSeek. It is not cheap any more relative to the alternatives: $0.15
|
|
112
|
+
* input against Qwen 3.5 Flash's $0.05, on a call that runs before EVERY
|
|
113
|
+
* turn and emits a single category label.
|
|
114
|
+
*
|
|
115
|
+
* Latency is the bigger half of the argument. This call sits in front of
|
|
116
|
+
* every answer the user sees, so time-to-first-token is what it costs them,
|
|
117
|
+
* and 3.5 Flash activates 3B parameters per token against 3.8 Flash's 6B.
|
|
118
|
+
* It is also the gate Maestro and Supernova already run, so all three fleets
|
|
119
|
+
* now classify with one model instead of three.
|
|
120
|
+
*
|
|
121
|
+
* Accuracy is NOT the reason: 3.5 Flash scored 20/20 on the August gate set,
|
|
122
|
+
* which means that set is saturated and cannot separate the candidates. A
|
|
123
|
+
* wider test with TTFT as the primary axis is what would actually settle
|
|
124
|
+
* this seat. */
|
|
125
|
+
export const LONGXIANG_INTENT_GATE_ID = 'qwen3.7-flash';
|
|
108
126
|
export const LONGXIANG_ROUTES = {
|
|
109
127
|
// ── Depth routes → K3 (the Peak) ──────────────────────────────────────
|
|
110
128
|
// Builder territory. This is the seat the whole fleet is built around.
|
|
@@ -116,21 +134,21 @@ export const LONGXIANG_ROUTES = {
|
|
|
116
134
|
// ── Vision + long-context → Qwen 3.7 Plus (the Base) ──────────────────
|
|
117
135
|
// Both seats see natively; Qwen carries vision on cost, K3 is a real
|
|
118
136
|
// fallback (not a degraded one) if Qwen is unreachable.
|
|
119
|
-
vision: { modelId: 'qwen3.
|
|
137
|
+
vision: { modelId: 'qwen3.8-flash', reason: 'Qwen 3.8 Flash — native vision + video, 1M context, flash-tier cost', fallbackModelId: 'kimi-k3', requiresVision: true },
|
|
120
138
|
// Both K3 and Qwen are long-context; route on cost — Qwen is the cheaper
|
|
121
139
|
// place to push a large prompt, K3 is the depth ceiling.
|
|
122
|
-
long_context: { modelId: 'qwen3.
|
|
140
|
+
long_context: { modelId: 'qwen3.8-flash', reason: 'Qwen 3.8 Flash — 1M context at flash-tier cost; K3 reserved for depth', fallbackModelId: 'kimi-k3' },
|
|
123
141
|
// Teach = Tutor + Curriculum Architect, medium depth. Curriculum *creation*
|
|
124
142
|
// upgrades to K3 — running the 5-persona prep team mid-tier goes shallow.
|
|
125
|
-
teach: { modelId: 'qwen3.
|
|
143
|
+
teach: { modelId: 'qwen3.8-flash', reason: 'Qwen 3.8 Flash — long-form coherence for tutorials and lesson delivery', fallbackModelId: 'deepseek-flash', creationModelId: 'kimi-k3' },
|
|
126
144
|
// ── Volume routes → DeepSeek Flash (the River) ─────────────────────
|
|
127
145
|
// image_gen routes a generate_image tool call out to Qwen-Image — the model
|
|
128
146
|
// here only orchestrates, so depth is wasted spend.
|
|
129
|
-
image_gen: { modelId: 'deepseek-flash', reason: 'DeepSeek Flash — orchestrates generate_image tool calls; depth not required at this layer', fallbackModelId: 'qwen3.7-plus' },
|
|
147
|
+
image_gen: { modelId: 'deepseek-flash', reason: 'DeepSeek V4.1 Flash — orchestrates generate_image tool calls; depth not required at this layer', fallbackModelId: 'qwen3.7-plus' },
|
|
130
148
|
// Chat is a single-turn response — doesn't exercise the coordinator pattern.
|
|
131
|
-
chat: { modelId: 'deepseek-flash', reason: 'DeepSeek Flash — fast, cheapest tier in the fleet for typical chat turns', fallbackModelId: 'qwen3.7-plus' },
|
|
149
|
+
chat: { modelId: 'deepseek-flash', reason: 'DeepSeek V4.1 Flash — fast, cheapest tier in the fleet for typical chat turns', fallbackModelId: 'qwen3.7-plus' },
|
|
132
150
|
// Brainstorm = breadth over depth — cheap and creatively wide beats careful.
|
|
133
|
-
brainstorm: { modelId: 'deepseek-flash', reason: 'DeepSeek Flash — breadth and speed for ideation at the fleet\'s lowest cost', fallbackModelId: 'qwen3.7-plus' },
|
|
151
|
+
brainstorm: { modelId: 'deepseek-flash', reason: 'DeepSeek V4.1 Flash — breadth and speed for ideation at the fleet\'s lowest cost', fallbackModelId: 'qwen3.7-plus' },
|
|
134
152
|
};
|
|
135
153
|
// ── Per-persona override map ──────────────────────────────────────────────
|
|
136
154
|
//
|
|
@@ -152,8 +170,8 @@ export const LONGXIANG_PERSONA_MODEL = {
|
|
|
152
170
|
cve_researcher: 'kimi-k3', // deep reasoning over attack chain
|
|
153
171
|
ideator: 'kimi-k3', // reasoning depth 5
|
|
154
172
|
// Mid-tier — long output and anything that needs eyes.
|
|
155
|
-
content_writer: 'qwen3.
|
|
156
|
-
design_reviewer: 'qwen3.
|
|
173
|
+
content_writer: 'qwen3.8-flash', // long-form coherence, newer generation
|
|
174
|
+
design_reviewer: 'qwen3.8-flash', // sees images + video natively
|
|
157
175
|
// Light + mid-light specialists — volume tier.
|
|
158
176
|
scout: 'deepseek-flash',
|
|
159
177
|
verifier: 'deepseek-flash',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"longxiang-router.js","sourceRoot":"","sources":["../../src/auto/longxiang-router.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AAEH,6EAA6E;AAE7E;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAEtC,6EAA6E;AAE7E;yEACyE;AACzE,MAAM,CAAC,MAAM,wBAAwB,GAAG,SAAS,CAAC;AAElD;;;+CAG+C;AAC/C,MAAM,CAAC,MAAM,oBAAoB,GAAG,SAAS,CAAC;AAE9C
|
|
1
|
+
{"version":3,"file":"longxiang-router.js","sourceRoot":"","sources":["../../src/auto/longxiang-router.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AAEH,6EAA6E;AAE7E;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAEtC,6EAA6E;AAE7E;yEACyE;AACzE,MAAM,CAAC,MAAM,wBAAwB,GAAG,SAAS,CAAC;AAElD;;;+CAG+C;AAC/C,MAAM,CAAC,MAAM,oBAAoB,GAAG,SAAS,CAAC;AAE9C;;;;;;sEAMsE;AACtE,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC;AAEnD;;;;;;;;;;;;;;;;iBAgBiB;AACjB,MAAM,CAAC,MAAM,wBAAwB,GAAG,eAAe,CAA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|
-
{"version":3,"file":"model-router.d.ts","sourceRoot":"","sources":["../../src/auto/model-router.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAQlF,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAClE,YAAY,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAoDtD;;;;;;;GAOG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,kBAAkB,CAAc;IACxC,OAAO,CAAC,WAAW,CAAU;IAC7B,OAAO,CAAC,eAAe,CAAuB;IAC9C,OAAO,CAAC,IAAI,CAAc;gBAGxB,gBAAgB,EAAE,gBAAgB,EAClC,kBAAkB,EAAE,GAAG,CAAC,MAAM,CAAC,EAC/B,WAAW,CAAC,EAAE,MAAM,EACpB,eAAe,CAAC,EAAE,oBAAoB,EACtC,IAAI,GAAE,WAAoB;IAS5B;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,QAAQ,EAAE,YAAY,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,WAAW,GAAG,IAAI;IA8DxG,qDAAqD;IACrD,QAAQ,CAAC,QAAQ,EAAE,YAAY,GAAG,OAAO;IAIzC,0DAA0D;IAC1D,cAAc,CAAC,KAAK,EAAE,oBAAoB,GAAG,IAAI;IAIjD,OAAO,CAAC,YAAY;IA4BpB,OAAO,CAAC,eAAe;
|
|
1
|
+
{"version":3,"file":"model-router.d.ts","sourceRoot":"","sources":["../../src/auto/model-router.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAQlF,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAClE,YAAY,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAoDtD;;;;;;;GAOG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,gBAAgB,CAAmB;IAC3C,OAAO,CAAC,kBAAkB,CAAc;IACxC,OAAO,CAAC,WAAW,CAAU;IAC7B,OAAO,CAAC,eAAe,CAAuB;IAC9C,OAAO,CAAC,IAAI,CAAc;gBAGxB,gBAAgB,EAAE,gBAAgB,EAClC,kBAAkB,EAAE,GAAG,CAAC,MAAM,CAAC,EAC/B,WAAW,CAAC,EAAE,MAAM,EACpB,eAAe,CAAC,EAAE,oBAAoB,EACtC,IAAI,GAAE,WAAoB;IAS5B;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,QAAQ,EAAE,YAAY,EAAE,aAAa,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,WAAW,GAAG,IAAI;IA8DxG,qDAAqD;IACrD,QAAQ,CAAC,QAAQ,EAAE,YAAY,GAAG,OAAO;IAIzC,0DAA0D;IAC1D,cAAc,CAAC,KAAK,EAAE,oBAAoB,GAAG,IAAI;IAIjD,OAAO,CAAC,YAAY;IA4BpB,OAAO,CAAC,eAAe;IA6CvB,OAAO,CAAC,mBAAmB;CAG5B"}
|
|
@@ -175,8 +175,9 @@ export class ModelRouter {
|
|
|
175
175
|
// fallbacks. MiniMax excluded — BYOK chat only.
|
|
176
176
|
//
|
|
177
177
|
// `deepseek-chat` was here until 2026-07-17: DeepSeek retires that id (and
|
|
178
|
-
// `deepseek-reasoner`) on 2026-07-24, after which it 400s.
|
|
179
|
-
//
|
|
178
|
+
// `deepseek-reasoner`) on 2026-07-24, after which it 400s. Since
|
|
179
|
+
// 2026-09-10 there is exactly one DeepSeek model, `deepseek-flash`, and
|
|
180
|
+
// every id we have ever shipped maps onto it via DEEPSEEK_RETIRED_IDS.
|
|
180
181
|
const byokModels = ['kimi-k3', 'kimi-k2.7-code', 'kimi-k2.6', 'deepseek-flash', 'glm-5.3', 'mistral-medium-3.5', 'qwen3.7-plus', 'qwen3.5-plus', 'qwen3.5-flash'];
|
|
181
182
|
for (const id of byokModels) {
|
|
182
183
|
const result = this.providerRegistry.resolveModel(id);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-router.js","sourceRoot":"","sources":["../../src/auto/model-router.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,6EAA6E;AAC7E,6EAA6E;AAC7E,oEAAoE;AACpE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAwBlE,4EAA4E;AAC5E,+EAA+E;AAC/E,6EAA6E;AAC7E,2EAA2E;AAC3E,6EAA6E;AAC7E,4CAA4C;AAC5C,kHAAkH;AAClH,MAAM,cAAc,GAAqC;IACvD,MAAM,EAAQ,EAAE,OAAO,EAAE,cAAc,EAAO,MAAM,EAAE,mEAAmE,EAAE,eAAe,EAAE,cAAc,EAAE;IAC5J,oEAAoE;IACpE,MAAM,EAAQ,EAAE,OAAO,EAAE,cAAc,EAAO,MAAM,EAAE,mDAAmD,EAAE,eAAe,EAAE,cAAc,EAAE,cAAc,EAAE,IAAI,EAAE;IAClK,+DAA+D;IAC/D,+DAA+D;IAC/D,SAAS,EAAK,EAAE,OAAO,EAAE,eAAe,EAAM,MAAM,EAAE,2FAA2F,EAAE,eAAe,EAAE,cAAc,EAAE;IACpL,8D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@@ -6,10 +6,14 @@ import type { TaskCategory } from './types.js';
|
|
|
6
6
|
* it. Supernova picks the best model for each role based on what each model
|
|
7
7
|
* is actually best at:
|
|
8
8
|
*
|
|
9
|
-
* - DeepSeek Flash
|
|
9
|
+
* - DeepSeek Flash — coordinator, deep reasoning, long-context synthesis,
|
|
10
|
+
* AND the mid-tier review/verification seat. DeepSeek
|
|
11
|
+
* collapsed its line into one model on 2026-09-10, so
|
|
12
|
+
* every DeepSeek seat below is the same model at the
|
|
13
|
+
* same price. The seats are still distinct roles; they
|
|
14
|
+
* are no longer distinct tiers.
|
|
10
15
|
* - Qwen 3.7 Plus — agent loops (Terminal-Bench leader), vision input,
|
|
11
16
|
* MCP tool orchestration, production-tested
|
|
12
|
-
* - DeepSeek Flash — mid-tier review/verification, anomaly price/perf
|
|
13
17
|
* - Qwen 3.5 Plus — OUTAGE FALLBACK ONLY (retired from primary routes,
|
|
14
18
|
* operator decision 2026-07-04)
|
|
15
19
|
* - Qwen 3.5 Flash — light filtering / classification (cheapest input)
|
|
@@ -25,12 +29,37 @@ export declare const SUPERNOVA_COORDINATOR_ID = "deepseek-flash";
|
|
|
25
29
|
* attached screenshot doesn't need a re-route. */
|
|
26
30
|
export declare const SUPERNOVA_BUILDER_ID = "qwen3.7-plus";
|
|
27
31
|
/** Vision input override — any prompt with images bypasses persona / category
|
|
28
|
-
* routing and lands on Qwen 3.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
|
|
32
|
+
* routing and lands on Qwen 3.8 Flash (native vision + video).
|
|
33
|
+
*
|
|
34
|
+
* Two moves got this here. It used to be forced: DeepSeek was blind at the
|
|
35
|
+
* API level, so vision HAD to leave the family. That stopped being true when
|
|
36
|
+
* V4.1 Flash shipped multimodal, which turned it into a choice — and the
|
|
37
|
+
* choice stayed with Qwen because our vision paths are tuned against it and
|
|
38
|
+
* DeepSeek's vision is new and unproven here.
|
|
39
|
+
*
|
|
40
|
+
* The 2026-09-10 fleet evaluation then moved it off 3.7 Plus. Qwen 3.8 Flash
|
|
41
|
+
* reads images AND video at roughly a third the cost, and this seat only ever
|
|
42
|
+
* looks at a picture — no agentic depth to regress. That made it the safest
|
|
43
|
+
* place to take the new model first, ahead of the Builder seat. */
|
|
44
|
+
export declare const SUPERNOVA_VISION_ID = "qwen3.8-flash";
|
|
45
|
+
/** Intent gate — Qwen 3.7 Flash. Same model every fleet uses upstream of spawn
|
|
46
|
+
* decisions, so one model classifies for all of them. *
|
|
47
|
+
* MEASURED 2026-09-10, 280 calls per candidate through DashScope:
|
|
48
|
+
*
|
|
49
|
+
* accuracy p50 p95 p99 worst
|
|
50
|
+
* 3.5 Flash 92.9% 538ms 672ms 847ms 1310ms
|
|
51
|
+
* 3.7 Flash 99.6% 570ms 790ms 1284ms 1667ms
|
|
52
|
+
* 3.8 Flash 96.8% 698ms 2532ms 27038ms 51700ms
|
|
53
|
+
*
|
|
54
|
+
* 3.7 Flash was parked since July on a REPORTED P99 above 90 seconds. It does
|
|
55
|
+
* not reproduce: 1284ms here. 3.8 Flash is out on its tail alone — 27s at p99
|
|
56
|
+
* in front of every turn is felt as the product hanging.
|
|
57
|
+
*
|
|
58
|
+
* The 32ms it gives up at p50 buys 6.8 points of accuracy, and a miss here is
|
|
59
|
+
* not a worse answer — it spawns a whole specialist team for a question the
|
|
60
|
+
* coordinator should have taken alone. Re-run scripts/gate-bench.mjs before
|
|
61
|
+
* moving this again. */
|
|
62
|
+
export declare const SUPERNOVA_INTENT_GATE_ID = "qwen3.7-flash";
|
|
34
63
|
export interface SupernovaRouteEntry {
|
|
35
64
|
modelId: string;
|
|
36
65
|
reason: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supernova-router.d.ts","sourceRoot":"","sources":["../../src/auto/supernova-router.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C
|
|
1
|
+
{"version":3,"file":"supernova-router.d.ts","sourceRoot":"","sources":["../../src/auto/supernova-router.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAIH,6EAA6E;AAC7E,eAAO,MAAM,wBAAwB,mBAAmB,CAAC;AAEzD;;mDAEmD;AACnD,eAAO,MAAM,oBAAoB,iBAAiB,CAAC;AAEnD;;;;;;;;;;;;oEAYoE;AACpE,eAAO,MAAM,mBAAmB,kBAAkB,CAAC;AAEnD;;;;;;;;;;;;;;;;yBAgByB;AACzB,eAAO,MAAM,wBAAwB,kBAAkB,CAAC;AAOxD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,gGAAgG;IAChG,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,YAAY,EAAE,mBAAmB,CAqCtE,CAAC;AAWF,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAmC1D,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,GACrB,MAAM,CAER"}
|
|
@@ -5,10 +5,14 @@
|
|
|
5
5
|
* it. Supernova picks the best model for each role based on what each model
|
|
6
6
|
* is actually best at:
|
|
7
7
|
*
|
|
8
|
-
* - DeepSeek Flash
|
|
8
|
+
* - DeepSeek Flash — coordinator, deep reasoning, long-context synthesis,
|
|
9
|
+
* AND the mid-tier review/verification seat. DeepSeek
|
|
10
|
+
* collapsed its line into one model on 2026-09-10, so
|
|
11
|
+
* every DeepSeek seat below is the same model at the
|
|
12
|
+
* same price. The seats are still distinct roles; they
|
|
13
|
+
* are no longer distinct tiers.
|
|
9
14
|
* - Qwen 3.7 Plus — agent loops (Terminal-Bench leader), vision input,
|
|
10
15
|
* MCP tool orchestration, production-tested
|
|
11
|
-
* - DeepSeek Flash — mid-tier review/verification, anomaly price/perf
|
|
12
16
|
* - Qwen 3.5 Plus — OUTAGE FALLBACK ONLY (retired from primary routes,
|
|
13
17
|
* operator decision 2026-07-04)
|
|
14
18
|
* - Qwen 3.5 Flash — light filtering / classification (cheapest input)
|
|
@@ -25,53 +29,80 @@ export const SUPERNOVA_COORDINATOR_ID = 'deepseek-flash';
|
|
|
25
29
|
* attached screenshot doesn't need a re-route. */
|
|
26
30
|
export const SUPERNOVA_BUILDER_ID = 'qwen3.7-plus';
|
|
27
31
|
/** Vision input override — any prompt with images bypasses persona / category
|
|
28
|
-
* routing and lands on Qwen 3.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
|
|
32
|
+
* routing and lands on Qwen 3.8 Flash (native vision + video).
|
|
33
|
+
*
|
|
34
|
+
* Two moves got this here. It used to be forced: DeepSeek was blind at the
|
|
35
|
+
* API level, so vision HAD to leave the family. That stopped being true when
|
|
36
|
+
* V4.1 Flash shipped multimodal, which turned it into a choice — and the
|
|
37
|
+
* choice stayed with Qwen because our vision paths are tuned against it and
|
|
38
|
+
* DeepSeek's vision is new and unproven here.
|
|
39
|
+
*
|
|
40
|
+
* The 2026-09-10 fleet evaluation then moved it off 3.7 Plus. Qwen 3.8 Flash
|
|
41
|
+
* reads images AND video at roughly a third the cost, and this seat only ever
|
|
42
|
+
* looks at a picture — no agentic depth to regress. That made it the safest
|
|
43
|
+
* place to take the new model first, ahead of the Builder seat. */
|
|
44
|
+
export const SUPERNOVA_VISION_ID = 'qwen3.8-flash';
|
|
45
|
+
/** Intent gate — Qwen 3.7 Flash. Same model every fleet uses upstream of spawn
|
|
46
|
+
* decisions, so one model classifies for all of them. *
|
|
47
|
+
* MEASURED 2026-09-10, 280 calls per candidate through DashScope:
|
|
48
|
+
*
|
|
49
|
+
* accuracy p50 p95 p99 worst
|
|
50
|
+
* 3.5 Flash 92.9% 538ms 672ms 847ms 1310ms
|
|
51
|
+
* 3.7 Flash 99.6% 570ms 790ms 1284ms 1667ms
|
|
52
|
+
* 3.8 Flash 96.8% 698ms 2532ms 27038ms 51700ms
|
|
53
|
+
*
|
|
54
|
+
* 3.7 Flash was parked since July on a REPORTED P99 above 90 seconds. It does
|
|
55
|
+
* not reproduce: 1284ms here. 3.8 Flash is out on its tail alone — 27s at p99
|
|
56
|
+
* in front of every turn is felt as the product hanging.
|
|
57
|
+
*
|
|
58
|
+
* The 32ms it gives up at p50 buys 6.8 points of accuracy, and a miss here is
|
|
59
|
+
* not a worse answer — it spawns a whole specialist team for a question the
|
|
60
|
+
* coordinator should have taken alone. Re-run scripts/gate-bench.mjs before
|
|
61
|
+
* moving this again. */
|
|
62
|
+
export const SUPERNOVA_INTENT_GATE_ID = 'qwen3.7-flash';
|
|
34
63
|
export const SUPERNOVA_ROUTES = {
|
|
35
64
|
// Builder dominates — Qwen 3.7 Plus is the Terminal-Bench leader and what
|
|
36
65
|
// we've tuned the Builder persona against.
|
|
37
66
|
coding: { modelId: 'qwen3.7-plus', reason: 'Qwen 3.7 Plus — Terminal-Bench leader, production-tested Builder', fallbackModelId: 'deepseek-flash' },
|
|
38
67
|
// Vision input → Qwen 3.7 Plus (native vision + video).
|
|
39
|
-
vision: { modelId: 'qwen3.
|
|
68
|
+
vision: { modelId: 'qwen3.8-flash', reason: 'Qwen 3.8 Flash — native vision + video, 1M context', fallbackModelId: 'qwen3.7-plus', requiresVision: true },
|
|
40
69
|
// image_gen orchestrates a generate_image tool call to Wan —
|
|
41
70
|
// no agentic depth needed at this layer. Flash is cheapest.
|
|
42
71
|
image_gen: { modelId: 'qwen3.5-flash', reason: 'Qwen 3.5 Flash — orchestrates generate_image tool calls; depth not required at this layer', fallbackModelId: 'qwen3.7-plus' },
|
|
43
72
|
// computer_use route retired alongside the Holo3 integration.
|
|
44
73
|
// Planning is Architect + Researcher territory — Architect is Qwen 3.6
|
|
45
74
|
// Plus per the map, but planning leans heavily on Researcher's
|
|
46
|
-
// long-context synthesis
|
|
47
|
-
//
|
|
48
|
-
planning: { modelId: 'deepseek-flash', reason: 'DeepSeek Flash — long-context planning + synthesis depth', fallbackModelId: 'qwen3.7-plus' },
|
|
49
|
-
// Chat
|
|
50
|
-
//
|
|
51
|
-
//
|
|
52
|
-
//
|
|
53
|
-
//
|
|
54
|
-
|
|
55
|
-
//
|
|
56
|
-
|
|
57
|
-
//
|
|
58
|
-
|
|
59
|
-
// Teach = Tutor + Curriculum Architect (both medium-depth) → V4 Flash sweet spot.
|
|
60
|
-
teach: { modelId: 'deepseek-flash', reason: 'DeepSeek Flash — mid-depth teaching at flash-tier cost', fallbackModelId: 'qwen3.7-plus', creationModelId: 'deepseek-flash' },
|
|
75
|
+
// long-context synthesis, which is DeepSeek's strength. Architect gets
|
|
76
|
+
// routed back to Qwen 3.7 Plus per persona below.
|
|
77
|
+
planning: { modelId: 'deepseek-flash', reason: 'DeepSeek V4.1 Flash — long-context planning + synthesis depth', fallbackModelId: 'qwen3.7-plus' },
|
|
78
|
+
// Chat shares the coordinator's model. That used to be a downgrade to a
|
|
79
|
+
// cheaper tier; now it is simply the same model, so a chat turn costs what
|
|
80
|
+
// an orchestration turn costs per token and the fleet has no cheap-chat
|
|
81
|
+
// tier left to fall to. 1M context, MIT open-weight, fast enough for
|
|
82
|
+
// single-turn.
|
|
83
|
+
chat: { modelId: 'deepseek-flash', reason: 'DeepSeek V4.1 Flash — 1M-context chat on the fleet coordinator', fallbackModelId: 'qwen3.7-plus' },
|
|
84
|
+
// 1M-context grunt: DeepSeek shines (10% KV cache footprint at 1M).
|
|
85
|
+
long_context: { modelId: 'deepseek-flash', reason: 'DeepSeek V4.1 Flash — 1M context with 10% KV cache footprint', fallbackModelId: 'qwen3.7-plus' },
|
|
86
|
+
// Teach = Tutor + Curriculum Architect (both medium-depth) → DeepSeek's sweet spot.
|
|
87
|
+
teach: { modelId: 'deepseek-flash', reason: 'DeepSeek V4.1 Flash — mid-depth teaching at flash-tier cost', fallbackModelId: 'qwen3.7-plus', creationModelId: 'deepseek-flash' },
|
|
61
88
|
// Security = CVE Researcher leads — depth 4 reasoning over attack surface.
|
|
62
|
-
security: { modelId: 'deepseek-flash', reason: 'DeepSeek Flash — deep reasoning over attack surface', fallbackModelId: 'qwen3.7-plus' },
|
|
63
|
-
// Brainstorm = ideation, not depth-bound reasoning.
|
|
64
|
-
//
|
|
65
|
-
//
|
|
66
|
-
//
|
|
67
|
-
//
|
|
68
|
-
|
|
89
|
+
security: { modelId: 'deepseek-flash', reason: 'DeepSeek V4.1 Flash — deep reasoning over attack surface', fallbackModelId: 'qwen3.7-plus' },
|
|
90
|
+
// Brainstorm = ideation, not depth-bound reasoning. The old note here
|
|
91
|
+
// preferred Flash over Pro Think-Max on cognitive shape — breadth beats
|
|
92
|
+
// careful reasoning for ideation. There is no Think-Max tier to avoid any
|
|
93
|
+
// more, so the preference is moot and DeepSeek is simply the fleet's
|
|
94
|
+
// reasoning model. The fallback was briefly the SAME id as the primary —
|
|
95
|
+
// when DeepSeek collapsed to one model there was nothing left to fall back
|
|
96
|
+
// to inside the family, so an outage here degraded to nothing. It falls to
|
|
97
|
+
// Qwen 3.8 Flash now, which is in-family for Supernova and a real second
|
|
98
|
+
// option rather than a restatement of the first.
|
|
99
|
+
brainstorm: { modelId: 'deepseek-flash', reason: 'DeepSeek V4.1 Flash — breadth-first ideation at 1M context', fallbackModelId: 'qwen3.8-flash' },
|
|
69
100
|
};
|
|
70
101
|
// ── Per-persona override map ──────────────────────────────────────────────
|
|
71
102
|
//
|
|
72
103
|
// Used by Conductor when spawning specific personas. Persona is finer-grained
|
|
73
104
|
// than task category — a "planning" task might invoke Architect (Qwen 3.7 Plus)
|
|
74
|
-
// AND Researcher (
|
|
105
|
+
// AND Researcher (DeepSeek Flash) within the same orchestration. Persona override
|
|
75
106
|
// wins over the category route when set.
|
|
76
107
|
//
|
|
77
108
|
// Keys match persona names from packages/core/src/personas/definitions.ts.
|
|
@@ -91,7 +122,9 @@ export const SUPERNOVA_PERSONA_MODEL = {
|
|
|
91
122
|
sequencer: 'qwen3.5-flash',
|
|
92
123
|
challenger: 'qwen3.5-flash',
|
|
93
124
|
integrator: 'qwen3.5-flash',
|
|
94
|
-
// Mid-light specialists — reasoning depth 3
|
|
125
|
+
// Mid-light specialists — reasoning depth 3. These sat on the cheaper
|
|
126
|
+
// DeepSeek tier when there were two; they now sit on the same model as the
|
|
127
|
+
// coordinator, so "mid-light" describes the work, not the price.
|
|
95
128
|
code_reviewer: 'deepseek-flash',
|
|
96
129
|
fact_checker: 'deepseek-flash',
|
|
97
130
|
quiz_master: 'deepseek-flash',
|
|
@@ -102,8 +135,9 @@ export const SUPERNOVA_PERSONA_MODEL = {
|
|
|
102
135
|
curriculum_architect: 'deepseek-flash',
|
|
103
136
|
explorer: 'deepseek-flash',
|
|
104
137
|
refiner: 'deepseek-flash',
|
|
105
|
-
// Vision specialist — Qwen 3.
|
|
106
|
-
|
|
138
|
+
// Vision specialist — follows SUPERNOVA_VISION_ID onto Qwen 3.8 Flash:
|
|
139
|
+
// same native image + video, newer generation, roughly a third the cost.
|
|
140
|
+
design_reviewer: 'qwen3.8-flash',
|
|
107
141
|
};
|
|
108
142
|
/**
|
|
109
143
|
* Resolve the right model id for a persona in Supernova mode. Falls back to
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supernova-router.js","sourceRoot":"","sources":["../../src/auto/supernova-router.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"supernova-router.js","sourceRoot":"","sources":["../../src/auto/supernova-router.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,6EAA6E;AAE7E,6EAA6E;AAC7E,MAAM,CAAC,MAAM,wBAAwB,GAAG,gBAAgB,CAAC;AAEzD;;mDAEmD;AACnD,MAAM,CAAC,MA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ACrC,iBAAiB,EAAI,gBAAgB;IACrC,oBAAoB,EAAC,gBAAgB;IACrC,QAAQ,EAAa,gBAAgB;IACrC,OAAO,EAAc,gBAAgB;IAErC,uEAAuE;IACvE,yEAAyE;IACzE,eAAe,EAAM,eAAe;CACrC,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,4BAA4B,CAC1C,OAAe,EACf,cAAsB;IAEtB,OAAO,uBAAuB,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,IAAI,cAAc,CAAC;AAC1E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-classifier.d.ts","sourceRoot":"","sources":["../../src/auto/task-classifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"task-classifier.d.ts","sourceRoot":"","sources":["../../src/auto/task-classifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAmEvD;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,WAAW,EAAE,MAAM,GAAG,WAAW,EAAE,EACnC,IAAI,EAAE,MAAM,EACZ,sBAAsB,EAAE,MAAM,GAC7B,oBAAoB,CAkEtB"}
|
|
@@ -19,8 +19,9 @@ const MODEL_ALIASES = {
|
|
|
19
19
|
// Bare 'qwen plus' = the current Plus flagship (3.5 Plus retired from
|
|
20
20
|
// primary routes — operator, 2026-07-04).
|
|
21
21
|
'qwen plus': 'qwen3.7-plus',
|
|
22
|
-
// DeepSeek —
|
|
23
|
-
//
|
|
22
|
+
// DeepSeek — every alias lands in the same place, because there is only one
|
|
23
|
+
// DeepSeek model since 2026-09-10. 'deepseek pro' is kept as a spoken alias
|
|
24
|
+
// deliberately: users will keep asking for it by name for a long while yet.
|
|
24
25
|
'deepseek': 'deepseek-flash',
|
|
25
26
|
'deepseek pro': 'deepseek-flash',
|
|
26
27
|
'deepseek flash': 'deepseek-flash',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-classifier.js","sourceRoot":"","sources":["../../src/auto/task-classifier.ts"],"names":[],"mappings":"AAGA,gFAAgF;AAEhF,MAAM,aAAa,GAA2B;IAC5C,2EAA2E;IAC3E,0EAA0E;IAC1E,uEAAuE;IACvE,0CAA0C;IAC1C,MAAM,EAAE,SAAS;IACjB,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,gBAAgB;IACtB,MAAM,EAAE,gBAAgB;IACxB,MAAM,EAAE,WAAW;IACnB,UAAU,EAAE,SAAS;IACrB,kEAAkE;IAClE,SAAS,EAAE,YAAY;IACvB,IAAI,EAAE,YAAY;IAClB,OAAO;IACP,MAAM,EAAE,cAAc;IACtB,YAAY,EAAE,eAAe;IAC7B,sEAAsE;IACtE,0CAA0C;IAC1C,WAAW,EAAE,cAAc;IAC3B,4EAA4E;IAC5E,
|
|
1
|
+
{"version":3,"file":"task-classifier.js","sourceRoot":"","sources":["../../src/auto/task-classifier.ts"],"names":[],"mappings":"AAGA,gFAAgF;AAEhF,MAAM,aAAa,GAA2B;IAC5C,2EAA2E;IAC3E,0EAA0E;IAC1E,uEAAuE;IACvE,0CAA0C;IAC1C,MAAM,EAAE,SAAS;IACjB,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,gBAAgB;IACtB,MAAM,EAAE,gBAAgB;IACxB,MAAM,EAAE,WAAW;IACnB,UAAU,EAAE,SAAS;IACrB,kEAAkE;IAClE,SAAS,EAAE,YAAY;IACvB,IAAI,EAAE,YAAY;IAClB,OAAO;IACP,MAAM,EAAE,cAAc;IACtB,YAAY,EAAE,eAAe;IAC7B,sEAAsE;IACtE,0CAA0C;IAC1C,WAAW,EAAE,cAAc;IAC3B,4EAA4E;IAC5E,4EAA4E;IAC5E,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it discount: user pays 0.3× normal cost when the provider
|
|
44
44
|
* reports a prompt-cache hit. Cache savings on input-heavy turns roughly
|
|
45
45
|
* match this; output cost is unaffected by cache so on output-heavy models
|
|
46
|
-
* (
|
|
46
|
+
* (DeepSeek Flash bills 4× more for output than for input) a flat 0.3×
|
|
47
|
+
* whole-turn discount over-credits the user and the
|
|
47
48
|
* margin can flip negative — see CACHE_HIT_MULTIPLIER_BY_MODEL.
|
|
48
49
|
*
|
|
49
50
|
* Minimum 1 credit is deducted so cache hits are never free. */
|
|
@@ -56,9 +57,11 @@ export declare const CACHE_HIT_MULTIPLIER_BY_MODEL: Record<string, number>;
|
|
|
56
57
|
/** Look up the cache-hit multiplier for a given model id. */
|
|
57
58
|
export declare function cacheHitMultiplier(model: string | null | undefined): number;
|
|
58
59
|
/** Action costs are flat brackets (chat_turn = 2, heavy_persona = 3, etc.)
|
|
59
|
-
* but per-token spend varies wildly by model —
|
|
60
|
-
* Qwen Flash for the same input. Without a per-model adjustment,
|
|
61
|
-
*
|
|
60
|
+
* but per-token spend varies wildly by model — Kimi K3 is ~15× the cost of
|
|
61
|
+
* Qwen Flash for the same input. Without a per-model adjustment, K3 on
|
|
62
|
+
* chat_turn loses money on every call. (This named V4 Pro until 2026-09-10;
|
|
63
|
+
* DeepSeek is now one of the CHEAP models at 0.44×, so it no longer
|
|
64
|
+
* illustrates the problem it was here to illustrate.) The multiplier scales the
|
|
62
65
|
* bracket cost to track actual spend.
|
|
63
66
|
*
|
|
64
67
|
* SUPERSEDED IN PART, 2026-08-16. Everything below describes a table built
|
|
@@ -141,7 +144,7 @@ export declare function creditsForPlan(type: HealthPlanKind, durationDays: numbe
|
|
|
141
144
|
* ~24K effective) lands in 1-2 brackets. Larger turns scale linearly. */
|
|
142
145
|
export declare const TOKENS_PER_BRACKET = 16000;
|
|
143
146
|
/** Output tokens cost ~3-6× more than input across our model lineup
|
|
144
|
-
* (Qwen 3.7 Plus: 5.86×,
|
|
147
|
+
* (Qwen 3.7 Plus: 5.86×, DeepSeek Flash: 4.0×, Qwen Flash: 8×). A flat 4× weight
|
|
145
148
|
* is the reasonable midpoint without per-model pricing tables here.
|
|
146
149
|
* The cache discount weight (0.1×) reflects ~90% provider cache savings. */
|
|
147
150
|
export declare const OUTPUT_TOKEN_WEIGHT = 4;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credits.d.ts","sourceRoot":"","sources":["../../src/billing/credits.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAI3C;;;;;;2EAM2E;AAC3E,MAAM,MAAM,YAAY,GACpB,WAAW,GACX,YAAY,GACZ,eAAe,GACf,eAAe,GACf,eAAe,GACf,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,UAAU,GACV,YAAY,CAAC;AAOjB;;yEAEyE;AACzE,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAYpD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,KAAK,GAAG,KAAK,GAAG,MAAM,EAAE,MAAM,CAI3E,CAAC;AAEF,8DAA8D;AAC9D,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,KAAK,GAAG,KAAK,GAAG,MAAM,EAAE,MAAM,CAIpE,CAAC;AAEF,wBAAgB,eAAe,CAC7B,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,EACtC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAC/B,MAAM,CAUR;AAGD
|
|
1
|
+
{"version":3,"file":"credits.d.ts","sourceRoot":"","sources":["../../src/billing/credits.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAI3C;;;;;;2EAM2E;AA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ACnC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB;;oDAEgD;IAChD,uBAAuB,EAAE,MAAM,CAAC;CACjC;AAED,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,QAAQ,EAAE,oBAAoB,CAyC/D,CAAC;AAGF;;;2CAG2C;AAC3C,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,cAAc,GAAG,cAAc,GAAG,eAAe,CAAC;IACtD,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,uEAAuE;IACvE,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,aAAa,EAAE,qBAAqB,EAWhD,CAAC;AAGF;;4CAE4C;AAC5C,eAAO,MAAM,cAAc;IACzB;;;;0CAIsC;;IAEtC;;;;;8DAK0D;;IAE1D;yDACqD;;CAE7C,CAAC"}
|
package/dist/billing/credits.js
CHANGED
|
@@ -92,7 +92,8 @@ export function videoCreditCost(sr, seconds) {
|
|
|
92
92
|
/** Default cache-hit discount: user pays 0.3× normal cost when the provider
|
|
93
93
|
* reports a prompt-cache hit. Cache savings on input-heavy turns roughly
|
|
94
94
|
* match this; output cost is unaffected by cache so on output-heavy models
|
|
95
|
-
* (
|
|
95
|
+
* (DeepSeek Flash bills 4× more for output than for input) a flat 0.3×
|
|
96
|
+
* whole-turn discount over-credits the user and the
|
|
96
97
|
* margin can flip negative — see CACHE_HIT_MULTIPLIER_BY_MODEL.
|
|
97
98
|
*
|
|
98
99
|
* Minimum 1 credit is deducted so cache hits are never free. */
|
|
@@ -124,9 +125,11 @@ export function cacheHitMultiplier(model) {
|
|
|
124
125
|
}
|
|
125
126
|
// ── Per-model cost multiplier ─────────────────────────────────────────────
|
|
126
127
|
/** Action costs are flat brackets (chat_turn = 2, heavy_persona = 3, etc.)
|
|
127
|
-
* but per-token spend varies wildly by model —
|
|
128
|
-
* Qwen Flash for the same input. Without a per-model adjustment,
|
|
129
|
-
*
|
|
128
|
+
* but per-token spend varies wildly by model — Kimi K3 is ~15× the cost of
|
|
129
|
+
* Qwen Flash for the same input. Without a per-model adjustment, K3 on
|
|
130
|
+
* chat_turn loses money on every call. (This named V4 Pro until 2026-09-10;
|
|
131
|
+
* DeepSeek is now one of the CHEAP models at 0.44×, so it no longer
|
|
132
|
+
* illustrates the problem it was here to illustrate.) The multiplier scales the
|
|
130
133
|
* bracket cost to track actual spend.
|
|
131
134
|
*
|
|
132
135
|
* SUPERSEDED IN PART, 2026-08-16. Everything below describes a table built
|
|
@@ -254,6 +257,25 @@ export const MODEL_COST_MULTIPLIER = {
|
|
|
254
257
|
// anchoring to Medium 3.5, and 0.94 by measurement. Only the last one was
|
|
255
258
|
// derived from what the traffic actually costs; the first two inherited
|
|
256
259
|
// whatever error sat in their reference.
|
|
260
|
+
// INTERIM, not measured. modelCostMultiplier falls back to 1.0x for an
|
|
261
|
+
// unlisted model, so routing to qwen3.8-flash without an entry here would
|
|
262
|
+
// have billed it ABOVE the 0.94x Qwen 3.7 Plus it replaces — a cheaper
|
|
263
|
+
// model charging the user more.
|
|
264
|
+
//
|
|
265
|
+
// 0.44x is DeepSeek Flash's MEASURED figure, borrowed as a true ceiling:
|
|
266
|
+
// qwen3.8-flash has the same input price ($0.15) and a cheaper output price
|
|
267
|
+
// ($0.47 vs $0.60), so its real multiplier cannot exceed it. Scaling from
|
|
268
|
+
// 3.7 Plus and from 3.5 Flash independently both land near 0.33x. Replace
|
|
269
|
+
// this the moment the traffic replay has a real number.
|
|
270
|
+
// Qwen 3.7 Flash. INTERIM at the same ceiling as 3.8 Flash, and NOT scaled
|
|
271
|
+
// from its list price on purpose. Its list rate is lower ($0.10/$0.40) but
|
|
272
|
+
// it reasons by default and bills for it — a live call asking for the single
|
|
273
|
+
// word "ok" returned 167 completion tokens, 162 of them reasoning. Its
|
|
274
|
+
// pricing is also tiered by prompt length, so the flat figure understates a
|
|
275
|
+
// long turn. Scaling from list would have produced ~0.24x, which flatters us
|
|
276
|
+
// and undercharges. The ceiling holds until the replay measures it.
|
|
277
|
+
'qwen3.7-flash': 0.44,
|
|
278
|
+
'qwen3.8-flash': 0.44,
|
|
257
279
|
'qwen3.7-plus': 0.94,
|
|
258
280
|
'qwen-plus': 0.94, // legacy DashScope alias
|
|
259
281
|
// Qwen 3.8 Max — $2.00/$6.00, 354 calls. 2.58 → 1.36, a 47% CUT and the
|
|
@@ -445,7 +467,7 @@ const TOKEN_SCALING_ACTIONS = new Set([
|
|
|
445
467
|
* ~24K effective) lands in 1-2 brackets. Larger turns scale linearly. */
|
|
446
468
|
export const TOKENS_PER_BRACKET = 16_000;
|
|
447
469
|
/** Output tokens cost ~3-6× more than input across our model lineup
|
|
448
|
-
* (Qwen 3.7 Plus: 5.86×,
|
|
470
|
+
* (Qwen 3.7 Plus: 5.86×, DeepSeek Flash: 4.0×, Qwen Flash: 8×). A flat 4× weight
|
|
449
471
|
* is the reasonable midpoint without per-model pricing tables here.
|
|
450
472
|
* The cache discount weight (0.1×) reflects ~90% provider cache savings. */
|
|
451
473
|
export const OUTPUT_TOKEN_WEIGHT = 4;
|