@punica/editor 1.26.0 → 1.27.0
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@punica/editor",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.27.0",
|
|
4
4
|
"description": "Punica Editor",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@punica/common": "^1.0.2",
|
|
58
58
|
"highlight.js": "^11.11.1",
|
|
59
|
-
"
|
|
60
|
-
"
|
|
59
|
+
"yaml": "^2.4.5",
|
|
60
|
+
"markdown-it": "^14.2.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@eslint/config-array": "^0.17.0",
|
|
@@ -23,6 +23,16 @@ declare module 'punica' {
|
|
|
23
23
|
maxTokens?: number;
|
|
24
24
|
/** Response format: 'json_object' for structured output, 'text' for free-form */
|
|
25
25
|
responseFormat?: 'json_object' | 'text';
|
|
26
|
+
/**
|
|
27
|
+
* How much of `maxTokens` this class may spend on reasoning.
|
|
28
|
+
*
|
|
29
|
+
* Absent means `none`, which is what twelve of the fleet's fifteen
|
|
30
|
+
* classes want: `maxTokens` reaches a local server as `num_predict`
|
|
31
|
+
* and caps thinking and answer together, so a formatting job that
|
|
32
|
+
* declares 400 tokens against a reasoning core returns nothing.
|
|
33
|
+
* Declare `auto` to keep the pre-1.27.0 wire and let the model think.
|
|
34
|
+
*/
|
|
35
|
+
reasoning?: runtime.LlmReasoningMode;
|
|
26
36
|
/**
|
|
27
37
|
* Preferred model identifier for this instruction class (e.g. 'llama-3.2-8b-instruct-q4_k_m').
|
|
28
38
|
* Used by expert routing to select a single expert model.
|
|
@@ -106,6 +116,8 @@ declare module 'punica' {
|
|
|
106
116
|
options?: {
|
|
107
117
|
temperature?: number;
|
|
108
118
|
maxTokens?: number;
|
|
119
|
+
/** Per-call override of the class's reasoning mode. */
|
|
120
|
+
reasoning?: runtime.LlmReasoningMode;
|
|
109
121
|
timeoutMs?: number;
|
|
110
122
|
/** Skip cache lookup (force fresh response) */
|
|
111
123
|
skipCache?: boolean;
|
|
@@ -10,6 +10,31 @@ declare module 'punica' {
|
|
|
10
10
|
|
|
11
11
|
export type LlmRoutePreference = 'auto' | 'local' | 'remote';
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* How much of the output budget a reasoning model may spend on thinking.
|
|
15
|
+
*
|
|
16
|
+
* `maxTokens` reaches a local server as `num_predict`, which caps thinking
|
|
17
|
+
* and answer TOGETHER — so a class that declares a small budget against a
|
|
18
|
+
* reasoning core spends all of it thinking and returns nothing. Measured
|
|
19
|
+
* 2026-09-01: a 125-character tutor hint costs 2,138 output tokens on
|
|
20
|
+
* `qwen3.5:9b`, against a class that declares 400.
|
|
21
|
+
*
|
|
22
|
+
* - `none` — ask the provider not to think. This is the DEFAULT for an
|
|
23
|
+
* instruction class that declares nothing, because twelve of the fleet's
|
|
24
|
+
* fifteen classes are formatting or extraction jobs.
|
|
25
|
+
* - `auto` — send nothing and let the provider decide, which is the wire
|
|
26
|
+
* exactly as it was before this field existed.
|
|
27
|
+
*
|
|
28
|
+
* There is deliberately no `extended`: no class asks for it today, and a
|
|
29
|
+
* value that cannot be measured is a claim rather than a capability. It
|
|
30
|
+
* arrives with the measurement that needs it.
|
|
31
|
+
*
|
|
32
|
+
* Only the local route and the `ollama` vendor put anything on the wire
|
|
33
|
+
* for `none`; for the others "off" is already the default and an
|
|
34
|
+
* unrecognised argument is an error, so nothing is sent.
|
|
35
|
+
*/
|
|
36
|
+
export type LlmReasoningMode = 'none' | 'auto';
|
|
37
|
+
|
|
13
38
|
export interface LlmMessage {
|
|
14
39
|
role: LlmRole;
|
|
15
40
|
content: string;
|
|
@@ -136,6 +161,12 @@ declare module 'punica' {
|
|
|
136
161
|
* loop); translated to vendor syntax host-side.
|
|
137
162
|
*/
|
|
138
163
|
cacheHints?: LlmCacheHints;
|
|
164
|
+
/**
|
|
165
|
+
* How much of `maxTokens` the provider may spend on reasoning. Absent is
|
|
166
|
+
* read as `none` by the LLM capability perimeter; a provider adapter
|
|
167
|
+
* that receives `undefined` sends nothing.
|
|
168
|
+
*/
|
|
169
|
+
reasoning?: LlmReasoningMode;
|
|
139
170
|
}
|
|
140
171
|
|
|
141
172
|
export interface LlmUsage {
|