mirror of
https://github.com/openai/codex.git
synced 2026-11-15 21:50:46 +00:00
Use thread-scoped model catalogs for model lookups (#61421)
## 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
This commit is contained in:
@@ -1107,6 +1107,8 @@ impl ThreadManager {
|
||||
Arc::clone(&self.state.git_root_discovery)
|
||||
}
|
||||
|
||||
/// Returns the startup catalog. Use [`CodexThread::model_info`] for a live chat or
|
||||
/// [`Self::models_manager_for_config`] for a new destination.
|
||||
pub fn get_models_manager(&self) -> SharedModelsManager {
|
||||
self.state.model_catalog.manager.clone()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user