It seemed as if the OpenAI message spec tried to send non-compliant messages with { text: "" } instead of { contet: "" }, which the AI Gateway did not accept.
Adjust base colors (teal, blue, green, red, yellow, dimGray) to meet
4.5:1 contrast ratio against white backgrounds. Update thinking level
colors to reference theme vars for consistency.
Refactor test-theme-colors.ts into a CLI with contrast, test, and theme
commands for easier color validation.
Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
* feat: add summarize extension example
Demonstrates custom UI with markdown rendering and external model
integration for conversation summarization.
* chore: update examples/extensions/README.md with summarize.ts
- Switch from jiti to @mariozechner/jiti fork
- Use virtualModules option for bundled packages in compiled binary
- Disable tryNative so jiti handles all nested imports
- Lazy-load pi-coding-agent to avoid circular dependency
- Add minimax to KnownProvider and Api types
- Add MINIMAX_API_KEY to getEnvApiKey()
- Generate MiniMax-M2 and MiniMax-M2.1 models
- Add context overflow detection pattern
- Add tests to all required test files
- Update README and CHANGELOG with attribution
Also fixes:
- Bedrock duplicate toolResult ID when content has multiple blocks
- Sandbox extension unused parameter lint warning
- Add move() pure function for swapping adjacent items
- Handle Alt+Up/Down in handleInput to reorder enabled models
- Selection follows the moved item
- Update footer hint with new shortcut
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace mutable items[].enabled with EnabledIds type (null | string[])
- Extract state operations as pure functions (toggle, enableAll, clearAll, move, getSortedIds)
- Simplify component to UI wiring only
- Prepare for Alt+Up/Down model reordering feature
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Improve Gemini CLI provider retries and headers
- Add Antigravity endpoint fallback (tries daily sandbox then prod when baseUrl is unset)
- Parse retry delays from headers (Retry-After, x-ratelimit-reset, x-ratelimit-reset-after) before body parsing
- Derive stable sessionId from first user message for cache affinity
- Retry empty SSE streams with backoff without duplicate start/done events
- Add anthropic-beta header for Claude thinking models only
* Improve Cloud Code Assist error messages
- Extract just the message from verbose JSON error responses
- Extract cause from generic 'fetch failed' errors for better diagnostics
* Make 'other side closed' network error retryable
* Make 'other side closed' network error retryable
Adds cache points to system prompt and last user message for:
- Claude 3.5 Haiku
- Claude 3.7 Sonnet
- Claude 4.x models (Opus, Sonnet, Haiku)
Uses Bedrock's cachePoint blocks with 5-minute TTL.
Adds support for Amazon Bedrock with Claude models including:
- Full streaming support via Converse API
- Reasoning/thinking support for Claude models
- Cross-region inference model ID handling
- Multiple AWS credential sources (profile, IAM keys, API keys)
- Image support in messages and tool results
- Unicode surrogate sanitization
Also adds 'Adding a New Provider' documentation to AGENTS.md and README.
Co-authored-by: nickchan2 <nickchan2@users.noreply.github.com>
Uses @anthropic-ai/sandbox-runtime to enforce filesystem and network
restrictions on bash commands (sandbox-exec on macOS, bubblewrap on Linux).
Features:
- Per-project config via .pi/sandbox.json
- Global config via ~/.pi/agent/sandbox.json
- Enabled by default with sensible defaults
- --no-sandbox flag to disable
- /sandbox command to view current config
When running with tsx in dev mode, jiti loads extensions in a separate
module cache. This caused the theme to be undefined in jiti's copy of
theme.ts since initTheme() was only called on tsx's copy.
Using globalThis with Symbol.for() ensures all module instances share
the same theme, regardless of which loader created them.
When running from source with tsx, the jiti aliases pointed to .js files
that don't exist (only .ts files exist). This caused jiti to fall back to
different module resolution, loading a separate instance of theme.ts where
initTheme() was never called, resulting in undefined theme.
Now checks if .js exists and falls back to .ts for dev mode compatibility.
Prevents undefined theme when extensions call ctx.ui.custom() in edge cases
where module resolution could cause the theme variable to be accessed before
initTheme() is called.
Breaking change: pi.getAllTools() now returns Array<{ name, description }>
instead of string[]. Extensions needing just names can use .map(t => t.name).
Removes redundant getToolInfo() method added in original PR.
Fixes#647