mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
These made their way into the codebase in https://github.com/openai/codex/pull/16508 because I haven't managed to get https://github.com/openai/codex/pull/16450 working yet.
46 lines
1.3 KiB
Rust
46 lines
1.3 KiB
Rust
use super::*;
|
|
use crate::ModelsManagerConfig;
|
|
use pretty_assertions::assert_eq;
|
|
|
|
#[test]
|
|
fn reasoning_summaries_override_true_enables_support() {
|
|
let model = model_info_from_slug("unknown-model");
|
|
let config = ModelsManagerConfig {
|
|
model_supports_reasoning_summaries: Some(true),
|
|
..Default::default()
|
|
};
|
|
|
|
let updated = with_config_overrides(model.clone(), &config);
|
|
let mut expected = model;
|
|
expected.supports_reasoning_summaries = true;
|
|
|
|
assert_eq!(updated, expected);
|
|
}
|
|
|
|
#[test]
|
|
fn reasoning_summaries_override_false_does_not_disable_support() {
|
|
let mut model = model_info_from_slug("unknown-model");
|
|
model.supports_reasoning_summaries = true;
|
|
let config = ModelsManagerConfig {
|
|
model_supports_reasoning_summaries: Some(false),
|
|
..Default::default()
|
|
};
|
|
|
|
let updated = with_config_overrides(model.clone(), &config);
|
|
|
|
assert_eq!(updated, model);
|
|
}
|
|
|
|
#[test]
|
|
fn reasoning_summaries_override_false_is_noop_when_model_is_false() {
|
|
let model = model_info_from_slug("unknown-model");
|
|
let config = ModelsManagerConfig {
|
|
model_supports_reasoning_summaries: Some(false),
|
|
..Default::default()
|
|
};
|
|
|
|
let updated = with_config_overrides(model.clone(), &config);
|
|
|
|
assert_eq!(updated, model);
|
|
}
|