Skip to content

Validate thread providers before resume and input - #57840

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/051f97c3815c547d8411c71b770df30eae969f68
Oct 28, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/051f97c3815c547d8411c71b770df30eae969f68

Conversation

@copyberry

@copyberry copyberry Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Validate thread providers before resume and input

Why

Existing chats retain their provider configuration when the selected provider changes. Reject resume and input until the configured provider matches the chat, while keeping history readable and allowing recovery after configuration is restored.

What changed

  • Validate saved providers before applying resume overrides, preserving the provider when only model or reasoning settings change.
  • Check the current provider selection, including profiles and launch overrides, before accepting input. Reject input when configuration cannot be loaded.
  • Return structured ModelProviderError data for provider mismatches, missing definitions, and policy conflicts, with generated JSON Schema, TypeScript, and Python types.

Testing

Add coverage for override bypass prevention, provider restoration, readable history after rejection, and blocked requests sending no inference traffic. Verify schema fields and Python round trips match the error wire format.

## Why

Existing chats retain their provider configuration when the selected provider changes. Reject resume and input until the configured provider matches the chat, while keeping history readable and allowing recovery after configuration is restored.

## What changed

- Validate saved providers before applying resume overrides, preserving the provider when only model or reasoning settings change.
- Check the current provider selection, including profiles and launch overrides, before accepting input. Reject input when configuration cannot be loaded.
- Return structured `ModelProviderError` data for provider mismatches, missing definitions, and policy conflicts, with generated JSON Schema, TypeScript, and Python types.

## Testing

Add coverage for override bypass prevention, provider restoration, readable history after rejection, and blocked requests sending no inference traffic. Verify schema fields and Python round trips match the error wire format.

GitOrigin-RevId: 051f97c3815c547d8411c71b770df30eae969f68
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/051f97c3815c547d8411c71b770df30eae969f68 branch from aaf50a8 to 7ce5fa7 Compare October 28, 2026 21:33
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-28T21:33:16.604771Z aaf50a8 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.

@copyberry
copyberry Bot merged commit 7ce5fa7 into main Oct 28, 2026
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/051f97c3815c547d8411c71b770df30eae969f68 branch October 28, 2026 21:33
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants