Skip to content

OpenCodex GitHub Copilot Model Endpoint Mapping #748

Description

@mushikingh

Summary

OpenCodex configured the GitHub Copilot provider with the provider-wide openai-chat adapter. That works for most Copilot models, but several newer OpenAI models require the OpenAI Responses API instead of Chat Completions.

The affected models failed with errors such as:

model "gpt-5.6-sol" is not accessible via the /chat/completions endpoint

gpt-5.4 exposed a subtler version of the same issue. A minimal text-only Chat Completions request succeeded, but a real Codex request failed because Codex supplies function tools and a reasoning effort:

Function tools with reasoning_effort are not supported for gpt-5.4 in
/v1/chat/completions. To use function tools, use /v1/responses or set
reasoning_effort to 'none'.

The fix is a per-model modelAdapters map on the github-copilot provider. This keeps the provider default as openai-chat while routing the incompatible models through openai-responses.

Separate Selector Issue

Bare OpenAI model names are reserved by OpenCodex for its canonical openai provider. Therefore this selector does not mean GitHub Copilot:

gpt-5.6-sol

When the canonical OpenAI provider is absent, it fails with:

Model gpt-5.6-sol requires the canonical openai provider

The Copilot-qualified selector must be used:

github-copilot/gpt-5.6-sol

Example:

codex -m github-copilot/gpt-5.6-sol \
  -c 'model_reasoning_effort="medium"'

Applied Configuration

The effective configuration is stored in ~/.opencodex/config.json under providers.github-copilot.modelAdapters.

{
  "modelAdapters": {
    "claude-haiku-4.5": "openai-chat",
    "claude-opus-4.5": "openai-chat",
    "claude-opus-4.6": "openai-chat",
    "claude-opus-4.7": "openai-chat",
    "claude-opus-4.8": "openai-chat",
    "claude-sonnet-4.5": "openai-chat",
    "claude-sonnet-4.6": "openai-chat",
    "claude-sonnet-5": "openai-chat",
    "gemini-2.5-pro": "openai-chat",
    "gemini-3-flash-preview": "openai-chat",
    "gemini-3.1-pro-preview": "openai-chat",
    "gpt-3.5-turbo": "openai-chat",
    "gpt-3.5-turbo-0613": "openai-chat",
    "gpt-4": "openai-chat",
    "gpt-4-0125-preview": "openai-chat",
    "gpt-4-0613": "openai-chat",
    "gpt-4-o-preview": "openai-chat",
    "gpt-4.1": "openai-chat",
    "gpt-4.1-2025-04-14": "openai-chat",
    "gpt-4o": "openai-chat",
    "gpt-4o-2024-05-13": "openai-chat",
    "gpt-4o-2024-08-06": "openai-chat",
    "gpt-4o-2024-11-20": "openai-chat",
    "gpt-4o-mini": "openai-chat",
    "gpt-4o-mini-2024-07-18": "openai-chat",
    "gpt-5-mini": "openai-chat",
    "gpt-5.3-codex": "openai-responses",
    "gpt-5.4": "openai-responses",
    "gpt-5.4-mini": "openai-responses",
    "gpt-5.5": "openai-responses",
    "gpt-5.6-luna": "openai-responses",
    "gpt-5.6-sol": "openai-responses",
    "gpt-5.6-terra": "openai-responses"
  }
}

Complete Live Model Map

The live Copilot catalog contained 37 entries when tested.

Responses API

These models require openai-responses for Codex-agent use:

Model
gpt-5.3-codex
gpt-5.4
gpt-5.4-mini
gpt-5.5
gpt-5.6-luna
gpt-5.6-sol
gpt-5.6-terra

Chat Completions API

These models were verified with openai-chat:

Family Models
Claude claude-haiku-4.5, claude-opus-4.5, claude-opus-4.6, claude-opus-4.7, claude-opus-4.8, claude-sonnet-4.5, claude-sonnet-4.6, claude-sonnet-5
Gemini gemini-2.5-pro, gemini-3-flash-preview, gemini-3.1-pro-preview
GPT-3.5 gpt-3.5-turbo, gpt-3.5-turbo-0613
GPT-4 gpt-4, gpt-4-0125-preview, gpt-4-0613, gpt-4-o-preview, gpt-4.1, gpt-4.1-2025-04-14, gpt-4o, gpt-4o-2024-05-13, gpt-4o-2024-08-06, gpt-4o-2024-11-20, gpt-4o-mini, gpt-4o-mini-2024-07-18
GPT-5 gpt-5-mini

Non-Chat or Internal Entries

These entries were discovered but were not assigned a conversation adapter because they are not normal chat models:

Model Purpose
text-embedding-3-small Embeddings
text-embedding-3-small-inference Embeddings
text-embedding-ada-002 Embeddings
trajectory-compaction Internal Copilot operation

Verification Performed

Environment:

Component Version/state
OpenCodex 2.7.43
Codex CLI 0.145.0
Copilot OAuth Logged in and provider test connected
Copilot live catalog 37 models
Proxy Healthy on http://127.0.0.1:10100

Checks performed:

  1. ocx provider test github-copilot connected and reported 37 available models.
  2. Every one of the 33 generative/chat models returned a successful minimal response through POST /v1/responses after routing through OpenCodex.
  3. Real codex exec requests were used to validate tool-bearing Codex traffic, not only minimal text requests.
  4. gpt-5.4 was specifically shown to require Responses when function tools and model_reasoning_effort="medium" are present.
  5. The following representative real Codex runs succeeded after the final mapping:
github-copilot/gpt-5.6-sol          medium  OK
github-copilot/gpt-5.5              medium  OK
github-copilot/gpt-5.4              medium  OK
github-copilot/gpt-5.4-mini         medium  OK
github-copilot/gpt-5.3-codex        medium  OK
github-copilot/gpt-5-mini           medium  OK
github-copilot/claude-sonnet-5      medium  OK
github-copilot/gemini-3.1-pro-preview medium OK
  1. Before the override, the Responses-only models returned unsupported_api_for_model or the function-tools/reasoning incompatibility error through Chat Completions.
  2. After the override, OpenCodex logs reported HTTP 200 and the expected resolved model for the tested Responses models.

Assessment

This appears to be an OpenCodex GitHub Copilot preset/discovery gap. Copilot exposes a mixed-wire model catalog, but OpenCodex's preset defaults the entire provider to openai-chat and does not currently derive per-model wire requirements from live discovery. OpenCodex supports the necessary fix through modelAdapters; the missing part is an accurate built-in mapping or automatic discovery of each model's required API.

The mapping should be rechecked when Copilot adds or changes models. A model appearing in GET /models does not prove it works through /chat/completions, and a minimal text-only success does not prove compatibility with Codex function tools and reasoning fields.

Activity

  1. github-actions commented on Jul 30, 2026

    @github-actions
    Contributor

    Automated translation bookkeeping — detected language: English.

  2. github-actions commented on Jul 30, 2026

    @github-actions
    Contributor

    Issue closed: insufficient detail

    Thanks for taking the time to submit this issue. It was closed automatically because the structured report is missing information needed to evaluate or reproduce it.

    • Reproduction is empty.

    Please edit the issue to add:

    • List the exact steps to reproduce the problem.

    See the Contributing guide for details.

    Once the report passes the automated checks, it will be reopened automatically unless a maintainer has changed its state.

  3. changed the title [-]dfgdg[/-] [+]OpenCodex GitHub Copilot Model Endpoint Mapping[/+] on Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions