npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

claude-azure

v1.1.0

Published

Claude Code with native Azure OpenAI support

Readme

  ╔═╗
  ║Q║ Claude Azure
  ╚═╝

Claude Azure

Run Claude Code with Azure OpenAI, OpenAI, or Anthropic

License: MIT TypeScript Node

FeaturesQuick StartConfigurationDeployment ModesTroubleshooting


Overview

Claude Azure is a fork of Claude Code that adds native support for Azure OpenAI and OpenAI alongside the standard Anthropic API. It provides a seamless local proxy that translates Anthropic API calls to Azure/OpenAI formats, letting you use Claude Code with your existing Azure deployments.

Features

Multi-Provider Support

  • Azure OpenAI (Tiered or Model Router modes)
  • OpenAI API
  • Anthropic API (native passthrough)

🔧 Flexible Deployment Options

  • Tiered Mode: Map model sizes to separate Azure deployments
  • Model Router Mode: Single endpoint with Azure APIM routing

🚀 Zero-Friction Setup

  • Interactive setup wizard
  • Automatic proxy configuration
  • Seamless Claude Code integration

🔒 Secure Configuration

  • Local config storage (~/.claude-azure/config.json)
  • No cloud credentials required beyond provider API keys

Quick Start

Prerequisites

  1. Install Claude Code (required):

    curl -fsSL https://claude.ai/install.sh | bash
  2. Azure OpenAI resource (if using Azure) with deployed models

Installation

Option 1: npm (Recommended)

# Install globally from npm
npm install -g claude-azure

# Run setup wizard
claude-azure

Option 2: From Source

# Clone and install
git clone https://github.com/schwarztim/claude-azure.git
cd claude-azure
npm install
npm run build
npm link

# Run setup wizard
claude-azure

Windows Users: Works on PowerShell, Command Prompt, and WSL. Claude Code must be installed first.

First Run

The setup wizard will guide you through configuration:

  ╔═╗
  ║Q║ Claude Azure
  ╚═╝

  Claude Azure Setup
  ─────────────────────────────────────

? Select your AI provider:
❯ Azure OpenAI - Use Azure-hosted models
  OpenAI - Use OpenAI API directly
  Anthropic - Use Anthropic API directly

Azure OpenAI Configuration

Azure OpenAI Configuration
Get these from Azure Portal → Azure OpenAI → Keys and Endpoint

? Azure OpenAI Endpoint: https://myresource.openai.azure.com
? Azure OpenAI API Key: ********
? API Version: 2024-12-01-preview

Deployment Mode
? Select deployment mode:
  ❯ Tiered - Separate deployments for different model sizes
    Model Router - Single deployment for all models

# For Tiered mode:
? Opus/Large model deployment: gpt-4o
? Sonnet/Medium model deployment: gpt-4o
? Haiku/Small model deployment: gpt-4o-mini

# For Model Router mode:
? Model Router deployment name: model-router

✔ Testing Azure connection...
✓ Configuration saved!

Usage

# First run - interactive setup
claude-azure

# Reconfigure provider/settings
claude-azure --setup

# Reset all configuration
claude-azure --reset

# Show proxy debug logs
claude-azure --verbose

# Pass arguments to Claude Code
claude-azure -p "explain this codebase"
claude-azure --model sonnet

Configuration

Config File Location

~/.claude-azure/config.json

Example Configuration (Tiered Mode)

{
  "provider": "azure",
  "azure": {
    "endpoint": "https://myresource.openai.azure.com",
    "apiKey": "sk-...",
    "apiVersion": "2024-12-01-preview",
    "deployments": {
      "opus": "gpt-4o",
      "sonnet": "gpt-4o",
      "haiku": "gpt-4o-mini"
    }
  }
}

Example Configuration (Model Router Mode)

{
  "provider": "azure",
  "azure": {
    "endpoint": "https://myresource.openai.azure.com",
    "apiKey": "sk-...",
    "apiVersion": "2024-12-01-preview",
    "modelRouter": "model-router"
  }
}

Deployment Modes

Tiered Mode (Traditional)

When to use:

  • Fine-grained control over model deployments
  • Cost optimization by model size
  • Different models for different tiers

How it works:

  • Separate Azure deployments for each model class
  • Maps Claude model names to your deployments:
    • claude-opus-*deployments.opus (e.g., gpt-4o)
    • claude-sonnet-*deployments.sonnet (e.g., gpt-4o)
    • claude-haiku-*deployments.haiku (e.g., gpt-4o-mini)

Model Router Mode (Azure APIM)

When to use:

  • Azure API Management with routing logic
  • Dynamic model selection
  • Simplified deployment management

How it works:

  • Single deployment endpoint
  • Passes original Claude model name (e.g., claude-sonnet-4) to the router
  • Your APIM policy routes to appropriate backend

How It Works

┌─────────────────┐    ┌──────────────┐    ┌─────────────────┐
│   Claude Code   │───▶│ Local Proxy  │───▶│  Azure OpenAI   │
│                 │    │ (auto port)  │    │                 │
│ ANTHROPIC_BASE  │    │ Translates:  │    │ /chat/complete  │
│ _URL=localhost  │    │ Anthropic→   │    │                 │
│                 │    │ OpenAI       │    │                 │
└─────────────────┘    └──────────────┘    └─────────────────┘

Key Components:

  1. Claude Code - The official Anthropic CLI tool
  2. Local Proxy - Translates API formats in real-time
  3. Azure/OpenAI - Your cloud AI provider

For Anthropic provider, no proxy is used (direct passthrough).

Keeping Up to Date

Stay in sync with upstream Claude Code:

cd ~/Scripts/claude-azure
git fetch upstream
git merge upstream/main
npm install
npm run build

Troubleshooting

| Issue | Solution | |-------|----------| | claude-azure: command not found | Run npm link from project directory | | Claude Code not found | Install from https://claude.ai/code | | Connection errors | Verify endpoint/key in ~/.claude-azure/config.json | | Tool calls failing | Run with --verbose to see proxy request/response logs | | Model not found | Check deployment names match your Azure resource | | Rate limiting | Azure quotas apply - check Azure Portal metrics |

Verbose Logging

claude-azure --verbose

Shows:

  • Proxy startup details
  • Request/response translation
  • Azure API calls
  • Error details

Development

# Clone and install
git clone https://github.com/schwarztim/claude-azure.git
cd claude-azure
npm install

# Watch mode
npm run dev

# Build
npm run build

# Test locally
npm link
claude-azure --setup

Architecture

src/
├── cli.ts           # Main entry point, setup wizard
├── config.ts        # Configuration management
├── proxy.ts         # API translation proxy
└── index.ts         # Exports

dist/                # Compiled JavaScript
~/.claude-azure/     # User configuration
  └── config.json

Contributing

Contributions welcome! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Related Projects

License

MIT License - See LICENSE for details

Azure wrapper code is MIT licensed. Original Claude Code license applies to upstream code.

Acknowledgments

  • Built on top of Claude Code by Anthropic
  • Inspired by the need for Azure OpenAI enterprise deployment support

Made with ❤️ for Azure OpenAI users

Report BugRequest Feature