Align Claude/Codex provider defaults with latest published model IDs#39
Merged
Align Claude/Codex provider defaults with latest published model IDs#39
Conversation
…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
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
There was a problem hiding this comment.
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-6ando1*/o3-mini→claude-opus-4-6, plus addedsonnet/opus/haikualiases. - Updated Codex default model cards to
gpt-5.3-codex/gpt-5.2-codexand repointed generic routing togpt-5.3-codex, including an explicitgpt-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_MAPPINGScurrently rewrites anygpt-*model (including explicit versioned Codex models likegpt-5.2-codex) togpt-5.3-codex, because thegpt-prefix rule matches first. This makes it impossible for callers to selectgpt-5.2-codexeven though it is exposed viaDEFAULT_CODEX_MODEL_CARDS. Consider adding explicit passthrough rules for versioned Codex IDs (e.g., exactgpt-5.2-codex→gpt-5.2-codex, and optionallygpt-5.3-codex→ itself) ahead of the genericgpt-prefix rule, or narrowing the generic match so it doesn't catchgpt-*.?-codexidentifiers.
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-codexfrom the Codex provider’s/modelscards, butccproxy/plugins/copilot/model_defaults.pystill exposes agpt-5-codexmodel card. If the goal is to avoid stale/modelsentries globally, this remaining card will continue to surface the old identifier; either update it to the newgpt-5.x-codexIDs 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
haikuis added here, but there’s no unit test asserting the expected resolution (unlikesonnet/opus). Add an assertion in the model-mapper unit tests to covermapper.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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Provider defaults were lagging current Claude and Codex model naming/versioning, which could route requests to stale targets and expose outdated
/modelsentries. This PR updates default model cards and mapping rules to track the latest documented model families and aliases.Claude shared defaults
claude-sonnet-4-6claude-opus-4-6gpt-4o*,gpt-5*→claude-sonnet-4-6o1*,o3-mini→claude-opus-4-6sonnet→claude-sonnet-4-6opus→claude-opus-4-6haiku→claude-haiku-4-5-20251001Codex defaults
gpt-5.3-codexgpt-5.2-codexgpt-*,o1-*,o3-*,claude-*→gpt-5.3-codexgpt-5-codex*mapping to resolve togpt-5.3-codex.Focused mapping coverage
sonnet,opus)gpt-5-codexWarning
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/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/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.