Skip to content

feat: fix configuration, add CLI and multi-model support#9

Merged
shyamsridhar123 merged 5 commits into
shyamsridhar123:mainfrom
datorresb:fix/proxy
Jan 14, 2026
Merged

feat: fix configuration, add CLI and multi-model support#9
shyamsridhar123 merged 5 commits into
shyamsridhar123:mainfrom
datorresb:fix/proxy

Conversation

@datorresb
Copy link
Copy Markdown

@datorresb datorresb commented Jan 13, 2026

Changes

1. Fix Claude Code Configuration (Breaking)

  • Replace incorrect claude config set api_base_url with proper environment variable configuration
  • Add instructions for both project-specific (.claude/settings.local.json) and global (~/.claude/settings.json) config

2. Add CLI for Easy Installation

  • Add bin/claudecode-copilot-proxy.js CLI entry point
  • Users can now install globally: npm install -g claudecode-copilot-proxy
  • Support --help and --version flags

3. Multi-Model Support

  • Simplify model mappings to use prefix matching (no date suffix needed)
  • Add support for GPT 5.2 and Gemini 3 Pro Preview models
  • Pass non-Claude models directly to Copilot API

Models Supported

Default Model Setting to Override Example Override
claude-opus-4.5 ANTHROPIC_MODEL gpt-5.2
claude-haiku-4.5 ANTHROPIC_DEFAULT_HAIKU_MODEL gemini-3-pro-preview

Testing

  • Verified Claude models work with simplified prefix mapping
  • Verified GPT 5.2 and Gemini 3 Pro work as pass-through

David Torres added 5 commits January 13, 2026 20:57
Replace incorrect 'claude config set api_base_url' command with proper
environment variable configuration in settings.json files.

- Add Option A: project-specific config (.claude/settings.local.json)
- Add Option B: global config (~/.claude/settings.json)
- Include all required env vars (ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, etc.)
- Simplify steps from 6 to 4
- Add bin/claudecode-copilot-proxy.js CLI entry point
- Add 'bin' and 'files' fields to package.json
- Rename package to 'claudecode-copilot-proxy' for npm
- Update README with quick install option
- Support --help and --version flags

Now users can install globally without cloning:
  npm install -g claudecode-copilot-proxy
  claudecode-copilot-proxy
- Add support for GPT 5.2 and Gemini 3 Pro Preview models
- Simplify Claude model mappings to use prefix matching (no date suffix needed)
- Pass non-Claude models directly to Copilot API
- Update README with optional model configuration
- Add debug logging for model mapping

Models now supported:
- Claude: opus-4.5, sonnet-4.5, haiku-4.5 (default)
- Optional: gpt-5.2, gemini-3-pro-preview
- Changed success message to include Claude Code alongside Cursor IDE
- Added Claude Code Setup section with settings.local.json configuration example
- Shows users how to configure environment variables for Claude Code
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the proxy server to support multiple models and improves configuration for Claude Code. The changes fix incorrect configuration instructions, add a CLI for easier installation, and enable pass-through support for non-Claude models like GPT and Gemini.

Changes:

  • Fixed Claude Code configuration to use proper environment variables instead of invalid CLI commands
  • Added CLI entry point for global npm installation with --help and --version support
  • Simplified model mapping to use prefix matching and added pass-through for GPT 5.2 and Gemini 3 Pro Preview

Reviewed changes

Copilot reviewed 6 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/utils/model-mapper.ts Updated to support pass-through for non-Claude models and simplified mapping logic
src/services/anthropic-service.ts Added logging for model mapping
src/public/auth.html Updated setup instructions to include Claude Code configuration and formatting improvements
src/config/index.ts Simplified model mappings to use prefix matching and added GPT/Gemini model definitions
package.json Added CLI bin entry and updated package metadata
README.md Replaced invalid CLI configuration with proper environment variable setup and added multi-model documentation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@shyamsridhar123 shyamsridhar123 merged commit e42308e into shyamsridhar123:main Jan 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants