Skip to content

Allow injecting the models manager into ThreadManager - #32911

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/8bb646054ecec4ccb865b2bf56249384916ea9db
Jul 14, 2026
Merged

Allow injecting the models manager into ThreadManager#32911
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/8bb646054ecec4ccb865b2bf56249384916ea9db

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 14, 2026

Copy link
Copy Markdown

Allow injecting the models manager into ThreadManager

Why

Embedding callers need to control whether model catalogs are persisted to disk.

What changed

  • Accept a shared models manager when constructing ThreadManager instead of always creating a cached manager internally.
  • Add provider APIs for creating uncached model managers. OpenAI-compatible providers fetch on each OnlineIfUncached refresh without reading or writing models_cache.json.
  • Keep existing app server, MCP server, sample, and test callers on the standard cached manager.

Testing

  • Verify an uncached manager fetches on every refresh.
  • Verify an injected uncached manager controls thread refresh behavior and does not create models_cache.json.

## Why

Embedding callers need to control whether model catalogs are persisted to disk.

## What changed

- Accept a shared models manager when constructing `ThreadManager` instead of always creating a cached manager internally.
- Add provider APIs for creating uncached model managers. OpenAI-compatible providers fetch on each `OnlineIfUncached` refresh without reading or writing `models_cache.json`.
- Keep existing app server, MCP server, sample, and test callers on the standard cached manager.

## Testing

- Verify an uncached manager fetches on every refresh.
- Verify an injected uncached manager controls thread refresh behavior and does not create `models_cache.json`.

GitOrigin-RevId: 8bb646054ecec4ccb865b2bf56249384916ea9db
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/8bb646054ecec4ccb865b2bf56249384916ea9db branch from 63ed84e to 80c6cd3 Compare July 14, 2026 01:07
@copyberry
copyberry Bot merged commit 80c6cd3 into main Jul 14, 2026
14 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/8bb646054ecec4ccb865b2bf56249384916ea9db branch July 14, 2026 01:08
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 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.

10 participants