Added to both OpenAI API and OpenAI Codex (ChatGPT OAuth) providers.
128k context window, text-only, research preview with zero cost.
Not yet functional via pi, may become available in the next few hours or days.
The extension system currently only forwards agent_start, agent_end,
turn_start, and turn_end events. This means extensions cannot access
streaming text (token-by-token), message lifecycle, or tool execution
progress — all of which are available to internal subscribers.
This adds forwarding for the remaining 6 agent event types:
- message_start, message_update, message_end
- tool_execution_start, tool_execution_update, tool_execution_end
These follow the exact same pattern as the existing forwarded events:
new interfaces in types.ts, exports in index.ts, and else-if blocks
in _emitExtensionEvent(). The new types are included in ExtensionEvent
and automatically flow through RunnerEmitEvent (they're not in the
exclusion list).
This enables extensions to build real-time UIs, streaming WebSocket
bridges, and other integrations that need fine-grained event access.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
After compaction, context token count is unknown until the next LLM
response. Instead of showing stale pre-compaction values or heuristic
estimates, the footer now shows ?/200k.
ContextUsage.tokens and ContextUsage.percent are now number | null
(breaking change). Removed usageTokens, trailingTokens, lastUsageIndex
from ContextUsage (internal details).
Also fixed _checkCompaction() using .find() (first compaction) instead
of getLatestCompactionEntry() (latest), which caused incorrect overflow
detection with multiple compactions.
Closes#1382
Add metadata?: Record<string, unknown> to StreamOptions so providers
can extract fields they understand. Anthropic provider extracts user_id
for abuse tracking and rate limiting. Other providers ignore it.
Based on #1384 by @7Sageer, reworked to use a generic type instead of
Anthropic-specific typing on the base interface.
* extend interleaved thinking test to Anthropic first-party provider
* switch back to global Bedrock model identifier
* set retry to 3 for both
* enable bedrock claude interleaved thinking by default and use completeSimple in test
- Replace verbose ANTIGRAVITY_SYSTEM_INSTRUCTION with compact version from CLIProxyAPI
- Replace bridgePrompt override with [ignore] wrapper pattern
- Switch Antigravity Gemini test model from gemini-3-flash to gemini-3-pro-high
- Rename calculator tool to math_operation (gemini-3-pro ignores schema for 'calculator')
closes#1415
Update extensions.md and rpc.md to accurately reflect that ctx.hasUI is
true in RPC mode. Document missing unsupported/degraded ExtensionUIContext
methods: pasteToEditor, getAllThemes, getTheme, setTheme.
Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
The invalid-params error paths already listed available agents,
but the unknown-agent path in runSingleAgent just returned
'Unknown agent: claude' with no hint what exists.
Now: 'Unknown agent: "claude". Available agents: "worker".'
Model would guess names like "claude", "default", or skill names
like "brave-search". Now it self-corrects on the next call.
Tested with Opus 4.6: without fix, model gave up on subagent
and ran the tool calls itself instead. With fix, 1 wasted call.
Include tool parameter names, types, descriptions in a collapsible
section under each tool in the export HTML. Also adds parameters to
pi.getAllTools() return value.
closes#1407, closes#1416
rg was only downloaded lazily when the grep tool was invoked, but the
LLM often uses rg directly via the bash tool. Ensure both fd and rg
are downloaded at startup so they are available in PATH for all tools.
fixes#1348