@oh-my-pi/pi-agent-core
Breaking Changes
- Replaced global token counting functions (
countTokens,countTokensConservatively,setTokenizerModel, andestimateTokens) with model-scoped, immutableTokenizerinstances (agent.tokenizer). Usetokenizer.countTokens(text, mode?),tokenizer.countMessage(message), ortokenizer.countMessages(messages). - Updated context management functions (
findCutPoint,prepareBranchEntries,collectShakeRegions,pruneToolOutputs,pruneSupersededToolResults, andtrimRemoteCompactionInputToContextWindow) to require an explicitTokenizerinstance.
Added
- Added
Tokenizer.checkTokenBudget(text, budget)to efficiently verify if text fits within a token limit using fast byte-bound checks before falling back to full tokenization. - Added provider-anchored transcript token estimation (
findTranscriptUsageAnchor,isTranscriptUsageAnchor,estimateTranscriptTokens) to calculate transcript token counts incrementally from the latest reported assistant turn usage. - Added
remotePreserveReusable()to check whether a previous remote compaction payload remains reusable with the active model.
Changed
- Expanded native tokenizer support across catalog models, adding exact embedded token counting for Claude, Qwen 3.5+, DeepSeek V3/V4/R1, Kimi K2/K3, and GLM-5+ models.
Tokenizernow constructs from a resolved catalogModel. createCompactionSummaryMessagetakes an options object after(summary, tokensBefore, timestamp);CompactionSummaryMessagegained optionalmethodandtokensAfterdisplay metadata.
@oh-my-pi/pi-ai
Added
- Added model metadata fields (
context_length,max_output_tokens,input_modalities, etc.) to auth gateway model listing responses
Fixed
- Fixed tool-argument repair applying lossy transformations (such as stringifying objects or stripping unrecognized keys) when validating union schemas (
anyOf/oneOf), preventing corrupted tool call and subagent payloads - Fixed 400 errors when communicating with local OpenAI-compatible inference servers that reject
chat_template_kwargs.reasoning_effortby improving reasoning effort parameter fallback and compatibility handling - Fixed DeepSeek-family models on hosts like Fireworks losing reasoning whenever tools were offered: a redundant
tool_choice: "auto"is now omitted so the provider keeps thinking enabled; forced and"none"selectors still take priority (#1207)
@oh-my-pi/pi-catalog
Added
- Models now include an optional
tokenizerfamily field across bundled, discovered, and custom models (supporting Claude, Qwen, DeepSeek, Kimi, and GLM families), with support for explicit overrides in model configuration. - Added long-context cost tiers (
cost.longContext) to subscription Codex GPT-5.6 models (Sol, Terra, Luna) matching first-party API pricing above 272K input tokens.
Changed
- Bundled model metadata is prebuilt during generation, reducing catalog startup work.
Fixed
- Fixed tool-call turn failures for
opencode-go/muse-spark-1.2and related variants by ensuring API transport pins apply to live discovery and automatically inferring response routes for gateway-first OpenCode models (#8957).
@oh-my-pi/pi-coding-agent
Added
/cleanse(andomp cleanse) — run the checker/repair loop in-session, with a live status board of running checkers, repair subagents, and token/cost totals.omp ps— interactive monitor for daemon-supervised background processes.- Composer layouts —
composer.shapepicks the editor frame (rounded box, Claude Code rules, upstream-pi rules, borderless), with live previews in/settingsand the setup wizard. - Context line —
statusLine.contextLinegauge (percentage,annotated,embedded) showing context usage and compaction boundaries. - Backgroundable Python —
evalcells can run async and auto-background likebash, with configurable thresholds. - Local Claude token counting — Anthropic-family tokens now count via a native local tokenizer, and every counter (session maintenance, advisor, stats, context tools) uses the active model's own tokenizer.
extendedContextsetting — pick whether models with premium long-context pricing (272K/1M tiers on Codex-class models) use the extended window or compact early and stay on standard pricing./extended-context— toggle premium long-context windows without leaving the session.- Speculative compaction — with
compaction.asyncEnabled, all compaction modes compact in parallel while the session continues, then splice the result in instantly. tokenizerproperty on custom models andmodelOverridesto pin the tokenizer family for proxy models.qwenTemplateReasoningEffortinmodels.ymlcompatto disable the Qwen 3.8+ reasoning-effort template parameter for strict local servers.- Click-to-toggle and drag-to-reorder for list-valued editors in
/settings. icon.subscriptionandicon.advisorsymbol-theme tokens (Nerd Font, Unicode, ASCII).
Changed
- Typing anywhere in the /models UI now immediately focuses the model list for instant search and arrow navigation.
- Revamped the todo HUD — overall progress renders along the tree-spine connector with smooth completion transitions.
- Compaction divider now names the maintenance method that fired (
remote-compacted,soft-compacted,handed-off,snap-compacted) and shows the before → after context size (e.g.256K→20K). /handoff(and automatic handoff compaction) now compacts in place, replacing the session context instead of forking a new session.- Compaction method priorities —
compaction.methodOrdertakes an ordered preference list (e.g.[remote, snap]uses remote compaction where the provider supports it, such as OpenAI, and snap everywhere else), replacingcompaction.strategy/compaction.remoteEnabled. - Unified inline overlays and selectors (model picker, settings,
/cleanse) into one titled rounded-box panel style. - Risk badges and warnings on
/settingsrows, starting with External Thinking. - Faster CLI Startup
Fixed
/modelskeepsautothinking on non-default roles such astaskinstead of changing the active model and displaying the role asmax.- Subagent
yieldstructured results no longer get corrupted by lossy argument repairs; prompt guidance improved for weak callers. - GitHub
file_readreturns proper image blocks and direct view URLs for image/binary files. - Cancelled prompts during pre-stream turn setup restore the text and image attachments to the editor.
topbuiltin accepts single-dash macOS flags such as-pidand-stats.- GNU/BSD compat sweep across built-in shell utilities (
timeout,diff,find,date,tail,head,rg,stat,truncate,cksum,sleep,which,nohup,kill).
@oh-my-pi/hashline
Added
- Added an opener-escape landing correction for insertions anchored on a construct's opening line to place shallower sibling constructs after the enclosing block rather than splitting the opener from its body.
Fixed
- Fixed an issue where single-line replacements echoing attributes or decorators (such as
#[napi]or@Injectable()) could lead to silently duplicated annotations. - Increased the default snapshot-store path capacity from 30 to 256 to prevent early tags in wide sessions from aging out and triggering misleading "hash is not from this session" errors.
@oh-my-pi/pi-natives
Added
- Added offline
countTokenssupport for Anthropic Claude families (ClaudeV3,ClaudeV47,ClaudeV5) via a high-performance native port ofctok. - Added exact offline token counting support for Qwen (3.5+, 3.6+, 3.8), DeepSeek (V3, V4, R1), Kimi (K2, K3), and GLM-5 models alongside rebuilt OpenAI encodings, with optimized zero-allocation string passing from JavaScript.
- Added
nodeChainAtnative API to retrieve innermost-first tree-sitter node chains with grammar kinds and line spans for structural syntax analysis.
Changed
- Improved shell builtins (
grep,rg,sed,cat,head,tail,jq,ls, etc.) to stream output progressively with destination-aware line buffering for pipes, terminals, and live TUI output, while maintaining block buffering for file writes. - Updated compound blocks (
{ ...; },(...)) and shell-function pipeline stages to run concurrently with other pipeline stages, preventing head-of-line blocking and pipe buffer deadlocks.
Fixed
- Fixed the shell output minimizer dropping failure details from non-TTY
bun testruns: the(fail)line, code frame,error:assertion, and stack trace are now kept instead of collapsing a failing run to bare pass/fail counts; unrecognized failing test formats now fall back to head/tail instead of counts-only output.
@oh-my-pi/omp-stats
Changed
- Window token estimates now incorporate broker-reported fleet token burn when an auth broker is configured, accurately tracking fleet-wide usage instead of undercounting with local-only statistics.
Fixed
- Fixed an issue in subscription-window insights where distinct limits sharing a duration label (such as Anthropic overall vs. model-scoped 7-day windows) were incorrectly merged, which inflated window-equivalents and skewed tokens-per-window estimates. Windows are now grouped by provider limit ID.
@oh-my-pi/pi-tui
Added
- Added composer border styles (
box,claude,pi,borderless) viaComposerStyleobjects andgetComposerStyle, unifying chrome geometry and rendering across the editor and previews. - Added support for warning risk notes and row markers in settings lists.
Full Changelog: v17.3.8...v17.4.0