pi-ui-extend 0.1.24 → 0.1.25

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.
@@ -177,7 +177,6 @@ export async function completeInputWithPi(runtime, draft, config, signal) {
177
177
  maxTokens: requestModel.maxTokens,
178
178
  ...(parsedModel.thinkingLevel && parsedModel.thinkingLevel !== "off" ? { reasoning: parsedModel.thinkingLevel } : {}),
179
179
  signal: requestSignal.signal,
180
- temperature: 0.1,
181
180
  timeoutMs,
182
181
  });
183
182
  for await (const event of stream) {
@@ -83,7 +83,6 @@ export declare const PiToolsSuiteConfigSchema: Type.TObject<{
83
83
  maxTaskChars: Type.TOptional<Type.TNumber>;
84
84
  maxTokens: Type.TOptional<Type.TNumber>;
85
85
  maxRetries: Type.TOptional<Type.TNumber>;
86
- temperature: Type.TOptional<Type.TNumber>;
87
86
  timeoutMs: Type.TOptional<Type.TNumber>;
88
87
  debug: Type.TOptional<Type.TBoolean>;
89
88
  }>>;
@@ -115,7 +115,6 @@ const SubagentRoutingConfig = Type.Object({
115
115
  maxTaskChars: Type.Optional(Type.Number({ description: "Max task/scope characters sent to router.", minimum: 100 })),
116
116
  maxTokens: Type.Optional(Type.Number({ description: "Max router response tokens.", minimum: 8 })),
117
117
  maxRetries: Type.Optional(Type.Number({ description: "Router request retries.", minimum: 0 })),
118
- temperature: Type.Optional(Type.Number({ description: "Router sampling temperature.", minimum: 0, maximum: 2 })),
119
118
  timeoutMs: Type.Optional(Type.Number({ description: "Router request timeout in ms.", minimum: 1000 })),
120
119
  debug: Type.Optional(Type.Boolean({ description: "Show routing debug warnings." })),
121
120
  }, { description: "LLM-based role routing configuration." });
@@ -12,7 +12,6 @@ export interface SessionTitleConfig {
12
12
  maxRetries: number;
13
13
  generationAttempts: number;
14
14
  retryDelayMs: number;
15
- temperature: number;
16
15
  timeoutMs: number;
17
16
  terminalTitle: boolean;
18
17
  terminalTitlePrefix: string;
@@ -29,7 +28,6 @@ const DEFAULT_CONFIG: SessionTitleConfig = {
29
28
  maxRetries: 2,
30
29
  generationAttempts: 3,
31
30
  retryDelayMs: 3000,
32
- temperature: 0.2,
33
31
  timeoutMs: 12_000,
34
32
  terminalTitle: true,
35
33
  terminalTitlePrefix: "pi — ",
@@ -83,9 +81,6 @@ function mergeConfig(base: SessionTitleConfig, raw: Record<string, unknown>): Se
83
81
  if (typeof raw.retryDelayMs === "number" && Number.isFinite(raw.retryDelayMs)) {
84
82
  next.retryDelayMs = Math.max(250, Math.floor(raw.retryDelayMs));
85
83
  }
86
- if (typeof raw.temperature === "number" && Number.isFinite(raw.temperature)) {
87
- next.temperature = Math.min(2, Math.max(0, raw.temperature));
88
- }
89
84
  if (typeof raw.timeoutMs === "number" && Number.isFinite(raw.timeoutMs)) {
90
85
  next.timeoutMs = Math.max(1000, Math.floor(raw.timeoutMs));
91
86
  }
@@ -221,7 +221,6 @@ async function generateSessionTitle(
221
221
  maxRetries: config.maxRetries,
222
222
  maxTokens: config.maxTokens,
223
223
  signal,
224
- temperature: config.temperature,
225
224
  timeoutMs: config.timeoutMs,
226
225
  },
227
226
  );
@@ -163,7 +163,7 @@ Async-subagents also injects a lightweight oh-my-openagent-style system-prompt s
163
163
 
164
164
  When the parent model cannot inspect images, async-subagents adds vision-delegation guidance and can save current-turn image attachments under `.pi/subagents/attachments/` so a `vision` sub-agent can receive them as `imagePaths`. Dynamic provider capabilities can be missing or stale after switching models, so blind parent models can still be configured explicitly with case-insensitive `*` masks under `asyncSubagents.vision.blindModelPatterns` in `~/.config/pi/pi-tools-suite.jsonc`. GLM is no longer treated as blind by async-subagents by default; the main-session `glm-coding-discipline` lookup tool is the preferred path for GLM visual lookups.
165
165
 
166
- When a task omits `subagentType`, async-subagents asks a lightweight router model to choose one configured type for each task from the task text/scope and the `types.<name>.description` metadata. Explicit task `subagentType` still wins. Keep type descriptions short, literal, and distinct because they are inserted into the router prompt for a small model. Router settings live under `asyncSubagents.routing` (`enabled`, `model`, `maxTaskChars`, `maxTokens`, `maxRetries`, `temperature`, `timeoutMs`, `debug`); the default router model is `zai/glm-4.5-air`. If the router is disabled, unavailable, aborted, or returns invalid JSON, omitted types fall back to `defaultType`.
166
+ When a task omits `subagentType`, async-subagents asks a lightweight router model to choose one configured type for each task from the task text/scope and the `types.<name>.description` metadata. Explicit task `subagentType` still wins. Keep type descriptions short, literal, and distinct because they are inserted into the router prompt for a small model. Router settings live under `asyncSubagents.routing` (`enabled`, `model`, `maxTaskChars`, `maxTokens`, `maxRetries`, `timeoutMs`, `debug`); the default router model is `zai/glm-4.5-air`. If the router is disabled, unavailable, aborted, or returns invalid JSON, omitted types fall back to `defaultType`.
167
167
 
168
168
  Define optional `presets` under `asyncSubagents` in `~/.config/pi/pi-tools-suite.jsonc`, `$PI_CONFIG_DIR/pi-tools-suite.jsonc`, or project `.pi/pi-tools-suite.jsonc`, then use `/subagent-preset` or `/subagent-preset-config` to pick one persistent active preset for future spawns across all sessions. Set `AGENTS_PRESET=<name>` before launching Pi to override the saved preset for only the current process/session without changing the saved selection. If Pi is already running, use `/subagent-preset session <name>` for the same process-only override, and `/subagent-preset session-clear` to remove that runtime override. The TUI only selects presets already present in config; it does not edit JSON. If no `asyncSubagents` section exists, run `/subagent-preset init` to insert the bundled sample from `src/async-subagents/async-subagents.sample.jsonc` into the shared config (or to copy a standalone override file when `ASYNC_SUBAGENTS_CONFIG` / `PI_SUBAGENTS_CONFIG` is set). Existing config sections/files are never overwritten. Presets select an agent/model configuration: they can provide global fallback `model`/`thinking`/`extraArgs` and per-role overrides under `asyncSubagents.presets.<name>.types.<subagentType>`. They can also provide ordered `fallbackModels` globally or per-role; when a sub-agent fails with quota/rate-limit errors such as 429, async-subagents immediately tries the next fallback model and remembers the exhausted provider for the current Pi process/session, so later spawns skip that provider until Pi exits. This is intended for provider-level fallback chains such as `antigravity/* → openai-codex/* → zai/*` or `openai-codex/* → zai/*`; omit fallbacks for effectively unlimited providers. Antigravity account rotation has priority over preset fallback: async-subagents only falls back after Antigravity reports that all configured accounts are exhausted for that model. Explicit task model overrides and force-current-model disable preset fallback for that task. The active preset name is stored separately in `~/.pi/agent/subagent-preset-selection.json`.
169
169
 
@@ -58,7 +58,6 @@
58
58
  "maxTaskChars": 1200,
59
59
  "maxTokens": 512,
60
60
  "maxRetries": 1,
61
- "temperature": 0,
62
61
  "timeoutMs": 12000,
63
62
  "debug": false
64
63
  },
@@ -37,8 +37,6 @@ export interface SubagentRoutingConfig {
37
37
  maxTokens?: number;
38
38
  /** Router complete() retries. */
39
39
  maxRetries?: number;
40
- /** Router sampling temperature. */
41
- temperature?: number;
42
40
  /** Router request timeout. */
43
41
  timeoutMs?: number;
44
42
  /** Show best-effort UI warnings when routing falls back. */
@@ -150,7 +148,6 @@ export const DEFAULT_ROUTING_CONFIG: ResolvedSubagentRoutingConfig = {
150
148
  maxTaskChars: 1200,
151
149
  maxTokens: 512,
152
150
  maxRetries: 1,
153
- temperature: 0,
154
151
  timeoutMs: 12_000,
155
152
  debug: false,
156
153
  };
@@ -522,8 +519,6 @@ function normalizeRoutingConfig(value: Record<string, unknown>): SubagentRouting
522
519
  if (maxTokens !== undefined) routing.maxTokens = Math.max(8, Math.round(maxTokens));
523
520
  const maxRetries = finiteNumber(value.maxRetries);
524
521
  if (maxRetries !== undefined) routing.maxRetries = Math.max(0, Math.round(maxRetries));
525
- const temperature = finiteNumber(value.temperature);
526
- if (temperature !== undefined) routing.temperature = Math.min(2, Math.max(0, temperature));
527
522
  const timeoutMs = finiteNumber(value.timeoutMs);
528
523
  if (timeoutMs !== undefined) routing.timeoutMs = Math.max(1000, Math.round(timeoutMs));
529
524
  return routing;
@@ -80,7 +80,6 @@ export async function routeSubagentTasks(
80
80
  maxRetries: routing.maxRetries,
81
81
  maxTokens: routing.maxTokens,
82
82
  signal,
83
- temperature: routing.temperature,
84
83
  timeoutMs: routing.timeoutMs,
85
84
  },
86
85
  );
@@ -82,7 +82,6 @@ export async function decideUltraworkAuto(
82
82
  maxRetries: routing.maxRetries,
83
83
  maxTokens: Math.min(routing.maxTokens, 32),
84
84
  signal,
85
- temperature: 0,
86
85
  timeoutMs: routing.timeoutMs,
87
86
  },
88
87
  );
