Skip to content

Preserve compatibility when loading model catalogs without legacy instructions - #809

Merged
GraciousGazelles merged 18 commits into
mainfrom
fix/model-catalog-compatibility-proof
Sep 8, 2026
Merged

GraciousGazelles merged 18 commits into
mainfrom
fix/model-catalog-compatibility-proof

Conversation

@GraciousGazelles

@GraciousGazelles GraciousGazelles commented Sep 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • accept current model catalog payloads that provide model_messages.instructions_template without base_instructions
  • retain legacy-only catalogs as a compatibility fallback and reject entries with neither usable source
  • preserve overlay/cache composition and add focused hosted validation for the catalog compatibility path
  • keep the focused validation lane explicit-only so it is manually invokable without widening automatic PR/frontier coverage
  • update only the planner fixtures causally affected by the explicit lane

Scope

This successor PR is intentionally isolated from PR #793 after its branch advanced to unrelated remote candidate 3c7007e5d7e040032359fac495fc001d4dd32d47. The current implementation candidate is frozen at 6793b5a5d9c434e60ee084b3db4dd953d2ca6114, based on ff11ada689bc6d449f2dcbfae15ccfac91c83466.

The original compatibility/proof slice changed six paths. The causal routing/planner repair adds exactly two paths:

  • .github/workflows/sedna-heavy-tests.yml — expose the focused lane as a manual choice
  • .github/scripts/test_ci_planners.py — update the three assertions directly affected by that explicit lane

The existing .github/validation-lanes.json path is part of the original six and now marks the lane explicit_only.

Full changed paths are exactly:

  • .github/blob-size-allowlist.txt
  • .github/scripts/test_ci_planners.py
  • .github/validation-lanes.json
  • .github/workflows/sedna-heavy-tests.yml
  • codex-rs/models-manager/models.json
  • codex-rs/models-manager/src/cache.rs
  • codex-rs/protocol/src/openai_models.rs
  • justfile

summary.md is intentionally excluded. No force-push or merge of the foreign PR branch was performed.

Compatibility precedence

When both fields are present, get_model_instructions consumes the canonical model_messages.instructions_template first. The legacy base_instructions field is preserved for downstream overlay/config consumers; it is only populated from the template when the legacy field is absent. The adjacent regression test asserts both properties.

Validation

The focused hosted lane is codex.model-catalog-compat-targeted, invoking just model-catalog-compat-targeted. The lane is explicit-only and is not selected by automatic frontier/PR coverage.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-09-07T07:15:37.121288Z 46f20e2 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a custom deserializer, deserialize_model_infos_with_legacy_base, to support model catalogs that omit the legacy base_instructions field by falling back to model_messages.instructions_template. It also adds a targeted validation lane and corresponding tests. The review feedback correctly points out a discrepancy between the documented behavior and the implementation: the deserializer currently prioritizes the legacy base instructions over the canonical template when both are present. The reviewer suggests reversing this priority in the deserialization logic and updating the associated test assertion accordingly.

Comment thread codex-rs/protocol/src/openai_models.rs Resolved
Comment thread codex-rs/protocol/src/openai_models.rs Resolved
@GraciousGazelles
GraciousGazelles added this pull request to the merge queue Sep 8, 2026
Merged via the queue into main with commit f23b394 Sep 8, 2026
152 of 155 checks passed
@GraciousGazelles
GraciousGazelles deleted the fix/model-catalog-compatibility-proof branch September 8, 2026 10:09
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.

1 participant