Skip to content

grok-4.5/grok-4.6 wire_api miscategorized as "completions" — 400 not accessible via /chat/completions #60054

Description

@jaroslawgajewski

Summary

grok-4.5 and grok-4.6 are catalogued in pkg/cli/data/models.json (provider github-copilot) with "wire_api": "completions", but the live GitHub Copilot backend rejects requests for these models on the legacy Chat Completions endpoint. Every invocation fails with:

400 model "grok-4.6" is not accessible via the /chat/completions endpoint

This reproduces deterministically (observed 4/4 retries failing identically in a Copilot-engine agent job) whenever a workflow selects grok-4.5 or grok-4.6 as the engine model.

Root cause

In pkg/cli/data/models.jsonproviders.github-copilot.models:

"grok-4.5": { "cost": {...}, "provider_type": "openai", "wire_api": "completions" },
"grok-4.6": { "cost": {...}, "provider_type": "openai", "wire_api": "completions" }

Every other contemporary reasoning/agentic model in the same catalog (gpt-5.5, gpt-5.6-luna, gpt-5.6-sol, gpt-5.6-terra, mai-code-1.1-flash, mai-code-1-flash-picker, gpt-5.2, gpt-5.4*) is catalogued with "wire_api": "responses". Only older/simpler chat models (gemini-2.5-pro, gpt-4.1, kimi-k2.7-code, kimi-k3, raptor-mini) use "completions".

The copilot harness reads this catalog entry to auto-configure COPILOT_PROVIDER_WIRE_API before invoking the Copilot CLI:

[copilot-harness] auto-configuring COPILOT_PROVIDER_WIRE_API=completions for model grok-4.6
[copilot-harness] inference routing: mode=cli configuredModel="grok-4.6" endpoint=managed-by-copilot-cli
400 model "grok-4.6" is not accessible via the /chat/completions endpoint

Since the live backend only serves grok-4.5/4.6 via the Responses API (consistent with every other current-generation reasoning-capable model in the same catalog), the wire_api value for these two entries appears to be stale/incorrect — likely inherited from an earlier grok generation that was completions-only, and not updated when the model was migrated.

Note: the automated [model-inventory] bot (e.g. #59825) cross-checks pricing for grok-4.5/grok-4.6 against Copilot SDK/reflect sources and finds no discrepancy, but it does not appear to validate wire_api/endpoint compatibility, so this drift isn't caught by that audit.

Proposed fix

Update the two entries in pkg/cli/data/models.json (and its mirror actions/setup/js/models.json, per the existing "remain identical mirrors" invariant noted in #59825) to:

"grok-4.5": { "cost": {...}, "provider_type": "openai", "wire_api": "responses" },
"grok-4.6": { "cost": {...}, "provider_type": "openai", "wire_api": "responses" }

(Costs unchanged — only wire_api needs correcting.) Ideally the model-inventory automation would also gain a check that flags wire_api mismatches the same way it already flags pricing discrepancies, so this class of drift doesn't require a live-run failure to surface.

Repro

Any workflow using the Copilot engine with model: grok-4.6 (or grok-4.5) fails at the Execute GitHub Copilot CLI step with the 400 above, on every retry, with no other configuration changes.

Activity

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions