Skip to content

Pi-Bolt 0.5.1 (Pi 1.0.0)

Choose a tag to compare

@opensec-intelligence opensec-intelligence released this 03 Oct 11:43
· 2535 commits to pi-bolt since this release

Pi-Bolt 0.5.1 makes long answers cheap to stream, fixes a hang after a pause and a class of extensions that failed to load, and closes the gaps in what 0.5.0 was tested on. It runs Pi 1.0.0.

Smoother

  • Long answers no longer tie up a core. While an answer streamed in, every new chunk had the whole message parsed again, twice, and every code block in it highlighted again, so the cost of a chunk grew with the length of the answer. Now only the last blocks are parsed and rendered again, and code that was highlighted is kept. Streaming a 20,000-character answer with code, tables and lists at 1,200 characters a second used 12.4 s of CPU in 0.5.0 (three quarters of a core for its whole length; stock Bun the same) and now uses 1.3 s; a 60,000-character one, 47 s and now 5 s. The share of a core stays at 8 to 10% however long the answer gets. What is drawn is the same, byte for byte.
  • Highlighting and Markdown patterns are compiled. The executable carries machine code for 1,284 of the regular expressions Pi builds at run time (129 before): Markdown and every language Pi highlights. The rest ran in an interpreter, slowest on text with characters outside Latin-1.
  • Starting, short turns and memory are as in 0.5.0.

Fixed

  • The first prompt after a pause could hang until it timed out. An idle connection to the model provider was kept for five minutes and used again, and one that a NAT, a load balancer or a suspended laptop had dropped in the meantime never answered. A connection now waits 4 seconds, or as long as the server says it may, as in Node; and never past its time by the clock, however long the machine slept. BUN_CONFIG_HTTP_KEEPALIVE_TIMEOUT changes the 4 seconds.
  • Extensions that use axios (and anything else that calls Error.captureStackTrace on a plain object) failed to load the first time after a restart, with "First argument must be an Error object".
  • Run-time extensions start faster after a reboot. What Pi makes of an extension's TypeScript was kept in the system's temporary directory, which a reboot empties: every extension was transformed again on the next start, up to seconds for a large one. It is now kept in the agent directory (cache/jiti), which other users of the machine cannot write to either.
  • A build with plugins stops with a clear message when the compiler cannot compile a function, naming the function and the reason, instead of stopping on an internal error or producing an executable that stops when the function is called.
  • The installer says so on a CPU without SSE4.2 or a system older than glibc 2.17, instead of installing something that cannot start.

Tested

Everything 0.5.0 was tested with, and what it was not:

  • Old systems: the load test inside CentOS 7 (glibc 2.17), Debian 9 and Amazon Linux 2 userlands, and the installer on CentOS 7.
  • Intel CPUs, emulated: Haswell and Skylake run the compiled code of the main build; Sandy Bridge and Nehalem run the baseline build, and fall back to bytecode with the main one.
  • Every model API Pi speaks most: the load test through Pi's Anthropic and OpenAI Responses clients as well as chat completions, against a local server that speaks each format: tool results and requests identical to stock Bun's. No real provider is called by the tests.
  • Longer runs: 1,000 prompts in one process through each API, memory flat.
  • 7,000 more random programs on this release's compiler, all identical; JavaScriptCore's stress tests, the same 6 known differences.

Install

curl -fsSL https://pi-bolt.opensec.in/install.sh | sh

or pi-bolt update from 0.5.0, or npm install -g pi-bolt, or bun add -g pi-bolt.

Asset For
pi-bolt-linux-x64.tar.xz / .tar.gz Recommended. CPUs with AVX2 (Intel Haswell 2013+, AMD Zen+).
pi-bolt-linux-x64-baseline.tar.xz / .tar.gz Any x86-64 CPU with SSE4.2.
pi-bolt-linux-x64-jit.tar.xz / .tar.gz JIT also on, for plugins loaded at run time.
pi-bolt-runtime-linux-x64.tar.gz The Pi-Bolt Bun runtime, for compiling plugins in.

Linux x86-64 with glibc 2.17 or later.