[FEATURE] Open-source Claude Code under Apache 2.0

Resolved 💬 2 comments Opened Mar 31, 2026 by mits-pl Closed May 6, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Claude Code is locked to Anthropic models. For many teams this is a blocker:

  • Corporate policies require using Azure OpenAI or Google Vertex
  • Some tasks work better with specific models (GPT for certain refactors, Gemini for large context)
  • Local models via Ollama for air-gapped environments
  • Cost management - using cheaper models for simple tasks

What this would look like:

  • Config file for custom endpoints (OpenAI-compatible, Google, custom)
  • Per-task model selection
  • Secure local key storage
  • Fallback chains (try model A, fall back to B)

Prior art:
I've implemented full BYOK in Wove (Apache 2.0 fork of Wave Terminal turned into a dev agent). We support 10 presets (Claude, GPT, Gemini, MiniMax, Ollama, OpenRouter) plus any custom OpenAI-compatible endpoint. Config lives in a simple JSON file. Happy to share the implementation details if useful.

This is the #1 feature that would make Claude Code viable for enterprise teams with multi-vendor AI policies.

Proposed Solution

Add a provider-agnostic model configuration layer.
A JSON config file (e.g. ~/.claude/models.json) where users
define custom endpoints:

{
"my-azure-gpt": {
"provider": "openai-compatible",
"endpoint": "https://my-company.openai.azure.com/v1/chat/completions",
"model": "gpt-4o",
"secret": "AZURE_API_KEY"
},
"local-ollama": {
"provider": "openai-compatible",
"endpoint": "http://localhost:11434/v1/chat/completions",
"model": "qwen3:32b"
}
}

Claude Code already speaks OpenAI-compatible API format internally
(visible in the leaked query engine). The abstraction layer exists -
it just needs to be exposed to users.

Model selection via flag: claude --model my-azure-gpt
Or per-project in .claude/settings.json.

Reference implementation: github.com/mits-pl/wove - full BYOK
with 10 presets + custom endpoints, secure key storage,
auto-hide unconfigured models. Apache 2.0, happy to share
implementation details.

Alternative Solutions

_No response_

Priority

Critical - Blocking my work

Feature Category

CLI commands and flags

Use Case Example

_No response_

Additional Context

_No response_

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