Claude Code with any LLM
Find a file
Ammar Bandukwala f42e03937e
OpenAI GPT-5 improvements (#9)
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.
2025-08-10 15:50:08 -05:00
.github/workflows OpenAI GPT-5 improvements (#9) 2025-08-10 15:50:08 -05:00
src OpenAI GPT-5 improvements (#9) 2025-08-10 15:50:08 -05:00
.gitignore Add Nix development environment and Claude guidance file 2025-08-08 15:10:26 +02:00
AGENTS.md Add repository guidelines and update AI SDK to v2 2025-08-08 14:51:19 +00:00
bun.lock OpenAI GPT-5 improvements (#9) 2025-08-10 15:50:08 -05:00
CLAUDE.md OpenAI GPT-5 improvements (#9) 2025-08-10 15:50:08 -05:00
demo.png Initial commit 2025-05-27 15:57:58 -04:00
flake.lock Add Nix development environment and Claude guidance file 2025-08-08 15:10:26 +02:00
flake.nix Add Nix development environment and Claude guidance file 2025-08-08 15:10:26 +02:00
LICENSE Initial commit 2025-05-27 15:57:58 -04:00
package.json OpenAI GPT-5 improvements (#9) 2025-08-10 15:50:08 -05:00
README.md OpenAI GPT-5 improvements (#9) 2025-08-10 15:50:08 -05:00
tsconfig.json Initial commit 2025-05-27 15:57:58 -04:00

anyclaude

NPM Version

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.

GPT-5 Support

Use --reasoning-effort (alias: -e) to control OpenAI reasoning.effort. Allowed values: minimal, low, medium, high.

anyclaude --model openai/gpt-5-mini -e high

Use --service-tier (alias: -t) to control OpenAI service tier. Allowed values: flex, priority.

anyclaude --model openai/gpt-5-mini -t priority

Note these flags may be extended to other providers in the future.

FAQ

What providers are supported?

See the providers for the implementation.

  • GOOGLE_API_KEY supports google/* models.
  • OPENAI_API_KEY supports openai/* models.
  • XAI_API_KEY supports xai/* 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.