Skip to content

Claude engine on Copilot inference sends Anthropic's model id, which Copilot refuses ("The requested model is not supported") #73074

Done

Description

@kdowswell

Summary

With engine: claude, engine.model-provider: github and permissions: copilot-requests: write, a run configured with model: claude-opus-5-5, the id reference/engines/claude.md says works through modelOverrides, fails before any inference: 400 {"error":{"code":"model_not_supported","param":"model"}}. Claude Code's debug log shows the reason:

[DEBUG] [API:timing] dispatching to firstParty model=claude-opus-5-5
[ERROR] API error (attempt 1/1): 400 ... "The requested model is not supported."

Claude Code treats the AWF Copilot proxy as a first-party Anthropic endpoint and does not apply modelOverrides there. So the hyphenated Anthropic id reaches Copilot unmapped. The same run with the Copilot id (claude-opus-5.5) gets past model validation. This failed with gh-aw's own --settings {"modelOverrides":...}, and no custom engine.args.

Root cause

  • actions/setup/js/model_fallback.cjs:115 normalizeClaudeModel removes a copilot/ prefix but never maps claude-<family>-<major>-<minor> to Copilot's claude-<family>-<major>.<minor>.
  • buildClaudeChildEnv (actions/setup/js/claude_harness.cjs) then sets ANTHROPIC_MODEL to the unmapped id; the harness logs resolved=claude-opus-5-5 provider=copilot status=exact.
  • The compiler builds the mapping table in pkg/workflow/claude_copilot_model_overrides.go, but it only reaches Claude Code as modelOverrides, which isn't applied on this route.

Implementation plan

  1. In actions/setup/js/model_fallback.cjs normalizeClaudeModel, when the provider is GitHub (REFLECT_PROVIDER_ALIASES.github), map a hyphenated Anthropic id to its dotted Copilot id. Reuse the same id list as claude_copilot_model_overrides.go, generated or embedded, so the two can't drift; fall back to the regex ^(claude-[a-z]+-\d+)-(\d+)$ → $1.$2.
  2. Apply the same mapping to the detection run's model (claudeDetectionSettings path).
  3. Tests in actions/setup/js/model_fallback.test.cjs:
    • claude-opus-5-5 with provider github → claude-opus-5.5;
    • unchanged for provider anthropic;
    • copilot/claude-opus-5.5 and claude-sonnet-5 unchanged.
  4. Docs, reference/engines/claude.md: say the harness maps Anthropic ids for Copilot inference, rather than relying on modelOverrides.

Acceptance criteria

A Claude-engine workflow on GitHub Copilot inference with model: claude-opus-5-5, or a dynamic expression that resolves to it, sends claude-opus-5.5 to Copilot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions