Skip to content

Use thread-scoped model catalogs for model lookups - #61421

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/c86081b9e55c5e2b42a7f082966485d7fb5139d4
Nov 14, 2026
Merged

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

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Use thread-scoped model catalogs for model lookups

Why

Model lookups through the startup catalog can use the wrong provider's capabilities or instructions after a default provider switch or when a thread has its own catalog.

What changed

  • Resolve model metadata for sampling, prediction forks, and memory writes through the owning thread's catalog.
  • Make the thread's models manager available to extensions before startup callbacks and use it for guardian sampler configuration.
  • Import external sessions using the destination provider and originator's catalog, loading its offline cache only when no refreshed catalog is available.

Testing

Add regression coverage for sampling after a default provider switch, parent-specific prediction fork capabilities, thread-scoped model lookups, and imported sessions retaining destination provider instructions and originator.

## Why

Model lookups through the startup catalog can use the wrong provider's capabilities or instructions after a default provider switch or when a thread has its own catalog.

## What changed

- Resolve model metadata for sampling, prediction forks, and memory writes through the owning thread's catalog.
- Make the thread's models manager available to extensions before startup callbacks and use it for guardian sampler configuration.
- Import external sessions using the destination provider and originator's catalog, loading its offline cache only when no refreshed catalog is available.

## Testing

Add regression coverage for sampling after a default provider switch, parent-specific prediction fork capabilities, thread-scoped model lookups, and imported sessions retaining destination provider instructions and originator.

GitOrigin-RevId: c86081b9e55c5e2b42a7f082966485d7fb5139d4
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/c86081b9e55c5e2b42a7f082966485d7fb5139d4 branch from f7b2476 to 4598f33 Compare November 14, 2026 00:32
@copyberry
copyberry Bot merged commit 4598f33 into main Nov 14, 2026
9 of 24 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/c86081b9e55c5e2b42a7f082966485d7fb5139d4 branch November 14, 2026 00:32
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor
Codex Review Summary: 🔄 Running

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

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-11-14T00:32:39.612540Z 4598f33 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.

@github-actions github-actions Bot locked and limited conversation to collaborators Nov 14, 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.

1 participant