Skip to content

fix(sessions): accept namespaced compaction model names - #5225

Merged
jbeckwith-oai merged 4 commits into
mainfrom
codex/fix-responses-terminal-errors
Sep 28, 2026
Merged

jbeckwith-oai merged 4 commits into
mainfrom
codex/fix-responses-terminal-errors

Conversation

@jbeckwith-oai

@jbeckwith-oai jbeckwith-oai commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This pull request fixes OpenAIResponsesCompactionSession rejecting gateway-prefixed model names such as openai/openai/gpt-5.6-terra. Validation checks the final slash-separated model-name segment while the original identifier is forwarded unchanged to responses.compact.

The runtime fix is one line. Existing tests cover bare and fine-tuned names, single and nested namespaces, namespaced fine-tuned models, unchanged request forwarding, and rejection of non-OpenAI model families.

Test plan

  • Confirmed the three namespaced regression cases fail before the fix.
  • Confirmed the namespaced fine-tuned regression case fails before correcting parsing order.
  • Focused compaction tests: 94 passed after integrating current main and addressing review feedback.
  • Full format, lint, mypy, pyright, and test verification passed.
  • Independent code review completed on the final integrated diff.
  • Native macOS sandbox tests use the repository's standard Codex skip policy; CI supplies native coverage.

Issue number

Fixes #5214

Checks

  • I've added new tests, if relevant
  • I've run .agents/skills/code-change-verification/scripts/run.sh
  • I've confirmed all verification steps pass
  • I've completed independent code review with Codex before submitting this PR

@jbeckwith-oai
jbeckwith-oai requested review from a team, rm-openai and seratch as code owners September 28, 2026 17:29
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 28, 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
📝 Code Review ✅ Completed 2026-09-28T17:54:17.955533Z 88c0e67 Manual request
🔒 Security Review ✅ Completed 2026-09-28T17:55:17.390272Z 88c0e67 Manual request
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a338a568bc

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/agents/memory/openai_responses_compaction_session.py Outdated

@markstuart-oai markstuart-oai 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.

Reviewed the complete diff at 88c0e672dbc3182dd247fb1de8f78346a6b03fb1; no actionable findings. Namespace removal now precedes fine-tuned model parsing, while the complete original identifier is retained for responses.compact. The parameterized public-boundary tests cover bare, nested, and namespaced fine-tuned models plus rejection of non-OpenAI model families.

Verified all 22 hosted checks passed on this commit. Source review only; I did not run local tests or make live gateway requests.

@jbeckwith-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the current head, 88c0e672dbc3182dd247fb1de8f78346a6b03fb1. The previous summary covers a338a568bc1445d90f6fb98945933d7b6ecb32c8; the follow-up corrects namespace parsing for fine-tuned models and adds regression coverage.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 88c0e672db

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 88c0e672db

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@jbeckwith-oai
jbeckwith-oai merged commit 360d726 into main Sep 28, 2026
22 checks passed
@jbeckwith-oai
jbeckwith-oai deleted the codex/fix-responses-terminal-errors branch September 28, 2026 18:00
@github-actions github-actions Bot mentioned this pull request Sep 28, 2026
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.

OpenAIResponsesCompactionSession: is_openai_model_name() rejects gateway/proxy-namespaced model names (e.g. LiteLLM's <provider>/<model> convention)

2 participants