Claude Code with any LLM
# 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. |
||
|---|---|---|
| src | ||
| .gitignore | ||
| AGENTS.md | ||
| bun.lock | ||
| CLAUDE.md | ||
| demo.png | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
anyclaude
Use Claude Code with OpenAI, Google, xAI, and other providers.
- Extremely simple setup - just a basic command wrapper
- Uses the AI SDK for simple support of new providers
- Works with Claude Code GitHub Actions
Get Started
# Use your favorite package manager (bun, pnpm, and npm are supported)
$ pnpm install -g anyclaude
# anyclaude is a wrapper for the Claude CLI
# `openai/`, `google/`, `xai/`, and `anthropic/` are supported
$ anyclaude --model openai/gpt-5-mini
Switch models in the Claude UI with /model openai/gpt-5-mini.
FAQ
What providers are supported?
See the providers for the implementation.
GOOGLE_API_KEYsupportsgoogle/*models.OPENAI_API_KEYsupportsopenai/*models.XAI_API_KEYsupportsxai/*models.
Set a custom OpenAI endpoint with OPENAI_API_URL to use OpenRouter
How does this work?
Claude Code has added support for customizing the Anthropic endpoint with ANTHROPIC_BASE_URL.
anyclaude spawns a simple HTTP server that translates between Anthropic's format and the AI SDK format, enabling support for any AI SDK provider (e.g., Google, OpenAI, etc.)
Do other models work better in Claude Code?
Not really, but it's fun to experiment with them.
ANTHROPIC_MODEL and ANTHROPIC_SMALL_MODEL are supported with the <provider>/ syntax.