Skip to content

Align Claude/Codex provider defaults with latest published model IDs#39

Merged
CaddyGlow merged 3 commits intomainfrom
copilot/update-model-for-api-provider
Feb 25, 2026
Merged

Align Claude/Codex provider defaults with latest published model IDs#39
CaddyGlow merged 3 commits intomainfrom
copilot/update-model-for-api-provider

Conversation

Copy link
Contributor

Copilot AI commented Feb 25, 2026

Provider defaults were lagging current Claude and Codex model naming/versioning, which could route requests to stale targets and expose outdated /models entries. This PR updates default model cards and mapping rules to track the latest documented model families and aliases.

  • Claude shared defaults

    • Updated canonical Sonnet/Opus cards to latest IDs:
      • claude-sonnet-4-6
      • claude-opus-4-6
    • Repointed OpenAI-style mappings to latest Claude targets:
      • gpt-4o*, gpt-5*claude-sonnet-4-6
      • o1*, o3-miniclaude-opus-4-6
    • Added direct alias mappings for provider-agnostic requests:
      • sonnetclaude-sonnet-4-6
      • opusclaude-opus-4-6
      • haikuclaude-haiku-4-5-20251001
  • Codex defaults

    • Updated default Codex model cards to current generation:
      • gpt-5.3-codex
      • gpt-5.2-codex
    • Repointed generic Codex routing to latest codex target:
      • gpt-*, o1-*, o3-*, claude-*gpt-5.3-codex
    • Updated explicit gpt-5-codex* mapping to resolve to gpt-5.3-codex.
  • Focused mapping coverage

    • Extended unit tests to assert the new default mapping outcomes for:
      • Claude latest Sonnet/Opus routing
      • Claude alias handling (sonnet, opus)
      • Codex latest target resolution for gpt-5-codex
DEFAULT_CODEX_MODEL_MAPPINGS = [
    ModelMappingRule(match="gpt-5-codex", target="gpt-5.3-codex", kind="prefix"),
    ModelMappingRule(match="gpt-", target="gpt-5.3-codex", kind="prefix"),
]

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • developers.openai.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)
  • platform.claude.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…odels

Co-authored-by: CaddyGlow <219252898+CaddyGlow@users.noreply.github.com>
Copilot AI changed the title [WIP] Update model for latest Codex, Sonnet, and Opus support Update provider default model mappings for latest Codex, Sonnet, and Opus Feb 25, 2026
Copilot AI requested a review from CaddyGlow February 25, 2026 18:28
Co-authored-by: CaddyGlow <219252898+CaddyGlow@users.noreply.github.com>
Copilot AI changed the title Update provider default model mappings for latest Codex, Sonnet, and Opus Align Claude/Codex provider defaults with latest published model IDs Feb 25, 2026
@CaddyGlow CaddyGlow marked this pull request as ready for review February 25, 2026 18:45
Copilot AI review requested due to automatic review settings February 25, 2026 18:45
@CaddyGlow CaddyGlow merged commit 5cbc1ac into main Feb 25, 2026
14 checks passed
@CaddyGlow CaddyGlow deleted the copilot/update-model-for-api-provider branch February 25, 2026 18:46
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the default model cards and model-mapping rules for the Claude shared provider and the Codex provider so that “latest” routing and common aliases resolve to the newest documented model IDs, reducing the chance of requests being routed to stale targets.

Changes:

  • Updated Claude shared default model cards and OpenAI-style mappings to route gpt-4o*/gpt-5*claude-sonnet-4-6 and o1*/o3-miniclaude-opus-4-6, plus added sonnet/opus/haiku aliases.
  • Updated Codex default model cards to gpt-5.3-codex / gpt-5.2-codex and repointed generic routing to gpt-5.3-codex, including an explicit gpt-5-codex* alias.
  • Added unit tests asserting the updated default mapping outcomes for Claude and Codex.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
ccproxy/plugins/claude_shared/model_defaults.py Refreshes Claude model cards and updates mapping rules/aliases to route common client model names to latest Sonnet/Opus IDs.
ccproxy/plugins/codex/model_defaults.py Refreshes Codex model cards and updates mapping rules so generic inputs resolve to the newest Codex target.
tests/unit/utils/test_model_mapper.py Adds unit assertions validating the new Claude/Codex default mapping results.
Comments suppressed due to low confidence (3)

ccproxy/plugins/codex/model_defaults.py:33

  • DEFAULT_CODEX_MODEL_MAPPINGS currently rewrites any gpt-* model (including explicit versioned Codex models like gpt-5.2-codex) to gpt-5.3-codex, because the gpt- prefix rule matches first. This makes it impossible for callers to select gpt-5.2-codex even though it is exposed via DEFAULT_CODEX_MODEL_CARDS. Consider adding explicit passthrough rules for versioned Codex IDs (e.g., exact gpt-5.2-codexgpt-5.2-codex, and optionally gpt-5.3-codex → itself) ahead of the generic gpt- prefix rule, or narrowing the generic match so it doesn't catch gpt-*.?-codex identifiers.
DEFAULT_CODEX_MODEL_MAPPINGS: list[ModelMappingRule] = [
    ModelMappingRule(match="gpt-5-codex", target="gpt-5.3-codex", kind="prefix"),
    ModelMappingRule(match="gpt-", target="gpt-5.3-codex", kind="prefix"),
    ModelMappingRule(match="o3-", target="gpt-5.3-codex", kind="prefix"),
    ModelMappingRule(match="o1-", target="gpt-5.3-codex", kind="prefix"),
    ModelMappingRule(match="claude-", target="gpt-5.3-codex", kind="prefix"),

ccproxy/plugins/codex/model_defaults.py:24

  • This PR removes gpt-5-codex from the Codex provider’s /models cards, but ccproxy/plugins/copilot/model_defaults.py still exposes a gpt-5-codex model card. If the goal is to avoid stale /models entries globally, this remaining card will continue to surface the old identifier; either update it to the new gpt-5.x-codex IDs or confirm (in code/comments) that Copilot’s model list is intentionally independent.
DEFAULT_CODEX_MODEL_CARDS: list[ModelCard] = [
    ModelCard(
        id="gpt-5.3-codex",
        created=1723075200,
        owned_by="openai",
        permission=[],
        root="gpt-5.3-codex",
        parent=None,
    ),
    ModelCard(
        id="gpt-5.2-codex",
        created=1726444800,
        owned_by="openai",
        permission=[],
        root="gpt-5.2-codex",
        parent=None,
    ),

ccproxy/plugins/claude_shared/model_defaults.py:143

  • A new provider-agnostic alias mapping for haiku is added here, but there’s no unit test asserting the expected resolution (unlike sonnet/opus). Add an assertion in the model-mapper unit tests to cover mapper.map("haiku") so this alias doesn’t silently regress.
    ModelMappingRule(match="sonnet", target="claude-sonnet-4-6"),
    ModelMappingRule(match="opus", target="claude-opus-4-6"),
    ModelMappingRule(match="haiku", target="claude-haiku-4-5-20251001"),

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

3 participants