Skip to content

fix: add haiku model name translation#224

Open
weiliu2dev wants to merge 1 commit intoericc-ch:masterfrom
weiliu2dev:fix/haiku-model-name-translation
Open

fix: add haiku model name translation#224
weiliu2dev wants to merge 1 commit intoericc-ch:masterfrom
weiliu2dev:fix/haiku-model-name-translation

Conversation

@weiliu2dev
Copy link
Copy Markdown

Summary

Fix translateModelName to handle Claude Haiku model variants (e.g. claude-haiku-4-5-20251001) that are not recognized by the
GitHub Copilot API.

Problem

When using Claude Code with copilot-api as a proxy, Claude Code's internal subagent calls (e.g. for codebase exploration) use the
model ID claude-haiku-4-5-20251001. This model name is sent as-is to the GitHub Copilot API, which only recognizes
claude-haiku-4.5, resulting in a 400 error:

{ message: 'The requested model is not supported.',
code: 'model_not_supported',
param: 'model',
type: 'invalid_request_error' }

The existing translateModelName function already handles claude-sonnet-4-* and claude-opus-4-* variants, but misses
claude-haiku-*.

Fix

Add a mapping for claude-haiku-4-5* / claude-haiku-4.5*claude-haiku-4.5 in translateModelName.

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.

1 participant