Lightweight coding agent that runs in your terminal
Rust
//! Fixtures for integration tests that seed provider credentials and model caches.
use codex_login::CodexAuth;
use codex_model_provider_info::ModelProviderInfo;
use codex_models_manager::cache::ModelsCacheEntry;
use codex_protocol::openai_models::ModelInfo;
/// Constructs a cache fixture matching the supplied test provider and authentication.
pub fn models_cache_entry(
provider_info: &ModelProviderInfo,
auth: Option<&CodexAuth>,
models: Vec<ModelInfo>,
) -> ModelsCacheEntry {
ModelsCacheEntry {
fetched_at: std::time::SystemTime::now().into(),
etag: None,
client_version: Some(codex_models_manager::client_version_to_whole()),
identity: crate::models_identity::identity(provider_info, auth).ok(),
models,
}
}
pub use crate::shared_state::test_support::seed_gateway_auth;