@maxmo74/pi-coding-agent 1.5.2-max.15 → 1.7.0-max.17

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.
Files changed (419) hide show
  1. package/CHANGELOG.md +188 -0
  2. package/LICENSE +1 -1
  3. package/README.md +1 -1
  4. package/dist/bundle/chunks/anthropic-messages-VOAE66ME.js +3 -0
  5. package/dist/bundle/chunks/azure-openai-responses-FWQRNMCY.js +2 -0
  6. package/dist/bundle/chunks/bedrock-converse-stream.js +6 -6
  7. package/dist/bundle/chunks/chunk-2BKJ4UF2.js +6 -0
  8. package/dist/bundle/chunks/{chunk-RKNK4Y6L.js → chunk-2HV66XRA.js} +1 -1
  9. package/dist/bundle/chunks/chunk-7TLS4DNZ.js +30 -0
  10. package/dist/bundle/chunks/{chunk-FMPAMX2W.js → chunk-AIIDHDL2.js} +1 -1
  11. package/dist/bundle/chunks/chunk-ARDROFM7.js +20 -0
  12. package/dist/bundle/chunks/{chunk-36QC74V4.js → chunk-D5E4JUBX.js} +1 -1
  13. package/dist/bundle/chunks/chunk-D5U74ZAG.js +2 -0
  14. package/dist/bundle/chunks/{chunk-BAC3QPNW.js → chunk-E3GEPN3H.js} +1 -1
  15. package/dist/bundle/chunks/{chunk-4UNPP53I.js → chunk-G5K7SYL7.js} +2 -2
  16. package/dist/bundle/chunks/chunk-GBB3EUD7.js +16 -0
  17. package/dist/bundle/chunks/chunk-GMDZZCKH.js +2 -0
  18. package/dist/bundle/chunks/{chunk-AUUCDC7R.js → chunk-HFTJRRFR.js} +2 -2
  19. package/dist/bundle/chunks/chunk-INODY4DR.js +2 -0
  20. package/dist/bundle/chunks/{chunk-WL4TUXY7.js → chunk-IOF7AZCL.js} +1 -1
  21. package/dist/bundle/chunks/chunk-J35HXFD7.js +2 -0
  22. package/dist/bundle/chunks/{chunk-COKMCNCW.js → chunk-KPWXWGGJ.js} +1 -1
  23. package/dist/bundle/chunks/chunk-LWG2CUTI.js +31 -0
  24. package/dist/bundle/chunks/chunk-MDJ5LWZA.js +44 -0
  25. package/dist/bundle/chunks/{chunk-VKJQ6CME.js → chunk-O5MXS5TI.js} +1 -1
  26. package/dist/bundle/chunks/chunk-OVXT2WQH.js +2 -0
  27. package/dist/bundle/chunks/{chunk-M6TSYZBS.js → chunk-PADKDPJN.js} +128 -130
  28. package/dist/bundle/chunks/chunk-PST3NXKM.js +2 -0
  29. package/dist/bundle/chunks/chunk-S2GRKWHT.js +14 -0
  30. package/dist/bundle/chunks/{chunk-FF6XOTWB.js → chunk-V7D5E4XS.js} +17 -15
  31. package/dist/bundle/chunks/chunk-Z2XZSUHM.js +2 -0
  32. package/dist/bundle/chunks/{cli-2MK3TR7P.js → cli-OH5BEVHD.js} +1 -1
  33. package/dist/bundle/chunks/cloudflare-workers-ai-system-one-Z73UPEZ7.js +2 -0
  34. package/dist/bundle/chunks/{easter-egg-3d-GEVPKQF6.js → easter-egg-3d-BOWYTYMI.js} +1 -1
  35. package/dist/bundle/chunks/{execute-L2EEDV3L.js → execute-UXTJZEKY.js} +3 -3
  36. package/dist/bundle/chunks/github-copilot.js +1 -1
  37. package/dist/bundle/chunks/google-generative-ai-VI7CGXA2.js +2 -0
  38. package/dist/bundle/chunks/google-vertex-UGCMSJWH.js +2 -0
  39. package/dist/bundle/chunks/{llama-cpp-classify-EJXCQRUQ.js → llama-cpp-classify-SKDW7RUG.js} +2 -2
  40. package/dist/bundle/chunks/mistral-conversations-F2GKIAZI.js +4 -0
  41. package/dist/bundle/chunks/openai-codex-responses-B54DADY4.js +2 -0
  42. package/dist/bundle/chunks/openai-completions-5UNXROMA.js +7 -0
  43. package/dist/bundle/chunks/{openai-decisions-F66BDLOM.js → openai-decisions-IN2F5D4R.js} +1 -1
  44. package/dist/bundle/chunks/openai-responses-2567WJBU.js +4 -0
  45. package/dist/bundle/chunks/openrouter-images-MPCL4RTO.js +2 -0
  46. package/dist/bundle/chunks/pi-decision-GZ2BG2JB.js +2 -0
  47. package/dist/bundle/chunks/pi-image-CXEQM6AW.js +2 -0
  48. package/dist/bundle/chunks/pi-messages-PDCTBGXV.js +2 -0
  49. package/dist/bundle/chunks/{runtime-J5ZSBGTX.js → runtime-JESTW74H.js} +1 -1
  50. package/dist/bundle/chunks/typesafe-system-one-6M47QHZX.js +2 -0
  51. package/dist/bundle/chunks/virtual-modules-QBVXFHBM.js +2 -0
  52. package/dist/bundle/cli-runtime.js +1 -1
  53. package/dist/bundle/index.js +1 -1
  54. package/dist/bundle/rpc-entry.js +1 -1
  55. package/dist/cli/agent-dir-arg.d.ts +20 -0
  56. package/dist/cli/agent-dir-arg.d.ts.map +1 -0
  57. package/dist/cli/agent-dir-arg.js +38 -0
  58. package/dist/cli/agent-dir-arg.js.map +1 -0
  59. package/dist/cli/args.d.ts +6 -0
  60. package/dist/cli/args.d.ts.map +1 -1
  61. package/dist/cli/args.js +49 -5
  62. package/dist/cli/args.js.map +1 -1
  63. package/dist/cli/config-selector.d.ts.map +1 -1
  64. package/dist/cli/config-selector.js +9 -6
  65. package/dist/cli/config-selector.js.map +1 -1
  66. package/dist/cli/list-models.d.ts.map +1 -1
  67. package/dist/cli/list-models.js +0 -5
  68. package/dist/cli/list-models.js.map +1 -1
  69. package/dist/cli/project-trust.d.ts.map +1 -1
  70. package/dist/cli/project-trust.js +6 -6
  71. package/dist/cli/project-trust.js.map +1 -1
  72. package/dist/cli/session-picker.d.ts.map +1 -1
  73. package/dist/cli/session-picker.js +9 -6
  74. package/dist/cli/session-picker.js.map +1 -1
  75. package/dist/cli/startup-ui.d.ts +3 -2
  76. package/dist/cli/startup-ui.d.ts.map +1 -1
  77. package/dist/cli/startup-ui.js +21 -23
  78. package/dist/cli/startup-ui.js.map +1 -1
  79. package/dist/config.d.ts +6 -1
  80. package/dist/config.d.ts.map +1 -1
  81. package/dist/config.js +16 -2
  82. package/dist/config.js.map +1 -1
  83. package/dist/core/agent-session-runtime.d.ts +11 -0
  84. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  85. package/dist/core/agent-session-runtime.js +19 -0
  86. package/dist/core/agent-session-runtime.js.map +1 -1
  87. package/dist/core/agent-session-services.d.ts.map +1 -1
  88. package/dist/core/agent-session-services.js +6 -0
  89. package/dist/core/agent-session-services.js.map +1 -1
  90. package/dist/core/agent-session.d.ts +6 -3
  91. package/dist/core/agent-session.d.ts.map +1 -1
  92. package/dist/core/agent-session.js +22 -13
  93. package/dist/core/agent-session.js.map +1 -1
  94. package/dist/core/auth-storage.d.ts.map +1 -1
  95. package/dist/core/auth-storage.js +7 -1
  96. package/dist/core/auth-storage.js.map +1 -1
  97. package/dist/core/bash-executor.d.ts +3 -1
  98. package/dist/core/bash-executor.d.ts.map +1 -1
  99. package/dist/core/bash-executor.js +24 -13
  100. package/dist/core/bash-executor.js.map +1 -1
  101. package/dist/core/client-identity.d.ts +2 -3
  102. package/dist/core/client-identity.d.ts.map +1 -1
  103. package/dist/core/client-identity.js +3 -4
  104. package/dist/core/client-identity.js.map +1 -1
  105. package/dist/core/compaction/compaction.d.ts.map +1 -1
  106. package/dist/core/compaction/compaction.js +3 -0
  107. package/dist/core/compaction/compaction.js.map +1 -1
  108. package/dist/core/exec.d.ts +1 -0
  109. package/dist/core/exec.d.ts.map +1 -1
  110. package/dist/core/exec.js +4 -1
  111. package/dist/core/exec.js.map +1 -1
  112. package/dist/core/export-html/ansi-to-html.d.ts +6 -1
  113. package/dist/core/export-html/ansi-to-html.d.ts.map +1 -1
  114. package/dist/core/export-html/ansi-to-html.js +57 -20
  115. package/dist/core/export-html/ansi-to-html.js.map +1 -1
  116. package/dist/core/export-html/template.js +1 -1
  117. package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
  118. package/dist/core/export-html/tool-renderer.js +2 -3
  119. package/dist/core/export-html/tool-renderer.js.map +1 -1
  120. package/dist/core/extensions/loader.d.ts.map +1 -1
  121. package/dist/core/extensions/loader.js +18 -1
  122. package/dist/core/extensions/loader.js.map +1 -1
  123. package/dist/core/extensions/runner.d.ts.map +1 -1
  124. package/dist/core/extensions/runner.js +7 -1
  125. package/dist/core/extensions/runner.js.map +1 -1
  126. package/dist/core/extensions/types.d.ts +14 -1
  127. package/dist/core/extensions/types.d.ts.map +1 -1
  128. package/dist/core/extensions/types.js.map +1 -1
  129. package/dist/core/messages.d.ts +4 -0
  130. package/dist/core/messages.d.ts.map +1 -1
  131. package/dist/core/messages.js +10 -2
  132. package/dist/core/messages.js.map +1 -1
  133. package/dist/core/model-config.d.ts +36 -0
  134. package/dist/core/model-config.d.ts.map +1 -1
  135. package/dist/core/model-resolver.d.ts +0 -8
  136. package/dist/core/model-resolver.d.ts.map +1 -1
  137. package/dist/core/model-resolver.js +7 -71
  138. package/dist/core/model-resolver.js.map +1 -1
  139. package/dist/core/model-runtime.d.ts.map +1 -1
  140. package/dist/core/model-runtime.js +6 -2
  141. package/dist/core/model-runtime.js.map +1 -1
  142. package/dist/core/package-manager.d.ts +16 -0
  143. package/dist/core/package-manager.d.ts.map +1 -1
  144. package/dist/core/package-manager.js +45 -2
  145. package/dist/core/package-manager.js.map +1 -1
  146. package/dist/core/pi-ai-schemas.d.ts +4 -0
  147. package/dist/core/pi-ai-schemas.d.ts.map +1 -1
  148. package/dist/core/project-trust.d.ts.map +1 -1
  149. package/dist/core/project-trust.js +1 -1
  150. package/dist/core/project-trust.js.map +1 -1
  151. package/dist/core/provider-composer.d.ts +1 -0
  152. package/dist/core/provider-composer.d.ts.map +1 -1
  153. package/dist/core/provider-composer.js +1 -0
  154. package/dist/core/provider-composer.js.map +1 -1
  155. package/dist/core/remote-catalog-provider.d.ts.map +1 -1
  156. package/dist/core/remote-catalog-provider.js +7 -0
  157. package/dist/core/remote-catalog-provider.js.map +1 -1
  158. package/dist/core/resolve-config-value.d.ts +2 -0
  159. package/dist/core/resolve-config-value.d.ts.map +1 -1
  160. package/dist/core/resolve-config-value.js +4 -0
  161. package/dist/core/resolve-config-value.js.map +1 -1
  162. package/dist/core/resource-loader.d.ts +5 -1
  163. package/dist/core/resource-loader.d.ts.map +1 -1
  164. package/dist/core/resource-loader.js +2 -0
  165. package/dist/core/resource-loader.js.map +1 -1
  166. package/dist/core/sdk.js +2 -2
  167. package/dist/core/sdk.js.map +1 -1
  168. package/dist/core/session-manager.d.ts.map +1 -1
  169. package/dist/core/session-manager.js +55 -42
  170. package/dist/core/session-manager.js.map +1 -1
  171. package/dist/core/session-ownership.js +15 -1
  172. package/dist/core/session-ownership.js.map +1 -1
  173. package/dist/core/settings-defaults.d.ts +6 -2
  174. package/dist/core/settings-defaults.d.ts.map +1 -1
  175. package/dist/core/settings-defaults.js +6 -2
  176. package/dist/core/settings-defaults.js.map +1 -1
  177. package/dist/core/settings-manager.d.ts +6 -6
  178. package/dist/core/settings-manager.d.ts.map +1 -1
  179. package/dist/core/settings-manager.js +23 -16
  180. package/dist/core/settings-manager.js.map +1 -1
  181. package/dist/core/settings-schema.d.ts +16 -3
  182. package/dist/core/settings-schema.d.ts.map +1 -1
  183. package/dist/core/settings-schema.js +23 -8
  184. package/dist/core/settings-schema.js.map +1 -1
  185. package/dist/core/tools/bash.d.ts +3 -0
  186. package/dist/core/tools/bash.d.ts.map +1 -1
  187. package/dist/core/tools/bash.js +24 -9
  188. package/dist/core/tools/bash.js.map +1 -1
  189. package/dist/core/tools/find.d.ts.map +1 -1
  190. package/dist/core/tools/find.js +27 -16
  191. package/dist/core/tools/find.js.map +1 -1
  192. package/dist/core/tools/grep.js +1 -1
  193. package/dist/core/tools/grep.js.map +1 -1
  194. package/dist/core/tools/output-accumulator.d.ts +16 -4
  195. package/dist/core/tools/output-accumulator.d.ts.map +1 -1
  196. package/dist/core/tools/output-accumulator.js +47 -38
  197. package/dist/core/tools/output-accumulator.js.map +1 -1
  198. package/dist/core/tools/read.d.ts +5 -0
  199. package/dist/core/tools/read.d.ts.map +1 -1
  200. package/dist/core/tools/read.js +10 -15
  201. package/dist/core/tools/read.js.map +1 -1
  202. package/dist/core/tools/renderers/bash.d.ts.map +1 -1
  203. package/dist/core/tools/renderers/bash.js +9 -3
  204. package/dist/core/tools/renderers/bash.js.map +1 -1
  205. package/dist/core/tools/renderers/read.d.ts.map +1 -1
  206. package/dist/core/tools/renderers/read.js +6 -2
  207. package/dist/core/tools/renderers/read.js.map +1 -1
  208. package/dist/core/tools/truncate.d.ts +1 -1
  209. package/dist/core/tools/truncate.d.ts.map +1 -1
  210. package/dist/core/tools/truncate.js +11 -5
  211. package/dist/core/tools/truncate.js.map +1 -1
  212. package/dist/core/usage-totals.d.ts.map +1 -1
  213. package/dist/core/usage-totals.js +3 -0
  214. package/dist/core/usage-totals.js.map +1 -1
  215. package/dist/extensions/codemode/execute.d.ts.map +1 -1
  216. package/dist/extensions/codemode/execute.js +36 -5
  217. package/dist/extensions/codemode/execute.js.map +1 -1
  218. package/dist/extensions/llama/client.d.ts.map +1 -1
  219. package/dist/extensions/llama/client.js +3 -13
  220. package/dist/extensions/llama/client.js.map +1 -1
  221. package/dist/extensions/llama/provider.d.ts +1 -1
  222. package/dist/extensions/llama/provider.d.ts.map +1 -1
  223. package/dist/extensions/llama/provider.js +6 -4
  224. package/dist/extensions/llama/provider.js.map +1 -1
  225. package/dist/extensions/llama/ui.d.ts.map +1 -1
  226. package/dist/extensions/llama/ui.js +2 -1
  227. package/dist/extensions/llama/ui.js.map +1 -1
  228. package/dist/extensions/mcp/index.d.ts.map +1 -1
  229. package/dist/extensions/mcp/index.js +4 -7
  230. package/dist/extensions/mcp/index.js.map +1 -1
  231. package/dist/extensions/mcp/resources.d.ts.map +1 -1
  232. package/dist/extensions/mcp/resources.js +3 -3
  233. package/dist/extensions/mcp/resources.js.map +1 -1
  234. package/dist/extensions/mcp/tools.d.ts +1 -9
  235. package/dist/extensions/mcp/tools.d.ts.map +1 -1
  236. package/dist/extensions/mcp/tools.js +8 -124
  237. package/dist/extensions/mcp/tools.js.map +1 -1
  238. package/dist/main.d.ts +1 -1
  239. package/dist/main.d.ts.map +1 -1
  240. package/dist/main.js +57 -19
  241. package/dist/main.js.map +1 -1
  242. package/dist/modes/diagnostics-stderr.d.ts +4 -0
  243. package/dist/modes/diagnostics-stderr.d.ts.map +1 -0
  244. package/dist/modes/diagnostics-stderr.js +11 -0
  245. package/dist/modes/diagnostics-stderr.js.map +1 -0
  246. package/dist/modes/interactive/components/assistant-message.d.ts +2 -1
  247. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  248. package/dist/modes/interactive/components/assistant-message.js +9 -3
  249. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  250. package/dist/modes/interactive/components/bash-execution.d.ts +2 -1
  251. package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
  252. package/dist/modes/interactive/components/bash-execution.js +7 -4
  253. package/dist/modes/interactive/components/bash-execution.js.map +1 -1
  254. package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
  255. package/dist/modes/interactive/components/config-selector.js +6 -3
  256. package/dist/modes/interactive/components/config-selector.js.map +1 -1
  257. package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
  258. package/dist/modes/interactive/components/custom-editor.js +13 -1
  259. package/dist/modes/interactive/components/custom-editor.js.map +1 -1
  260. package/dist/modes/interactive/components/extension-editor.d.ts +1 -1
  261. package/dist/modes/interactive/components/extension-editor.js +2 -2
  262. package/dist/modes/interactive/components/extension-editor.js.map +1 -1
  263. package/dist/modes/interactive/components/first-time-setup.d.ts +3 -5
  264. package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -1
  265. package/dist/modes/interactive/components/first-time-setup.js +15 -45
  266. package/dist/modes/interactive/components/first-time-setup.js.map +1 -1
  267. package/dist/modes/interactive/components/mermaid.d.ts.map +1 -1
  268. package/dist/modes/interactive/components/mermaid.js +13 -4
  269. package/dist/modes/interactive/components/mermaid.js.map +1 -1
  270. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  271. package/dist/modes/interactive/components/model-selector.js +5 -2
  272. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  273. package/dist/modes/interactive/components/oauth-selector.d.ts +14 -2
  274. package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
  275. package/dist/modes/interactive/components/oauth-selector.js +17 -12
  276. package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
  277. package/dist/modes/interactive/components/radius-login-selector.d.ts.map +1 -1
  278. package/dist/modes/interactive/components/radius-login-selector.js +2 -1
  279. package/dist/modes/interactive/components/radius-login-selector.js.map +1 -1
  280. package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
  281. package/dist/modes/interactive/components/scoped-models-selector.js +9 -1
  282. package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
  283. package/dist/modes/interactive/components/session-selector.d.ts +8 -1
  284. package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
  285. package/dist/modes/interactive/components/session-selector.js +44 -12
  286. package/dist/modes/interactive/components/session-selector.js.map +1 -1
  287. package/dist/modes/interactive/components/settings-selector.d.ts +3 -5
  288. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  289. package/dist/modes/interactive/components/settings-selector.js +57 -46
  290. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  291. package/dist/modes/interactive/components/settings-submenu.d.ts +1 -1
  292. package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -1
  293. package/dist/modes/interactive/components/settings-submenu.js +8 -4
  294. package/dist/modes/interactive/components/settings-submenu.js.map +1 -1
  295. package/dist/modes/interactive/components/themed-text.d.ts +1 -1
  296. package/dist/modes/interactive/components/themed-text.d.ts.map +1 -1
  297. package/dist/modes/interactive/components/themed-text.js.map +1 -1
  298. package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
  299. package/dist/modes/interactive/components/thinking-selector.js +5 -1
  300. package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
  301. package/dist/modes/interactive/components/tool-execution.d.ts +1 -1
  302. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  303. package/dist/modes/interactive/components/tool-execution.js +3 -1
  304. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  305. package/dist/modes/interactive/components/user-message.d.ts +2 -1
  306. package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
  307. package/dist/modes/interactive/components/user-message.js +9 -3
  308. package/dist/modes/interactive/components/user-message.js.map +1 -1
  309. package/dist/modes/interactive/components/visual-truncate.d.ts +2 -2
  310. package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
  311. package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
  312. package/dist/modes/interactive/external-editor.d.ts.map +1 -1
  313. package/dist/modes/interactive/external-editor.js +13 -3
  314. package/dist/modes/interactive/external-editor.js.map +1 -1
  315. package/dist/modes/interactive/interactive-mode.d.ts +19 -2
  316. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  317. package/dist/modes/interactive/interactive-mode.js +176 -111
  318. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  319. package/dist/modes/interactive/program-resume-reporter.d.ts +32 -0
  320. package/dist/modes/interactive/program-resume-reporter.d.ts.map +1 -0
  321. package/dist/modes/interactive/program-resume-reporter.js +56 -0
  322. package/dist/modes/interactive/program-resume-reporter.js.map +1 -0
  323. package/dist/modes/interactive/program-status-reporter.d.ts +2 -0
  324. package/dist/modes/interactive/program-status-reporter.d.ts.map +1 -1
  325. package/dist/modes/interactive/program-status-reporter.js +4 -0
  326. package/dist/modes/interactive/program-status-reporter.js.map +1 -1
  327. package/dist/modes/interactive/session-share.d.ts.map +1 -1
  328. package/dist/modes/interactive/session-share.js +11 -1
  329. package/dist/modes/interactive/session-share.js.map +1 -1
  330. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  331. package/dist/modes/interactive/theme/theme.js +1 -0
  332. package/dist/modes/interactive/theme/theme.js.map +1 -1
  333. package/dist/modes/print-mode.d.ts.map +1 -1
  334. package/dist/modes/print-mode.js +17 -17
  335. package/dist/modes/print-mode.js.map +1 -1
  336. package/dist/modes/rpc/jsonl.d.ts.map +1 -1
  337. package/dist/modes/rpc/jsonl.js +13 -13
  338. package/dist/modes/rpc/jsonl.js.map +1 -1
  339. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  340. package/dist/modes/rpc/rpc-mode.js +19 -27
  341. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  342. package/dist/package-manager-cli.d.ts.map +1 -1
  343. package/dist/package-manager-cli.js +24 -2
  344. package/dist/package-manager-cli.js.map +1 -1
  345. package/dist/utils/changelog.d.ts.map +1 -1
  346. package/dist/utils/changelog.js +3 -2
  347. package/dist/utils/changelog.js.map +1 -1
  348. package/dist/utils/clipboard.js +1 -1
  349. package/dist/utils/clipboard.js.map +1 -1
  350. package/dist/utils/flush-stdout.d.ts +8 -0
  351. package/dist/utils/flush-stdout.d.ts.map +1 -0
  352. package/dist/utils/flush-stdout.js +23 -0
  353. package/dist/utils/flush-stdout.js.map +1 -0
  354. package/dist/utils/output-files.d.ts +20 -4
  355. package/dist/utils/output-files.d.ts.map +1 -1
  356. package/dist/utils/output-files.js +37 -2
  357. package/dist/utils/output-files.js.map +1 -1
  358. package/dist/utils/shell.d.ts +2 -1
  359. package/dist/utils/shell.d.ts.map +1 -1
  360. package/dist/utils/shell.js +56 -7
  361. package/dist/utils/shell.js.map +1 -1
  362. package/dist/utils/tools-manager.d.ts +1 -0
  363. package/dist/utils/tools-manager.d.ts.map +1 -1
  364. package/dist/utils/tools-manager.js +9 -8
  365. package/dist/utils/tools-manager.js.map +1 -1
  366. package/docs/cli.md +3 -1
  367. package/docs/codemode.md +16 -5
  368. package/docs/environment-variables.md +4 -4
  369. package/docs/extensions.md +18 -8
  370. package/docs/llama-cpp.md +3 -3
  371. package/docs/message-types.md +1 -0
  372. package/docs/models-configuration.md +18 -6
  373. package/docs/models.md +34 -14
  374. package/docs/nvidia-rtx-llama-cpp.md +5 -5
  375. package/docs/providers.md +7 -5
  376. package/docs/rpc-commands.md +2 -2
  377. package/docs/settings.md +5 -3
  378. package/docs/shell-aliases.md +1 -1
  379. package/docs/terminal-setup.md +53 -0
  380. package/docs/tui.md +2 -0
  381. package/docs/windows.md +2 -1
  382. package/examples/extensions/gondolin/index.ts +4 -7
  383. package/examples/extensions/subagent/index.ts +3 -2
  384. package/examples/rpc-extension-ui.ts +8 -7
  385. package/package.json +10 -10
  386. package/schemas/models.schema.json +22 -9
  387. package/schemas/settings.schema.json +30 -10
  388. package/dist/bundle/chunks/anthropic-messages-CA3HHOL3.js +0 -6
  389. package/dist/bundle/chunks/azure-openai-responses-76TWS6DT.js +0 -2
  390. package/dist/bundle/chunks/chunk-4KSTFUIK.js +0 -19
  391. package/dist/bundle/chunks/chunk-CF5GWZHW.js +0 -31
  392. package/dist/bundle/chunks/chunk-GFUN2N5K.js +0 -2
  393. package/dist/bundle/chunks/chunk-IQUU5XIT.js +0 -2
  394. package/dist/bundle/chunks/chunk-PMRZO46Y.js +0 -2
  395. package/dist/bundle/chunks/chunk-QN4TOIZN.js +0 -16
  396. package/dist/bundle/chunks/chunk-V7SLUK6A.js +0 -44
  397. package/dist/bundle/chunks/chunk-Y55SJART.js +0 -13
  398. package/dist/bundle/chunks/chunk-YTPJCXUB.js +0 -30
  399. package/dist/bundle/chunks/chunk-ZBIZYD6W.js +0 -2
  400. package/dist/bundle/chunks/chunk-ZGYS4UTC.js +0 -2
  401. package/dist/bundle/chunks/cloudflare-workers-ai-system-one-U4J7D646.js +0 -2
  402. package/dist/bundle/chunks/google-generative-ai-D5B6W47J.js +0 -2
  403. package/dist/bundle/chunks/google-vertex-U4H5YDEW.js +0 -2
  404. package/dist/bundle/chunks/mistral-conversations-S277EKLB.js +0 -5
  405. package/dist/bundle/chunks/openai-codex-responses-TEQRB65N.js +0 -10
  406. package/dist/bundle/chunks/openai-completions-HRZOSLBO.js +0 -7
  407. package/dist/bundle/chunks/openai-responses-BAKFWTGE.js +0 -4
  408. package/dist/bundle/chunks/openrouter-images-VXF5TVIK.js +0 -2
  409. package/dist/bundle/chunks/pi-messages-UBJKNDRN.js +0 -8
  410. package/dist/bundle/chunks/typesafe-system-one-56TEMIHL.js +0 -2
  411. package/dist/bundle/chunks/virtual-modules-MRQHQVIQ.js +0 -2
  412. package/dist/core/telemetry.d.ts +0 -3
  413. package/dist/core/telemetry.d.ts.map +0 -1
  414. package/dist/core/telemetry.js +0 -9
  415. package/dist/core/telemetry.js.map +0 -1
  416. package/dist/utils/deprecation.d.ts +0 -4
  417. package/dist/utils/deprecation.d.ts.map +0 -1
  418. package/dist/utils/deprecation.js +0 -13
  419. package/dist/utils/deprecation.js.map +0 -1
