A series of fixes for making GPT-5 reliable and effective with anyclaude.
## UX changes
- Converts opaque OpenAI service errors into 429s so CC natively retries instead of failing. These are very common.
- Rich debugging support via `ANYCLAUDE_DEBUG`
- Supports specifying reasoning effort and service tier
## Codebase
- Added CI
## Remaining issues
- GPT-5 often fails to use the native tool calls. These failures seems intermittent.
# Update AI SDK to v5 and add repository guidelines
This PR updates the project to use AI SDK v5 and adds comprehensive repository guidelines. Key changes include:
1. Added `AGENTS.md` with detailed repository guidelines covering:
- Project structure and organization
- Build and development commands
- Coding style conventions
- Testing guidelines
- Commit and PR best practices
- Security considerations
2. Updated AI SDK dependencies:
- Upgraded from v4 to v5 (`ai@5.0.8`)
- Updated all provider packages to v2 series
- Added explicit `zod` dependency with pinned version
3. Improved build script to:
- Properly externalize dependencies
- Add shebang line more reliably
- Make output executable
4. Updated code to support AI SDK v5 API changes:
- Migrated from `ProviderV1` to `ProviderV2` interfaces
- Updated message conversion logic
- Fixed stream handling for new event types
- Made `signature` field optional in thinking content
5. Updated examples in documentation to reference newer models like `gpt-5-mini` instead of older models.
These changes ensure compatibility with the latest AI SDK while providing clear guidelines for contributors.
# Add Nix development environment and Claude.ai integration
This PR adds support for Nix development environments and improves Claude.ai integration:
1. Added a `CLAUDE.md` file that provides guidance to Claude Code when working with this repository, including:
- Project overview and architecture explanation
- Development commands and testing instructions
- Environment variable documentation
2. Added Nix development environment support:
- Created `flake.nix` and `flake.lock` for reproducible development environments
- Configured development shell with bun, nodejs, and code quality tools
- Added treefmt integration for consistent code formatting
3. Updated `.gitignore` to exclude Nix-related files:
- `.direnv`
- `.envrc`
- `.claude`
These changes make it easier for developers using Nix to contribute to the project and improve the experience when using Claude Code with this repository.