vibeproxy icon indicating copy to clipboard operation
vibeproxy copied to clipboard

Copilot Claude models (Opus 4.6, Sonnet 4.6, Haiku 4.5) incompatible with Factory CLI due to provider validation

Open zyaiire opened this issue 8 months ago • 1 comments

Problem

Copilot's Claude models (claude-opus-4.6, claude-sonnet-4.6, claude-haiku-4.5) cannot be used with Factory CLI (Droid) through VibeProxy. The root cause is a conflict between Factory's provider validation and VibeProxy's routing.

What happens

Factory CLI enforces strict provider validation: any model name starting with claude- (or containing keywords like sonnet, opus, haiku) must use "provider": "anthropic". Using "provider": "openai" or "provider": "generic-chat-completion-api" results in:

Error: Your custom model "claude-sonnet-4.6" appears to be a Claude/Anthropic model, but is configured with provider "openai". For Claude models (Haiku, Sonnet, Opus), use "provider": "anthropic".

When switching to "provider": "anthropic" with baseUrl: "http://localhost:8317" (without /v1), VibeProxy returns:

502 unknown provider for model claude-sonnet-4.6

Why it happens

  1. Factory side: Claude model names trigger mandatory provider: "anthropic" validation, which sends requests in Anthropic Messages API format
  2. VibeProxy side: Copilot's Claude models are routed through GitHub's API, which uses OpenAI-compatible format. VibeProxy's Anthropic-format endpoint does not recognize Copilot model names

There is no way to configure Factory to send OpenAI-format requests for a model named claude-*, and there is no way to alias the model name in VibeProxy to bypass the check.

Attempted configurations

Config Result
model: "claude-sonnet-4.6", provider: "openai", baseUrl: .../v1 Factory rejects: wrong provider
model: "claude-sonnet-4.6", provider: "anthropic", baseUrl: ... (no /v1) VibeProxy 502: unknown provider
model: "claude-sonnet-4.6", provider: "generic-chat-completion-api", baseUrl: .../v1 Factory rejects: wrong provider
model: "gh-copilot-sonnet-4.6", provider: "openai", baseUrl: .../v1 Factory still detects "sonnet" keyword, rejects
model: "claude-sonnet-4-6" (dash instead of dot), provider: "generic-chat-completion-api" Factory still detects Claude model, rejects

Non-Claude Copilot models work fine

gpt-5.3-codex and gemini-3-pro-preview work without issues with:

{
  "model": "gpt-5.3-codex",
  "baseUrl": "http://localhost:8317/v1",
  "apiKey": "dummy",
  "provider": "openai"
}

Possible solutions

  1. VibeProxy model aliasing: Allow users to define custom model name mappings (e.g., copilot-opus-4.6 → claude-opus-4.6), similar to what is requested in #300
  2. VibeProxy Anthropic endpoint support for Copilot models: Accept Copilot Claude model names on the Anthropic-format endpoint and translate internally
  3. Factory-side fix: Allow overriding provider detection for custom models (unlikely to be prioritized)

Environment

  • Factory CLI: latest
  • VibeProxy: latest
  • macOS: 15.4
  • Connected accounts: GitHub Copilot

Related: #247, #300

zyaiire avatar Mar 28 '26 11:03 zyaiire

Merged via PR #310. This adds alias-based mapping for Copilot Claude custom-model names so Factory validation can use OpenAI provider entries while VibeProxy rewrites to canonical Claude model names before forwarding. Please test on the latest release; if anything still fails, share your exact settings.json entry and we’ll reopen.

ranaroussi avatar Apr 02 '26 09:04 ranaroussi