@@ -23,7 +23,7 @@ export const DEFAULT_PI_TOOLS_SUITE_CONFIG_JSONC = String.raw`{
23
23
  },
24
24
  "asyncSubagents": {
25
25
  "defaultType": "quick",
26
- "routing": { "enabled": true, "model": "zai/glm-4.5-air", "maxTaskChars": 1200, "maxTokens": 512, "maxRetries": 1, "temperature": 0, "timeoutMs": 12000, "debug": false },
26
+ "routing": { "enabled": true, "model": "zai/glm-4.5-air", "maxTaskChars": 1200, "maxTokens": 512, "maxRetries": 1, "timeoutMs": 12000, "debug": false },
27
27
  "presets": {
28
28
  "cheap": {
29
29
  "description": "Use cheap GLM/Gemini Flash models for text/code roles; keep vision on the enabled GPT vision model.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-ui-extend",
3
- "version": "0.1.24",
3
+ "version": "0.1.25",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "bin": {
@@ -419,12 +419,6 @@
419
419
  "description": "Router request retries.",
420
420
  "minimum": 0
421
421
  },
422
- "temperature": {
423
- "type": "number",
424
- "description": "Router sampling temperature.",
425
- "minimum": 0,
426
- "maximum": 2
427
- },
428
422
  "timeoutMs": {
429
423
  "type": "number",
430
424
  "description": "Router request timeout in ms.",