- Refactored environment variable access to use dedicated getter/setter functions in test suite.
- Simplified configuration constants by removing ompConfig dependency and using hardcoded values.
- Introduced module-level caching for agent directory and subdirectory paths to improve performance.
- Added setAgentDir() function to manage agent directory updates and cache invalidation.
- Reorganized dirs.ts with logical section headers and consolidated subdirectory functions using helper utilities.
- Updated directory accessor functions to accept optional agentDir parameter for flexibility.
- Extracted directory path utilities from multiple packages into a centralized '@oh-my-pi/pi-utils/dirs' module.
- Moved 30+ path helper functions (getAgentDir, getConfigRootDir, getPluginsDir, getMCPConfigPath, etc.) from scattered locations into a single shared utility module.
- Consolidated APP_NAME, CONFIG_DIR_NAME, and VERSION constants into the centralized dirs module for reuse across packages.
- Updated 70+ import statements across packages/ai, packages/coding-agent, packages/stats, and packages/tui to use the new centralized module.
- Removed local path construction logic and replaced with utility function calls for improved maintainability and consistency.
- Deleted packages/coding-agent/src/extensibility/plugins/paths.ts as its functions were moved to the centralized dirs module.
When store is false, OpenAI does not persist response items server-side.
Previously, encrypted_content was only requested when reasoningEffort or
reasoningSummary options were explicitly set. Without it, reasoning items
are serialized with just their ID, causing 404 errors on subsequent turns
when OpenAI cannot resolve the ID reference.
Fixes#41
- Added GPT-5.3 Codex Spark model with 128K context window and extended reasoning capabilities.
- Added MiniMax M2.5 and M2.5 Lightning models via OpenAI-compatible API (minimax-code and minimax-code-cn providers).
- Added MiniMax M2.5 and M2.5 Lightning models via Anthropic API (minimax and minimax-cn providers).
- Added Llama 3.1 8B model via Cerebras API.
- Added MiniMax M2.5 model via OpenRouter and Vercel AI Gateway.
- Added Qwen3 VL 32B Instruct multimodal model via OpenRouter.
- show help instead of crashing on `omp setup` with no args
- show runtime-discovered MCP servers in `/mcp list`
- remove deprecated Anthropic model entries from models.json
- sort models by recency in model selector
The Z.AI login flow was hardcoded to validate API keys using the 'glm-5'
model. However, the Z.AI Coding Plan, which this login is for, currently
provides access to 'glm-4.7', with 'glm-5' being rolled out incrementally.
This caused login to fail for users who did not yet have 'glm-5' access.
This change updates the validation model to 'glm-4.7' to match the model
available in the Coding Plan.
Fixes#39
- Updated Claude Code version header to 2.1.39 and runtime version to v24.13.1.
- Increased request timeout from 60s to 600s for improved reliability on slower connections.
- Reordered Accept-Encoding header values to prioritize Brotli compression.
- Updated OAuth endpoints to use platform.claude.com and expanded scopes to include user:sessions:claude_code and user:mcp_servers.
- Removed deprecated beta features claude-code-20250219 and fine-grained-tool-streaming-2025-05-14.
- Improved Bun binary detection and update process with version verification and environment variable checking.
- Sorted Antigravity models alphabetically in generated models.json and generation script.
- Updated Antigravity model configurations with corrected model IDs, names, and parameters.
- Fixed qwen/qwen3-max-thinking maxTokens from 4096 to 202752 to match context window.
- Added Perplexity OAuth authentication support with native macOS app extraction and email OTP login flows.
- Implemented loginPerplexity and refreshPerplexityToken functions for OAuth token management.
- Created PerplexitySocket class providing Socket.IO v4 client over Engine.IO v4 WebSocket transport with RPC support.
- Added OAuth authentication to Perplexity web search provider with automatic token refresh and SSE streaming support.
- Extended SearchResponse interface with authMode field to track authentication method (oauth or api_key).
- Changed PerplexityProvider.isAvailable() to async to support OAuth token availability checking.
- Removed support for `.pi` configuration directory alias in favor of `.omp` across all packages.
- Updated all configuration paths and references from `.pi` to `.omp` in user and project directories.
- Refactored configuration discovery in builtin.ts to simplify directory traversal logic and remove multi-alias support.
- Simplified Python module discovery to use single directory paths instead of arrays of aliases.
- Updated debug and crash log paths from `.pi/agent/` to `.omp/agent/` in TUI package.
The GitHub Copilot providers were unconditionally overriding the X-Initiator
header based on message role. This prevented the subagent fix from working
because subagents send the task as a user message.
Now the providers check if X-Initiator is already set in the model headers
before applying the default logic. This allows the sdk.ts fix to properly
mark subagent requests as agent-initiated.
Add support for MiniMax Coding Plan with OpenAI-compatible API:
- New providers: minimax-code (international) and minimax-code-cn (China)
- Environment variables: MINIMAX_CODE_API_KEY and MINIMAX_CODE_CN_API_KEY
- Uses thinkingFormat: 'zai' for reasoning compatibility
- Models: MiniMax-M2, MiniMax-M2.1, MiniMax-M2.1-lightning
- Base URLs: https://api.minimax.io/v1 (intl), https://api.minimaxi.com/v1 (CN)
The Coding Plan is a subscription-based service separate from regular MiniMax API.
Add support for z.ai's GLM Coding Plan as a provider accessible via `/login`.
Implements API key-based authentication similar to Kimi Code.
Changes:
- Create login flow in `utils/oauth/zai.ts` with browser redirect to API keys page
- Add API key storage methods (`saveApiKey`, `getApiKey`) to CliAuthStorage
- Register Z.AI in OAuth provider types, exports, and CLI handler
- Add GLM-5 model to Z.AI provider
Users can now authenticate with:
bunx @oh-my-pi/pi-ai login zai
- Changed hashline format separator from two spaces to pipe character (|) throughout codebase for consistency.
- Simplified ollama installation checks in test files by replacing execSync with Bun.which() and inverting PI_NO_LOCAL_LLM to PI_LOCAL_LLM environment variable.
- Added early return guards in test beforeAll hooks to skip tests when required tools (ollama, magick) are unavailable.
- Added debug instrumentation to system prompt building via PI_DEBUG_STARTUP environment variable for startup performance monitoring.
- Removed prompt cache retention assertion from openai-codex streaming test.
- Increased CODEX_MAX_RETRIES from 2 to 5 to improve reliability on transient failures.
- Added parsing of retry delay from error response body text (e.g., 'Please try again in 225ms') when retry-after headers are unavailable.
- Ensured Anthropic tool_result content is never empty when is_error is true by providing fallback error message.
- Added TypeScript type declarations for models.json to provide better IDE support and type safety.
- Simplified type signatures for getModel() and getModels() functions by removing complex generic type inference in favor of simpler, more maintainable typing.
- Updated google-antigravity provider model ordering and metadata, including renamed Gemini 2.5 Flash (Thinking) model and expanded input types for claude-opus-4-5-thinking.
- Refactored test helper code in context-overflow.test.ts to improve code clarity and type safety.
- Migrated models export from TypeScript module to JSON format, changing the public API from importing MODELS from './models.generated' to importing from './models.json' with JSON import assertion.
- Updated @anthropic-ai/sdk dependency from ^0.72.1 to ^0.74.0.
- Simplified model generation script by replacing 49 lines of TypeScript code generation with direct JSON serialization.
- Updated @types/bun devDependency from ^1.3.8 to ^1.3.9 across all packages.
- Removed models.generated.ts exclusion from biome.json linting configuration.
- Added support for Kimi K2, K2 Turbo Preview, and K2.5 models with reasoning capabilities.
- Fixed Claude Opus 4.6 context window to 200K across all providers (was incorrectly set to 1M).
- Fixed Claude Sonnet 4 context window to 200K across multiple providers (was incorrectly set to 1M).
- Improved Kimi Code model fetching to merge fallback models not returned by the API endpoint.