feat: fix configuration, add CLI and multi-model support#9
Merged
Conversation
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
There was a problem hiding this comment.
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
--helpand--versionsupport - 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
1. Fix Claude Code Configuration (Breaking)
claude config set api_base_urlwith proper environment variable configuration.claude/settings.local.json) and global (~/.claude/settings.json) config2. Add CLI for Easy Installation
bin/claudecode-copilot-proxy.jsCLI entry pointnpm install -g claudecode-copilot-proxy--helpand--versionflags3. Multi-Model Support
Models Supported
ANTHROPIC_MODELANTHROPIC_DEFAULT_HAIKU_MODELTesting