package/docs/codemode.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Codemode
2
2
 
3
- The `codemode` tool lets the model write a JavaScript script that calls pi's other tools and runs non-LLM models, such as classifiers and image models. Only the script's output reaches the model, so a script can run calls in parallel and filter large results before the model sees them. To turn it on, see [Enable codemode](cli.md#enable-codemode).
3
+ The `codemode` tool lets the model write a JavaScript script that calls pi's other tools and runs non-LLM models, such as decision models and image models. Only the script's output reaches the model, so a script can run calls in parallel and filter large results before the model sees them. To turn it on, see [Enable codemode](cli.md#enable-codemode).
4
4
 
5
5
  ## Scripts
6
6
 
@@ -40,7 +40,7 @@ Every tool the session can call is a method of `tools`, named by its identifier:
40
40
 
41
41
  What a call resolves to depends on the tool:
42
42
 
43
- - Tools with an output schema resolve to a structured value. `bash` resolves to `{ output, truncated, full_output_path?, exit_code, wall_time_seconds }`, also for non-zero exit codes. Its `output` is not limited to the 2000 lines or 50KB the model sees: it holds up to 1 MiB, and longer output keeps its first and last 512 KiB around an omission marker, with `truncated` set and the full output in `full_output_path`.
43
+ - Tools with an output schema resolve to a structured value. `bash` resolves to `{ output, truncated, full_output_path?, full_output_error?, exit_code, wall_time_seconds }`, also for non-zero exit codes. Its `output` is not limited to the 2000 lines or 50KB the model sees: it holds up to 1 MiB, and longer output keeps its first and last 512 KiB around an omission marker, with `truncated` set and the full output in `full_output_path`. When the full output could not be saved (for example a full temp directory), `full_output_error` says why and `output` holds only the retained tail.
44
44
  - MCP tools resolve to their `CallToolResult`, including `isError` and `structuredContent`.
45
45
  - `read` resolves to the file's text, or for an image to an image block `{ type: "image", data, mimeType, note }` that `image()` shows. `data` is the base64 image the model would see and `note` the text that goes with it, such as resize hints.
46
46
  - Other tools, such as `edit` and `write`, resolve to their text output.
@@ -59,7 +59,7 @@ The store is for small state such as IDs, cursors, or summaries. One value may h
59
59
 
60
60
  ## Models
61
61
 
62
- `models` reaches the model catalog and runs non-LLM models with the session's credentials: classifiers, which answer typed questions about JSON state and, for some models, images, and image models, which generate images. Chat models are listed but cannot be run from scripts. Which classifier and image models exist is described in [Use classifier models](models.md#use-classifier-models) and [Use image models](models.md#use-image-models).
62
+ `models` reaches the model catalog and runs non-LLM models with the session's credentials: decision models (type `"classifier"`), which answer typed questions about JSON state and, for some models, images, and image models, which generate images. Chat models are listed but cannot be run from scripts. Which decision and image models exist is described in [Use decision models](models.md#use-decision-models) and [Use image models](models.md#use-image-models).
63
63
 
64
64
  ```ts
65
65
  type ModelType = "chat" | "image" | "classifier";
@@ -86,7 +86,7 @@ declare const models: {
86
86
  /** Answer `context.questions` about `context.state`; answers are in `result.answers` by question ID. */
87
87
  classify(model: ModelInfo, context: ClassifierContext): Promise<ClassifierResult>;
88
88
  /** Generate images from `context.input` text and image blocks; show `result.output` blocks with image(). Can take minutes. */
89
- generateImages(model: ModelInfo, context: ImagesContext): Promise<ImagesResult>;
89
+ generateImages(model: ModelInfo, context: ImagesContext, options?: ImagesOptions): Promise<ImagesResult>;
90
90
  };
91
91
  ```
92
92
 
@@ -120,6 +120,8 @@ interface ClassifierResult {
120
120
  /** Answers by question ID. */
121
121
  answers: Record<string, ClassifierAnswer>;
122
122
  usage?: ModelUsage;
123
+ /** Provider-specific response ID when reported, such as OpenRouter's generation ID. */
124
+ responseId?: string;
123
125
  stopReason: "stop" | "error" | "aborted";
124
126
  errorMessage?: string;
125
127
  }
@@ -165,7 +167,7 @@ return results.map((result, i) =>
165
167
  );
166
168
  ```
167
169
 
168
- Classifiers whose `input` includes `"image"` also judge images. `tools.read()` returns an image file as an image block that `images` accepts. Other classifiers return an error result when `images` is not empty.
170
+ Decision models whose `input` includes `"image"` also judge images. `tools.read()` returns an image file as an image block that `images` accepts. Other decision models return an error result when `images` is not empty.
169
171
 
170
172
  ```js
171
173
  const luna = await models.getModelOfType("classifier", "openai", "gpt-6-luna");
@@ -191,6 +193,13 @@ interface ImagesContext {
191
193
  input: (TextBlock | ImageBlock)[];
192
194
  }
193
195
 
196
+ interface ImagesOptions {
197
+ /** Desired aspect ratio, e.g. `"1:1"`, `"16:9"`, `"4:3"`, `"9:16"`. */
198
+ aspectRatio?: string;
199
+ /** Desired resolution: `"1K"`, `"2K"` or `"4K"`. Pixel dimensions such as `"1024x1536"` are not supported. */
200
+ size?: string;
201
+ }
202
+
194
203
  interface ImagesResult {
195
204
  provider: string;
196
205
  model: string;
@@ -206,6 +215,8 @@ type TextBlock = { type: "text"; text: string };
206
215
  type ImageBlock = { type: "image"; data: string; mimeType: string };
207
216
  ```
208
217
 
218
+ Options go to the provider unchanged. Which values work depends on the model; the provider may answer an unsupported value with an error result. Other option keys throw.
219
+
209
220
  Show generated images with `image(block)`. Do not print `data` with `text()`, `console`, or `return`: it is large and the model cannot read it as text. `image()` also saves each image to a temp file and puts its path in the result, so a later turn can copy or move the file.
210
221
 
211
222
  ```js
@@ -78,13 +78,12 @@ These variables are read by Pi itself:
78
78
 
79
79
  | Variable | Description |
80
80
  |----------|-------------|
81
- | `PI_CODING_AGENT_DIR` | Override the config directory; default is `~/.pi/agent` |
81
+ | `PI_CODING_AGENT_DIR` | Override the config directory; default is `~/.pi/agent`; overridden by `--agent-dir` |
82
82
  | `PI_CODING_AGENT_SESSION_DIR` | Override session storage; overridden by `--session-dir` |
83
83
  | `PI_PACKAGE_DIR` | Override the package directory, useful for Nix/Guix store paths |
84
- | `PI_OFFLINE` | Disable automatic network activity, including model catalog refreshes |
85
- | `PI_SKIP_VERSION_CHECK` | Disable the `pi.dev` latest-version request |
84
+ | `PI_OFFLINE` | Disable automatic startup network requests to `pi.dev`, including both latest-version checks and model catalog refreshes |
85
+ | `PI_SKIP_VERSION_CHECK` | Disable the `pi.dev` latest-version check on interactive start (does not stop model catalog refreshes) |
86
86
  | `PI_SELF_UPDATE_COMMAND` | Command `pi update` runs to update Pi itself, split on whitespace, with `{packageName}`, `{version}`, and `{installSpec}` placeholders. Takes precedence over the `selfUpdateCommand` setting. See [Custom update command](cli.md#custom-update-command) |
87
- | `PI_TELEMETRY` | Override install/update telemetry and provider attribution headers: `1`/`true`/`yes` or `0`/`false`/`no` |
88
87
  | `PI_CODEMODE_MAX_WORKERS` | Maximum codemode workers alive at once across all sessions in the process; default `2`. Each worker's script may use up to 256 MB. Raise it when one process runs several sessions, such as in-process subagents. Further scripts wait for a free worker. See [Codemode](codemode.md) |
89
88
  | `PI_CACHE_RETENTION` | Set to `long` for extended provider prompt caching where supported |
90
89
  | `PI_SHARE_VIEWER_URL` | Override the base URL used by `/share` |
@@ -94,6 +93,7 @@ These variables are read by Pi itself:
94
93
  | `PI_CLIPBOARD_OSC52` | Set to `1` to also send copied text to the terminal with OSC 52 after the local clipboard write, as Pi does over SSH. Use it when a remote client reaches Pi without SSH variables, such as a multiplexer attached from another machine or a remote IDE daemon |
95
94
  | `PI_HYPERLINKS` | Override OSC 8 hyperlink detection with `1`, `0`, or `auto` |
96
95
  | `PI_PROGRAM_STATUS` | Override OSC 7501 program status detection: `1` always reports, `0` never reports; otherwise Pi reports only after the terminal confirms support. See [Terminal setup](terminal-setup.md#program-status) |
96
+ | `OSC7577_TOKEN` | Set by terminals that support OSC 7577 program resume, not by you. Pi reports how to resume the session and removes the variable from the environment of every process it starts. See [Terminal setup](terminal-setup.md#program-resume) |
97
97
  | `PI_IMAGE_PROTOCOL` | Override inline image detection with `kitty`, `iterm2`, `none`, or `auto` |
98
98
  | `PI_TRUE_COLOR` | Override truecolor detection with `1`, `0`, or `auto` |
99
99
  | `PI_TUI_ESC_TIMEOUT` | How long to wait after a lone ESC before treating it as Escape, in milliseconds; defaults to `100` over SSH and `10` otherwise. Increase if Alt-key input is misread as Escape |
@@ -355,7 +355,7 @@ The model request runs these hooks in order:
355
355
  2. `context_with_system` (can modify the full transcript)
356
356
  3. `before_provider_headers` (can mutate headers)
357
357
  4. `before_provider_request` (can inspect or replace the payload)
358
- 5. `after_provider_response` (status and headers, before the stream is consumed)
358
+ 5. `after_provider_response` (status and headers of each HTTP response, including errors and retried attempts; successful responses fire before their stream is consumed)
359
359
  6. `provider_stream_event` (raw parsed stream events) and `message_start` / `message_update` / `message_end` for the assistant message
360
360
 
361
361
  A tool call that executes runs these hooks in order:
@@ -882,7 +882,7 @@ The payload is the full request. Providers that continue from a previous respons
882
882
 
883
883
  #### after_provider_response
884
884
 
885
- Fired after an HTTP response is received and before its stream body is consumed. Handlers run in extension load order.
885
+ Fired for each HTTP response the provider receives, including error responses (4xx/5xx) and responses to retried attempts, so one request can fire it more than once. Successful responses fire before their stream body is consumed. Handlers run in extension load order.
886
886
 
887
887
  ```typescript
888
888
  pi.on("after_provider_response", (event, ctx) => {
@@ -894,7 +894,7 @@ pi.on("after_provider_response", (event, ctx) => {
894
894
  });
895
895
  ```
896
896
 
897
- Header availability depends on provider and transport. Providers that abstract HTTP responses may not expose headers.
897
+ Coverage depends on provider and transport. Some providers report empty headers or only some responses. It does not fire for errors that arrive inside an already started SSE stream, or for WebSocket transports, including a WebSocket connection that fails to open.
898
898
 
899
899
  #### provider_stream_event
900
900
 
@@ -1225,7 +1225,7 @@ Use `ctx.modelRegistry.streamSimple(model, context, options)` for provider-neutr
1225
1225
 
1226
1226
  `streamSimple()` returns an `AssistantMessageEventStream`. Iterate it for response events and await `.result()` for the final message. Setup failures produce error events and error results.
1227
1227
 
1228
- For non-chat models, `findOfType()`, `getModelsOfType()`, `getAvailableOfType()`, and `getModelOfType()` look up image and classifier models, and `classify()` and `generateImages()` call them. See [Use classifier models](models.md#use-classifier-models) and [Use image models](models.md#use-image-models).
1228
+ For non-chat models, `findOfType()`, `getModelsOfType()`, `getAvailableOfType()`, and `getModelOfType()` look up image and decision (`"classifier"`) models, and `classify()` and `generateImages()` call them. See [Use decision models](models.md#use-decision-models) and [Use image models](models.md#use-image-models).
1229
1229
 
1230
1230
  ### ctx.signal
1231
1231
 
@@ -1903,7 +1903,7 @@ const result = await pi.exec("git", ["status"], { signal, timeout: 5000 });
1903
1903
  // result.stdout, result.stderr, result.code, result.killed, result.truncated
1904
1904
  ```
1905
1905
 
1906
- Options: `signal` and `timeout` terminate the command, `cwd` sets the working directory, and `maxBuffer` limits stdout and stderr combined (default 256 MiB). When output exceeds `maxBuffer`, pi terminates the command and returns the output up to the limit with `truncated: true`, `killed: true`, and a nonzero `code`. `killed` is true whenever pi terminated the command: timeout, abort, or `maxBuffer`. A command that ignores SIGTERM gets SIGKILL after 5 seconds.
1906
+ Options: `signal` and `timeout` terminate the command, `cwd` sets the working directory, and `maxBuffer` limits stdout and stderr combined (default 256 MiB). When output exceeds `maxBuffer`, pi terminates the command and returns the output up to the limit with `truncated: true`, `killed: true`, and a nonzero `code`. `killed` is true whenever pi terminated the command: timeout, abort, or `maxBuffer`. A command that ignores SIGTERM gets SIGKILL after 5 seconds. A command terminated by a signal, by pi or otherwise, reports 128 + the signal number as `code`, like a shell: 143 for SIGTERM, 137 for SIGKILL.
1907
1907
 
1908
1908
  ### pi.getActiveTools() / pi.getAllTools() / pi.setActiveTools(names)
1909
1909
 
@@ -1989,7 +1989,7 @@ import { createProvider, openAICompletionsApi } from "@earendil-works/pi-ai/comp
1989
1989
  const provider = createProvider({
1990
1990
  id: "local-server",
1991
1991
  name: "Local Server",
1992
- baseUrl: "http://localhost:8080/v1",
1992
+ baseUrl: "http://localhost:9931/v1",
1993
1993
  auth: {
1994
1994
  apiKey: {
1995
1995
  name: "Local server setup",
@@ -2033,11 +2033,11 @@ pi.registerProvider("my-proxy", {
2033
2033
 
2034
2034
  // Register a live llama.cpp catalog without persisting discovered models
2035
2035
  pi.registerProvider("llama.cpp", {
2036
- baseUrl: "http://localhost:8080/v1",
2036
+ baseUrl: "http://localhost:9931/v1",
2037
2037
  apiKey: "local",
2038
2038
  api: "openai-completions",
2039
2039
  async refreshModels({ signal }) {
2040
- const response = await fetch("http://localhost:8080/v1/models", { signal });
2040
+ const response = await fetch("http://localhost:9931/v1/models", { signal });
2041
2041
  const { data } = (await response.json()) as { data: Array<{ id: string }> };
2042
2042
  return data.map(({ id }) => ({
2043
2043
  id,
@@ -2888,6 +2888,16 @@ if (confirmed) {
2888
2888
 
2889
2889
  See [examples/extensions/timed-confirm.ts](../examples/extensions/timed-confirm.ts) for complete examples.
2890
2890
 
2891
+ #### Program Status Kind
2892
+
2893
+ While a dialog waits, terminals that support [program status](terminal-setup.md#program-status) show pi as blocked, with the first line of the title as the message. `confirm()` reports `"permission"`, `select()` and `input()` report `"question"`. Pass `blockedKind` when the dialog asks for something else, for example a select that approves an action:
2894
+
2895
+ ```typescript
2896
+ const choice = await ctx.ui.select("Deploy to production?", ["Deploy", "Deploy and tag", "Cancel"], {
2897
+ blockedKind: "permission", // "permission" | "question" | "auth"
2898
+ });
2899
+ ```
2900
+
2891
2901
  ### Widgets, Status, and Footer
2892
2902
 
2893
2903
  ```typescript
package/docs/llama-cpp.md CHANGED
@@ -96,10 +96,10 @@ If the router disconnects, `/llama` shows **Retry** and **Close**. Retry reconne
96
96
 
97
97
  ## Classification
98
98
 
99
- Classifier models answer typed `choice`, `bool`, and `score` questions about JSON state, like TypeSafe's Jev models. The model reaches them from [`codemode`](cli.md#enable-codemode) scripts, and extensions through `ctx.modelRegistry.classify()`; see [Classifier models](models.md#use-classifier-models). Pi lists llama.cpp models as classifiers in two ways:
99
+ Decision models answer typed `choice`, `bool`, and `score` questions about JSON state, like TypeSafe's Jev models. The model reaches them from [`codemode`](cli.md#enable-codemode) scripts, and extensions through `ctx.modelRegistry.classify()`; see [Use decision models](models.md#use-decision-models). Pi lists llama.cpp models under the `classifier` model type in two ways:
100
100
 
101
- - **Decision models** such as [Julia-1, Laya, Kev, lev, and OpenJev](https://huggingface.co/collections/ggml-org/decision-models-6abf80cca3c83f127060a769) answer natively through llama.cpp's `/v1/systemone` endpoint. They appear only as classifiers, with the `typesafe-system-one` API, and not in `/model`.
102
- - **Chat models** are also listed as classifiers with the same ID and the `llama-cpp-classify` API, which reads answers from next-token probabilities as described below.
101
+ - **Decision models** such as [Julia-1, Laya, Kev, lev, and OpenJev](https://huggingface.co/collections/ggml-org/decision-models-6abf80cca3c83f127060a769) answer natively through llama.cpp's `/v1/systemone` endpoint. They appear only under the `classifier` model type, with the `typesafe-system-one` API, and not in `/model`.
102
+ - **Chat models** are also listed under the `classifier` model type with the same ID and the `llama-cpp-classify` API, which reads answers from next-token probabilities as described below.
103
103
 
104
104
  llama.cpp 0.6.0 and later report decision models in the router's model list: their `architecture.output_modalities` contains `decisions`. The router reads this from the GGUF metadata without loading the model, so Pi recognizes unloaded and sleeping decision models too. Older llama.cpp builds do not report it, and Pi lists their decision models as chat models.
105
105
 
@@ -210,6 +210,7 @@ interface BashExecutionMessage {
210
210
  cancelled: boolean;
211
211
  truncated: boolean;
212
212
  fullOutputPath?: string;
213
+ fullOutputError?: string; // why the full output could not be saved, when truncated
213
214
  excludeFromContext?: boolean;
214
215
  timestamp: number;
215
216
  }
@@ -34,7 +34,7 @@ Each `models` entry adds a model to the provider. An entry whose `id` matches an
34
34
  | `api` | string | | Overrides the provider api. |
35
35
  | `baseUrl` | string | | Overrides the provider baseUrl. |
36
36
  | `reasoning` | boolean | `false` | Whether the model supports thinking. |
37
- | `thinkingLevelMap` | object | | Provider value sent for each thinking level. null marks a level unsupported. Levels the model does not map use the provider's default value through high; xhigh and max are unsupported. |
37
+ | `thinkingLevelMap` | object | | Provider value sent for each thinking level. A string is sent to the provider; null hides the level. Levels left out use the provider's default value for off through high; xhigh and max are opt-in and only offered when mapped to a string. |
38
38
  | `input` | `("text" \| "image")[]` | `["text"]` | |
39
39
  | `inputLimits` | [object](#input-limits) | | |
40
40
  | `cost` | object | | |
@@ -42,6 +42,7 @@ Each `models` entry adds a model to the provider. An entry whose `id` matches an
42
42
  | `cost.output` | number | | Required. Output cost in USD per million tokens. |
43
43
  | `cost.cacheRead` | number | | Required. Cache-read cost in USD per million tokens. |
44
44
  | `cost.cacheWrite` | number | | Required. Cache-write cost in USD per million tokens. |
45
+ | `cost.imageOutput` | number | | Image output cost in USD per million tokens, for models that generate images. Image output tokens use this rate and the rest of output (text and reasoning) uses `output`. Unset means image tokens cost `output`. |
45
46
  | `cost.tiers` | `object[]` | | Request-wide pricing tiers. The highest matching input threshold applies to the full request. |
46
47
  | `cost.tiers[].inputTokensAbove` | number | | Required. Use this tier when total request input exceeds this token count. |
47
48
  | `cost.tiers[].input` | number | | Required. Input cost in USD per million tokens. |
@@ -64,7 +65,7 @@ Each `modelOverrides` key is the ID of a built-in or extension model. Unknown ID
64
65
  |---|---|---|---|
65
66
  | `name` | string | | Display name, also matched by --model patterns. |
66
67
  | `reasoning` | boolean | | Whether the model supports thinking. |
67
- | `thinkingLevelMap` | object | | Provider value sent for each thinking level. null marks a level unsupported. Levels the model does not map use the provider's default value through high; xhigh and max are unsupported. |
68
+ | `thinkingLevelMap` | object | | Provider value sent for each thinking level. A string is sent to the provider; null hides the level. Levels left out use the provider's default value for off through high; xhigh and max are opt-in and only offered when mapped to a string. |
68
69
  | `input` | `("text" \| "image")[]` | | |
69
70
  | `inputLimits` | [object](#input-limits) | | |
70
71
  | `cost` | object | | |
@@ -72,6 +73,7 @@ Each `modelOverrides` key is the ID of a built-in or extension model. Unknown ID
72
73
  | `cost.output` | number | | Output cost in USD per million tokens. |
73
74
  | `cost.cacheRead` | number | | Cache-read cost in USD per million tokens. |
74
75
  | `cost.cacheWrite` | number | | Cache-write cost in USD per million tokens. |
76
+ | `cost.imageOutput` | number | | Image output cost in USD per million tokens, for models that generate images. Image output tokens use this rate and the rest of output (text and reasoning) uses `output`. Unset means image tokens cost `output`. |
75
77
  | `cost.tiers` | `object[]` | | Request-wide pricing tiers. The highest matching input threshold applies to the full request. |
76
78
  | `cost.tiers[].inputTokensAbove` | number | | Required. Use this tier when total request input exceeds this token count. |
77
79
  | `cost.tiers[].input` | number | | Required. Input cost in USD per million tokens. |
@@ -111,7 +113,7 @@ See [Describe model input and caching](models.md#describe-model-input-and-cachin
111
113
  | Field | Type | Default | Description |
112
114
  |---|---|---|---|
113
115
  | `supportsStore` | boolean | | Whether the provider supports the store field. Default: auto-detected from URL. |
114
- | `supportsDeveloperRole` | boolean | | Whether the provider supports the developer role instead of system. Default: auto-detected from URL. |
116
+ | `supportsDeveloperRole` | boolean | | Whether to send system messages of reasoning models (the system prompt and mid-conversation system messages) with the developer role instead of system. Default: true only for api.openai.com. |
115
117
  | `supportsReasoningEffort` | boolean | | Whether the provider supports reasoning_effort. Default: auto-detected from URL. |
116
118
  | `supportsUsageInStreaming` | boolean | `true` | Whether the provider supports stream_options.include_usage for token usage in streaming responses. |
117
119
  | `supportsFinishReason` | boolean | `true` | Whether streamed responses include finish_reason. When false, pi infers stop or toolUse when the stream ends. |
@@ -122,7 +124,7 @@ See [Describe model input and caching](models.md#describe-model-input-and-cachin
122
124
  | `requiresToolsWithToolHistory` | boolean | | Whether requests without tools must send "tools": [] when the conversation contains tool calls or tool results. Needed by some proxies in front of Anthropic, such as older LiteLLM versions. Default: false, the field is omitted. |
123
125
  | `requiresThinkingAsText` | boolean | | Whether thinking blocks must be converted to text blocks with &lt;thinking> delimiters. Default: auto-detected from URL. |
124
126
  | `requiresReasoningContentOnAssistantMessages` | boolean | | Whether all replayed assistant messages must include an empty reasoning_content field when reasoning is enabled. Default: auto-detected from URL. |
125
- | `thinkingFormat` | `"openai" \| "openrouter" \| "deepseek" \| "together" \| "baseten" \| "zai" \| "qwen" \| "chat-template" \| "qwen-chat-template" \| "string-thinking" \| "ant-ling"` | | Format for reasoning or thinking parameters. When omitted, Pi auto-detects the format from the provider URL. "openai" uses reasoning_effort, "openrouter" uses reasoning.effort, "deepseek" uses thinking.type plus reasoning_effort when supported, "together" uses reasoning.enabled plus reasoning_effort when supported, "baseten" uses configurable chat_template_args plus reasoning_effort when supported, "zai" uses thinking.type, "qwen" uses top-level enable_thinking, "qwen-chat-template" uses chat_template_kwargs.enable_thinking and preserve_thinking, "chat-template" uses configurable chat_template_kwargs, "string-thinking" uses top-level thinking, and "ant-ling" uses reasoning.effort only when the mapped effort is non-null. |
127
+ | `thinkingFormat` | `"openai" \| "openrouter" \| "deepseek" \| "ant-ling" \| "together" \| "baseten" \| "zai" \| "qwen" \| "chat-template" \| "qwen-chat-template" \| "string-thinking"` | | Format for reasoning or thinking parameters. When omitted, Pi auto-detects the format from the provider URL. "openai" uses reasoning_effort, "openrouter" uses reasoning.effort, "deepseek" (deprecated alias: "ant-ling") uses thinking.type plus reasoning_effort when supported, "together" uses reasoning.enabled plus reasoning_effort when supported, "baseten" uses configurable chat_template_args plus reasoning_effort when supported, "zai" uses thinking.type, "qwen" uses top-level enable_thinking, "qwen-chat-template" uses chat_template_kwargs.enable_thinking and preserve_thinking, "chat-template" uses configurable chat_template_kwargs, and "string-thinking" uses top-level thinking. |
126
128
  | `chatTemplateKwargs` | object | | Kwargs sent as chat_template_kwargs when thinkingFormat is "chat-template". Use $var with "thinking.enabled", "thinking.effort", or "thinking.budget" for pi-controlled values. |
127
129
  | `chatTemplateArgs` | object | | Arguments sent as chat_template_args when thinkingFormat is "baseten". Use $var with "thinking.enabled", "thinking.effort", or "thinking.budget" for pi-controlled values. |
128
130
  | `openRouterRouting` | object | | OpenRouter provider routing preferences. Controls which upstream providers OpenRouter routes requests to. Sent as the provider field in the OpenRouter API request body. See https://openrouter.ai/docs/guides/routing/provider-selection. |
@@ -157,7 +159,7 @@ Also applies to `azure-openai-responses` and `openai-codex-responses`.
157
159
  | `supportsAdditionalTools` | boolean | `false` | Whether the model supports message-anchored additional_tools input items. |
158
160
  | `supportsToolSearch` | boolean | `false` | Whether the model supports client-executed tool search for transcript-anchored additions. |
159
161
  | `supportsExplicitPromptCacheMode` | boolean | `false` | Whether the model accepts prompt_cache_options. Older OpenAI models reject the parameter. |
160
- | `supportsMidConvoEffort` | boolean | `false` | Whether thinking level changes are sent as configuration_update input items instead of changing reasoning.effort, so a change keeps the prompt cache. Only used by the openai-responses API, and ignored with Sign in with ChatGPT on the openai provider. |
162
+ | `supportsMidConvoEffort` | boolean | `false` | Whether thinking level changes are sent as configuration_update input items instead of changing reasoning.effort, so a change keeps the prompt cache. Used by the openai-responses and openai-codex-responses APIs, and ignored with Sign in with ChatGPT on the openai provider. |
161
163
  | `supportsMaxOutputTokens` | boolean | `true` | Whether the provider accepts max_output_tokens. Some Codex-protocol gateways reject it. |
162
164
 
163
165
  ### `anthropic-messages`
@@ -176,7 +178,7 @@ Also applies to `azure-openai-responses` and `openai-codex-responses`.
176
178
  | `supportsMidConvoEffort` | boolean | `false` | Whether the exact model transport supports effort-only system messages and thinking binding controls. |
177
179
  | `supportsMidConvoSystemMessages` | boolean | `false` | Whether the exact model accepts system-role messages inside the conversation. When false, later system messages are folded into the top-level system prompt. |
178
180
  | `supportsMidConvoToolChanges` | boolean | `false` | Whether the exact model accepts mid-conversation tool_addition and tool_removal blocks. Requires supportsMidConvoSystemMessages. |
179
- | `supportsMessageThreads` | boolean | | Whether the endpoint supports Anthropic message threads, which let a request with a session id send only the new messages and continue from the previous reply. Default: true for provider anthropic with a baseUrl on api.anthropic.com, false otherwise. Set true for gateways that forward the thread request field. |
181
+ | `supportsMessageThreads` | boolean | | Whether the endpoint supports Anthropic message threads, which let a request with a session id send only the new messages and continue from the previous reply. Default: true for a baseUrl on api.anthropic.com, false otherwise. Set true for gateways that forward the thread request field. |
180
182
  | `allowedFallbackModels` | `object[]` | | Models Anthropic accepts for server-side refusal fallback, with local pricing metadata for returned fallback responses. When absent or empty, callers must omit fallbacks; Anthropic rejects the field for models with no permitted fallback targets. |
181
183
 
182
184
  ### `bedrock-converse-stream`
@@ -184,12 +186,22 @@ Also applies to `azure-openai-responses` and `openai-codex-responses`.
184
186
  | Field | Type | Default | Description |
185
187
  |---|---|---|---|
186
188
  | `supportsStrictMode` | boolean | `false` | Whether the model supports Bedrock strict tool schemas. |
189
+ | `supportsReasoningReplay` | boolean | `true` | Whether the model accepts reasoning blocks from earlier assistant messages. When false, earlier reasoning is not sent back. The generated catalog disables this for Kimi K3 models, which fail on Converse when it is sent. |
187
190
 
188
191
  ### `mistral-conversations`
189
192
 
190
193
  | Field | Type | Default | Description |
191
194
  |---|---|---|---|
192
195
  | `supportsMidConvoSystemMessages` | boolean | `false` | Whether the exact model accepts system messages after the conversation has started. When false, later system messages are folded into the leading system message. |
196
+ | `supportsStrictMode` | boolean | `false` | Whether the model supports strict (schema-constrained) function tools. |
197
+
198
+ ### `google-generative-ai`
199
+
200
+ Also applies to `google-vertex`.
201
+
202
+ | Field | Type | Default | Description |
203
+ |---|---|---|---|
204
+ | `supportsStrictMode` | boolean | | Whether the model enforces strict tools through Gemini's VALIDATED function-calling mode. Default: true for model IDs containing gemini-3 or a later version, such as gemini-3-pro or vendor-gemini-4-argon, false otherwise. Set true for Gemini 3+ models served under IDs without the version. |
193
205
 
194
206
  ### `typesafe-system-one`
195
207
 
package/docs/models.md CHANGED
@@ -111,6 +111,20 @@ Use `promptCache` to declare the provider's best-effort cache lifetime in second
111
111
 
112
112
  Choose the conservative end of any published range. A model without a lifetime for the active tier is not eligible for cache warming. A `modelOverrides` entry can set `inputLimits` or `promptCache` for a built-in or extension model, including a model accessed through a validated proxy. See [`cacheWarming`](settings.md#model-and-thinking).
113
113
 
114
+ ### Map thinking levels
115
+
116
+ Use `thinkingLevelMap` to choose which thinking levels `/thinking` offers and which provider value Pi sends for each:
117
+
118
+ ```json
119
+ {
120
+ "id": "reasoning-model",
121
+ "reasoning": true,
122
+ "thinkingLevelMap": { "minimal": null, "xhigh": "xhigh", "max": "max" }
123
+ }
124
+ ```
125
+
126
+ A string is sent to the provider as the effort value, and `null` hides the level. Levels left out use the provider's default value for `off` through `high`. `xhigh` and `max` are opt-in: Pi offers them only when the map gives them a string, which must be a value the provider accepts. Set the map in `models.json`, on a custom model or in a `modelOverrides` entry for a built-in model, not in `settings.json`.
127
+
114
128
  ### Configure sampling by thinking level
115
129
 
116
130
  OpenAI-compatible APIs support free-form `samplingParams` model defaults and `samplingParamsByThinkingLevel` overrides. The latter uses Pi thinking-level keys (`off`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`), not provider values from `thinkingLevelMap`:
@@ -139,9 +153,11 @@ Pi first clamps unsupported thinking levels, then merges model `samplingParams`,
139
153
 
140
154
  Compatibility settings should describe verified differences in the endpoint's request or response behavior. Do not enable them based only on an endpoint advertising OpenAI or Anthropic compatibility.
141
155
 
142
- ## Use classifier models
156
+ <a id="use-classifier-models"></a>
143
157
 
144
- Classifier models do not chat. They answer typed questions about JSON state: pick one of several choices, answer yes or no, or give a score, each with probabilities. Pi includes TypeSafe's Jev model from these providers, Cloudflare's Clef, Clef Flash, and Clef Omni models from Workers AI and OpenRouter, OpenAI's GPT-6 Luna through the [Decisions API](https://developers.openai.com/api/docs/guides/decisions), and Microsoft-Decision-1 through GitHub Copilot:
158
+ ## Use decision models
159
+
160
+ Decision models (listed in Pi's API under the `classifier` model type) do not chat. They answer typed questions about JSON state: pick one of several choices, answer yes or no, or give a score, each with probabilities. Pi includes TypeSafe's Jev model from these providers, Cloudflare's Clef, Clef Flash, and Clef Omni models from Workers AI and OpenRouter, OpenAI's GPT-6 Luna through the [Decisions API](https://developers.openai.com/api/docs/guides/decisions), and GPT-6 Luna Decisions and Microsoft-Decision-1 through GitHub Copilot:
145
161
 
146
162
  | Provider | Model IDs | Authentication |
147
163
  |---|---|---|
@@ -151,13 +167,15 @@ Classifier models do not chat. They answer typed questions about JSON state: pic
151
167
  | `vercel-ai-gateway` | `typesafe-ai/jev` | `AI_GATEWAY_API_KEY` |
152
168
  | `opencode` | `jev-1.13`, `jev-1.13-free` | `OPENCODE_API_KEY` |
153
169
  | `openai` | `gpt-6-luna` | `OPENAI_API_KEY` |
154
- | `github-copilot` | `microsoft-decision-1` | `COPILOT_GITHUB_TOKEN` or `/login` |
170
+ | `github-copilot` | `gpt-6-luna-decisions`, `microsoft-decision-1` | `COPILOT_GITHUB_TOKEN` or `/login` |
155
171
 
156
- Chat models on a [llama.cpp router](llama-cpp.md#classification) are also listed as classifier models.
172
+ Chat models on a [llama.cpp router](llama-cpp.md#classification) are also listed under the `classifier` model type.
157
173
 
158
174
  OpenAI's Decisions API needs an API key. Sign in with ChatGPT credentials do not work with it, so `gpt-6-luna` is not listed as available while `openai` is logged in through `/login`, even when `OPENAI_API_KEY` is set; log out of `openai` to use the key. The API rejects inputs above 922K tokens, but requests that run longer than about five seconds, currently above roughly 600K input tokens, fail with a gateway timeout.
159
175
 
160
- Classifier models do not appear in `/model`. The model reaches them through the [`codemode`](cli.md#enable-codemode) tool, which is off unless an MCP server turned it on. Enable it with `"defaultTools": ["+codemode"]` in [settings](settings.md#tools). Scripts then list classifier models with `models.getAvailableOfType("classifier")` and call `models.classify(model, { state, questions })`:
176
+ Which GitHub Copilot decision models an account can use depends on its plan: Microsoft-Decision-1 is limited to Business and Enterprise, and organizations can turn models off. With `/login`, pi lists only the decision models in the account's Copilot model catalog. With `COPILOT_GITHUB_TOKEN` it lists both.
177
+
178
+ Decision models do not appear in `/model`. The model reaches them through the [`codemode`](cli.md#enable-codemode) tool, which is off unless an MCP server turned it on. Enable it with `"defaultTools": ["+codemode"]` in [settings](settings.md#tools). Scripts then list decision models with `models.getAvailableOfType("classifier")` and call `models.classify(model, { state, questions })`:
161
179
 
162
180
  ```js
163
181
  const jev = await models.getModelOfType("classifier", "typesafe", "jev-latest");
@@ -176,25 +194,27 @@ return result.answers;
176
194
 
177
195
  [Codemode](codemode.md#classify) describes the question and answer types.
178
196
 
179
- Classifier models whose `input` includes `"image"` also judge images passed in `images`; other classifier models return an error for them. Image input works with GPT-6 Luna, with Jev from `typesafe` and `cloudflare-workers-ai`, with Clef from `cloudflare-workers-ai`, and with the OpenRouter models whose catalog lists image input. Jev takes PNG and JPEG images, and image input is experimental on TypeSafe's own API. Clef takes PNG, JPEG, and WebP images, at most four per request. Jev from `vercel-ai-gateway` and `opencode` takes text only.
197
+ Decision models whose `input` includes `"image"` also judge images passed in `images`; other decision models return an error for them. Image input works with GPT-6 Luna, with Jev from `typesafe` and `cloudflare-workers-ai`, with Clef from `cloudflare-workers-ai`, and with the OpenRouter models whose catalog lists image input. Jev takes PNG and JPEG images, and image input is experimental on TypeSafe's own API. Clef takes PNG, JPEG, and WebP images, at most four per request. Jev from `vercel-ai-gateway` and `opencode` takes text only.
180
198
 
181
- Each System One service takes images in its own request format, set by the model's `compat.imageInput`. Built-in models set it, so overriding a provider's `baseUrl` keeps it. A custom provider that proxies another service's classifiers sets it in its provider-level `compat` in `models.json` (see [System One compatibility](models-configuration.md#typesafe-system-one)). OpenRouter in particular answers requests in TypeSafe's format without an error but drops the images.
199
+ Each System One service takes images in its own request format, set by the model's `compat.imageInput`. Built-in models set it, so overriding a provider's `baseUrl` keeps it. A custom provider that proxies another service's decision models sets it in its provider-level `compat` in `models.json` (see [System One compatibility](models-configuration.md#typesafe-system-one)). OpenRouter in particular answers requests in TypeSafe's format without an error but drops the images.
182
200
 
183
- When the service reports token counts, as all System One services do, `result.usage` carries them with their cost. Pi adds the usage of a script's classifier calls to the `codemode` tool result, so it counts toward the session cost in the footer and `/session`. The cost uses the model's catalog price; models without one, such as TypeSafe's direct `jev-latest`, report tokens at no cost.
201
+ When the service reports token counts, as all System One services do, `result.usage` carries them with their cost. Pi adds the usage of a script's `classify()` calls to the `codemode` tool result, so it counts toward the session cost in the footer and `/session`. The cost uses the model's catalog price; models without one, such as TypeSafe's direct `jev-latest`, report tokens at no cost.
184
202
 
185
- Extensions call classifiers through `ctx.modelRegistry.classify()`, without codemode. [Virtual models](virtual-models.md#route-requests) can use them to route requests; see the `jev-router.ts` example.
203
+ Extensions call decision models through `ctx.modelRegistry.classify()`, without codemode. [Virtual models](virtual-models.md#route-requests) can use them to route requests; see the `jev-router.ts` example.
186
204
 
187
205
  ## Use image models
188
206
 
189
- Image models generate images from a prompt and optional input images. Pi lists OpenRouter's image models, such as `google/gemini-2.5-flash-image` and `black-forest-labs/flux.2-pro`, under the `openrouter` provider; they use the same `OPENROUTER_API_KEY` or `/login` credential as its chat models.
207
+ Image models generate images from a prompt and optional input images. Pi lists image models from OpenRouter (such as `google/gemini-2.5-flash-image` and `black-forest-labs/flux.2-pro`) and Radius (when enabled for the organization); each uses the same API key or `/login` credential as its chat models.
190
208
 
191
- Like classifier models, image models do not appear in `/model`; the model reaches them through the [`codemode`](cli.md#enable-codemode) tool. Scripts list them with `models.getAvailableOfType("image")` and call `models.generateImages(model, { input })`. The result's `output` holds base64 image blocks, which `image()` attaches to the `codemode` result so the model sees them:
209
+ Like decision models, image models do not appear in `/model`; the model reaches them through the [`codemode`](cli.md#enable-codemode) tool. Scripts list them with `models.getAvailableOfType("image")` and call `models.generateImages(model, { input }, options?)`. The result's `output` holds base64 image blocks, which `image()` attaches to the `codemode` result so the model sees them:
192
210
 
193
211
  ```js
194
212
  const painter = await models.getModelOfType("image", "openrouter", "google/gemini-2.5-flash-image");
195
- const result = await models.generateImages(painter, {
196
- input: [{ type: "text", text: "A red fox in the snow, watercolor" }],
197
- });
213
+ const result = await models.generateImages(
214
+ painter,
215
+ { input: [{ type: "text", text: "A red fox in the snow, watercolor" }] },
216
+ { aspectRatio: "16:9", size: "2K" },
217
+ );
198
218
  if (result.stopReason !== "stop") return result.errorMessage;
199
219
  for (const block of result.output) if (block.type === "image") image(block);
200
220
  ```
@@ -1,6 +1,6 @@
1
1
  # Run Pi with NVIDIA RTX and llama.cpp
2
2
 
3
- [NVIDIA Local AI Inference Recipes](https://nvidia.github.io/local-ai-inference-recipes/index.html) provides llama.cpp settings tuned for specific NVIDIA hardware and models. Each recipe gives a single-model `llama-server` command. Pi works with the llama.cpp router, which can serve and manage several models, so this guide converts the recipe command into a router preset.
3
+ [NVIDIA Local AI Inference Recipes](https://nvidia.github.io/local-ai-inference-recipes/index.html) provides llama.cpp settings tuned for specific NVIDIA hardware and models. Each recipe gives a single-model `llama-server` command. Pi works with the llama.cpp router, which can serve and manage several models, so this guide converts the recipe command into a router preset and starts it with `llama serve`. `llama serve` accepts the same options as `llama-server`.
4
4
 
5
5
  The examples below use Windows PowerShell. See [Local Models with llama.cpp](llama-cpp.md) for Pi's complete router and model-management reference.
6
6
 
@@ -8,12 +8,12 @@ The examples below use Windows PowerShell. See [Local Models with llama.cpp](lla
8
8
 
9
9
  1. Open the [recipe catalog](https://nvidia.github.io/local-ai-inference-recipes/index.html), select your hardware, operating system, and model, then choose **llama.cpp**. Check the prerequisites and memory requirements. Keep the recipe's launch command for the conversion below.
10
10
  2. Install llama.cpp with the recipe's setup instructions. The recipe's settings depend on its build, for example CUDA support or speculative decoding options.
11
- 3. Run `llama-server --help` and check that it lists `--models-preset`. Without it, the build cannot load the recipe as a router preset. Use a newer build that still meets the recipe's requirements.
11
+ 3. Run `llama serve --help` and check that it lists `--models-preset`. If the build has no `llama` program or the option is missing, it cannot load the recipe as a router preset. Use a newer build that still meets the recipe's requirements.
12
12
  4. Install Pi with the [Quickstart](quickstart.md). On native Windows, also see [Run Pi on Windows](windows.md).
13
13
 
14
14
  ## Convert the recipe to a preset
15
15
 
16
- A preset lists the settings for one or more models. Each section name becomes the model ID shown in Pi. Save the preset next to `llama-server`, or pass its full path when starting the router.
16
+ A preset lists the settings for one or more models. Each section name becomes the model ID shown in Pi. Save the preset in the llama.cpp folder, or pass its full path when starting the router.
17
17
 
18
18
  Convert each option from the recipe command into one preset line:
19
19
 
@@ -82,7 +82,7 @@ spec-draft-backend-sampling = true
82
82
  Open PowerShell in the llama.cpp folder and run:
83
83
 
84
84
  ```powershell
85
- .\llama-server.exe --models-preset qwen3.8-27b.ini --host 127.0.0.1 --port 8080
85
+ .\llama.exe serve --models-preset qwen3.8-27b.ini --host 127.0.0.1
86
86
  ```
87
87
 
88
88
  If the recipe requires a Hugging Face token, set `$env:HF_TOKEN` in the same PowerShell window before starting the router. On its first start, the router downloads the model files.
@@ -91,6 +91,6 @@ Use the [router health checks](llama-cpp.md#troubleshooting) to confirm that the
91
91
 
92
92
  ## Use the model in Pi
93
93
 
94
- Follow [Configure Pi](llama-cpp.md#configure-pi) and connect to `http://127.0.0.1:8080`. The preset section name is the model ID, so select `qwen3.8-27b` in `/model` for this example.
94
+ Follow [Configure Pi](llama-cpp.md#configure-pi) and connect to `http://127.0.0.1:9931`. The preset section name is the model ID, so select `qwen3.8-27b` in `/model` for this example.
95
95
 
96
96
  NVIDIA recipe memory settings assume that only the selected model uses the GPU. If `/llama` shows other loaded models, unload them before using the recipe model.
package/docs/providers.md CHANGED
@@ -47,7 +47,7 @@ This table covers providers with a single primary API-key variable. Providers th
47
47
  | ZAI Coding Plan (China) | `ZAI_CODING_CN_API_KEY` |
48
48
  | OpenCode Zen and Go | `OPENCODE_API_KEY` |
49
49
  | Radius | `RADIUS_API_KEY` |
50
- | TypeSafe ([classifier models](models.md#use-classifier-models)) | `TYPESAFE_API_KEY` |
50
+ | TypeSafe ([decision models](models.md#use-decision-models)) | `TYPESAFE_API_KEY` |
51
51
  | Hugging Face | `HF_TOKEN` |
52
52
  | Fireworks | `FIREWORKS_API_KEY` |
53
53
  | Together AI | `TOGETHER_API_KEY` |
@@ -57,8 +57,10 @@ This table covers providers with a single primary API-key variable. Providers th
57
57
  | MiniMax | `MINIMAX_API_KEY` |
58
58
  | MiniMax (China) | `MINIMAX_CN_API_KEY` |
59
59
  | Moonshot AI (Global and China) | `MOONSHOT_API_KEY` |
60
- | Qwen Token Plan and Individual | `QWEN_TOKEN_PLAN_API_KEY` |
61
- | Qwen Token Plan (China) and Individual (China) | `QWEN_TOKEN_PLAN_CN_API_KEY` |
60
+ | Qwen Token Plan Team | `QWEN_TOKEN_PLAN_TEAM_API_KEY` |
61
+ | Qwen Token Plan Team (China) | `QWEN_TOKEN_PLAN_TEAM_CN_API_KEY` |
62
+ | Qwen Token Plan Individual | `QWEN_TOKEN_PLAN_INDIVIDUAL_API_KEY` |
63
+ | Qwen Token Plan Individual (China) | `QWEN_TOKEN_PLAN_INDIVIDUAL_CN_API_KEY` |
62
64
  | Xiaomi MiMo | `XIAOMI_API_KEY` |
63
65
  | Xiaomi MiMo Token Plan (China) | `XIAOMI_TOKEN_PLAN_CN_API_KEY` |
64
66
  | Xiaomi MiMo Token Plan (Amsterdam) | `XIAOMI_TOKEN_PLAN_AMS_API_KEY` |
@@ -81,7 +83,7 @@ To use a secret manager without writing the resolved key to disk, set a provider
81
83
  }
82
84
  ```
83
85
 
84
- Pi runs the command when the key is first needed and caches its standard output for the process lifetime. Empty output, a timeout, or a nonzero exit leaves the key unresolved until Pi restarts.
86
+ Pi runs the command when the key is first needed and caches its standard output for the process lifetime. Empty output, a timeout, or a nonzero exit leaves the key unresolved: `/login` shows the provider as `stored key did not resolve`. To retry, for example after signing in to the secret manager, enter the same `!command` again in `/login`, or restart Pi.
85
87
 
86
88
  ## Provider Specific Config
87
89
 
@@ -117,7 +119,7 @@ Radius authentication uses its gateway catalog and caches refreshed model metada
117
119
 
118
120
  Authenticate with `/login openrouter` or `OPENROUTER_API_KEY`.
119
121
 
120
- With a key, Pi lists only the OpenRouter chat models that key may use, with the key's context size, max output, and prices. These come from OpenRouter's `/models/user` endpoint and reflect guardrails and provider restrictions set in OpenRouter. Image and classifier models are not filtered.
122
+ With a key, Pi lists only the OpenRouter chat models that key may use, with the key's context size, max output, and prices. These come from OpenRouter's `/models/user` endpoint and reflect guardrails and provider restrictions set in OpenRouter. Image and decision models are not filtered.
121
123
 
122
124
  Pi refreshes the list in the background at startup in interactive mode, when `/model` opens, after `/login`, and on `pi update --models`. The last list is saved and used offline and in `pi -p` and RPC mode. After switching keys outside `/login`, the previous key's list stays until the next refresh.
123
125
 
@@ -474,7 +474,7 @@ Response:
474
474
  }
475
475
  ```
476
476
 
477
- If output was truncated, includes `fullOutputPath`:
477
+ If output was truncated, includes `fullOutputPath`, or `fullOutputError` with the reason when the full output could not be saved (for example a full temp directory):
478
478
  ```json
479
479
  {
480
480
  "type": "response",
@@ -746,7 +746,7 @@ Response:
746
746
 
747
747
  ### get_last_assistant_text
748
748
 
749
- Get the text content of the last assistant message.
749
+ Get the text content of the last assistant message. Messages without text from an aborted or failed turn, or that only call tools, are skipped.
750
750
 
751
751
  ```json
752
752
  {"type": "get_last_assistant_text"}
package/docs/settings.md CHANGED
@@ -17,7 +17,10 @@ Add `"$schema": "https://pi.dev/schemas/settings.schema.json"` to `settings.json
17
17
  | `thinkingBudgets` | object | Built-in budgets | Token budgets for `minimal`, `low`, `medium`, and `high` thinking levels. |
18
18
  | `enabledModels` | `string[]` | All available models | Model patterns used for startup selection and model cycling. Uses the same format as `--models`. |
19
19
  | `hideThinkingBlock` | boolean | `false` | Hide thinking blocks in the transcript. |
20
- | `showCacheMissNotices` | boolean | `false` | Show notices for significant cache misses, successful cache warming, compaction usage, and provider recovery. |
20
+ | `notices.cacheMisses` | boolean | `false` | Show a notice when a response re-bills a significant part of the prompt cache, such as after a model switch or an idle gap. |
21
+ | `notices.cacheWarming` | boolean | `false` | Show the cost of cache warming requests. |
22
+ | `notices.compactionCosts` | boolean | `false` | Show the cost of compactions and branch summaries. |
23
+ | `notices.reasoningDrops` | boolean | `false` | Show a notice when a provider drops reasoning items from a request, such as OpenAI reasoning items after a prefix mismatch or Anthropic thinking blocks during recovery. |
21
24
  | `cacheWarming` | `"off" \| "streaming" \| "idle"` | `"idle"` | Keep eligible provider prompt caches warm during active runs and, with `"idle"`, for up to 30 minutes between runs. `"streaming"` warms only during active runs. Global setting only. |
22
25
 
23
26
  Cache warming runs only when the model declares a cache lifetime and Pi estimates at least $0.05 in avoided cache-miss cost. Refresh usage counts toward session totals but does not enter model context. `/session` shows the next decision; extensions can override it with `cache_warming_decision`. See [Prompt Cache Lifetimes](models.md#prompt-cache-lifetimes).
@@ -163,11 +166,10 @@ Resource arrays support glob exclusions with `!pattern`, exact inclusion with `+
163
166
 
164
167
  The built-in extensions are named `builtin:mcp`, `builtin:llama.cpp`, `builtin:codemode`, and `builtin:tool-search` in `extensions`. They load by default; `-builtin:mcp` disables one. A `+builtin:<name>` or `-builtin:<name>` entry in project settings overrides the user setting. `pi config` lists them under Built-in. `--no-extensions` disables them too, and `-e builtin:<name>` loads one explicitly.
165
168
 
166
- ## Updates, telemetry, and warnings
169
+ ## Updates and warnings
167
170
 
168
171
  | Setting | Type | Default | Description |
169
172
  |---|---|---|---|
170
173
  | `collapseChangelog` | boolean | `false` | Show a condensed changelog after an update. Also condenses extension package changelogs to one line per package. |
171
- | `enableInstallTelemetry` | boolean | `true` | Enable anonymous install/update reporting and selected provider attribution headers. Does not control update checks. |
172
174
  | `enableAnalytics` | boolean | `false` | Opt in to analytics data sharing. Currently used only by the experimental first-run setup. |
173
175
  | `warnings.anthropicExtraUsage` | boolean | `true` | Warn when Anthropic subscription authentication may use paid extra usage. |
@@ -13,7 +13,7 @@ Use `shellPath` to choose the Bash executable and `shellCommandPrefix` to run se
13
13
  | Model calls the optional `powershell` tool | PowerShell 7 (`pwsh.exe`) or Windows PowerShell |
14
14
  | An extension provides or replaces a shell tool | The operations implemented by that extension |
15
15
 
16
- Pi normally invokes Bash with `bash -c`. On Unix systems, it uses `/bin/bash`, then `bash` on `PATH`, and finally `sh` when Bash is unavailable. Native Windows first checks the configured path, then Git Bash, then `bash.exe` on `PATH`.
16
+ Pi normally invokes Bash with `bash -c`. On Unix systems, it uses `/bin/bash`, then `bash` on `PATH`, and finally `sh` when Bash is unavailable. Native Windows first checks the configured path, then Git Bash under Program Files, then Git Bash of the `git.exe` on `PATH`, then `bash.exe` on `PATH`.
17
17
 
18
18
  ## Choose a Bash executable
19
19