Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion codex-rs/common/src/model_presets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ pub fn builtin_model_presets(auth_mode: Option<AuthMode>) -> Vec<ModelPreset> {
Some(AuthMode::ApiKey) => PRESETS
.iter()
.copied()
.filter(|p| !p.model.contains(SWIFTFOX_MEDIUM_MODEL))
.filter(|p| p.model != SWIFTFOX_MEDIUM_MODEL)
.collect(),
_ => PRESETS.to_vec(),
}
Expand Down
10 changes: 9 additions & 1 deletion codex-rs/core/src/internal_storage.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use anyhow::Context;
use serde::Deserialize;
use serde::Serialize;
use std::io::ErrorKind;
use std::path::Path;
use std::path::PathBuf;

Expand Down Expand Up @@ -31,7 +32,14 @@ impl InternalStorage {
}
},
Err(error) => {
tracing::warn!("failed to read internal storage: {error:?}");
if error.kind() == ErrorKind::NotFound {
tracing::debug!(
"internal storage not found at {}; initializing defaults",
storage_path.display()
);
} else {
tracing::warn!("failed to read internal storage: {error:?}");
}
Self::empty(storage_path)
}
}
Expand Down
19 changes: 0 additions & 19 deletions codex-rs/tui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -527,13 +527,8 @@ fn should_show_model_rollout_prompt(
swiftfox_model_prompt_seen: bool,
) -> bool {
let login_status = get_login_status(config);
// TODO(jif) drop.
let debug_high_enabled = std::env::var("DEBUG_HIGH")
.map(|v| v.eq_ignore_ascii_case("1"))
.unwrap_or(false);

active_profile.is_none()
&& debug_high_enabled
&& cli.model.is_none()
&& !swiftfox_model_prompt_seen
&& config.model_provider.requires_openai_auth
Expand All @@ -551,21 +546,7 @@ mod tests {
use codex_core::auth::write_auth_json;
use codex_core::token_data::IdTokenInfo;
use codex_core::token_data::TokenData;
use std::sync::Once;

fn enable_debug_high_env() {
static DEBUG_HIGH_ONCE: Once = Once::new();
DEBUG_HIGH_ONCE.call_once(|| {
// SAFETY: Tests run in a controlled environment and require this env variable to
// opt into the GPT-5 High rollout prompt gating. We only set it once.
unsafe {
std::env::set_var("DEBUG_HIGH", "1");
}
});
}

fn make_config() -> Config {
enable_debug_high_env();
// Create a unique CODEX_HOME per test to isolate auth.json writes.
let mut codex_home = std::env::temp_dir();
let unique_suffix = format!(
Expand Down
Loading