Skip to content

Commit 16f2d07

Browse files
authored
Merge pull request #156 from cbusillo/fix/retired-model-test-expectations
Fix retired model test expectations
2 parents d83480b + 13fae39 commit 16f2d07

4 files changed

Lines changed: 11 additions & 39 deletions

File tree

code-rs/core/src/config.rs

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3833,30 +3833,6 @@ context_mode = "1m"
38333833
Ok(())
38343834
}
38353835

3836-
#[test]
3837-
fn context_mode_one_m_is_inert_for_unsupported_models() -> anyhow::Result<()> {
3838-
let code_home = TempDir::new()?;
3839-
let cfg = toml::from_str::<ConfigToml>(
3840-
r#"
3841-
model = "gpt-5.4"
3842-
context_mode = "1m"
3843-
"#,
3844-
)?;
3845-
let config = Config::load_from_base_config_with_overrides(
3846-
cfg,
3847-
ConfigOverrides {
3848-
cwd: Some(code_home.path().to_path_buf()),
3849-
..Default::default()
3850-
},
3851-
code_home.path().to_path_buf(),
3852-
)?;
3853-
3854-
assert_eq!(config.context_mode, Some(ContextMode::OneM));
3855-
assert_eq!(config.model_context_window, Some(272_000));
3856-
assert_eq!(config.model_auto_compact_token_limit, Some(244_800));
3857-
Ok(())
3858-
}
3859-
38603836
#[test]
38613837
fn context_mode_auto_preserves_gpt_5_5_manifest_limits() -> anyhow::Result<()> {
38623838
let code_home = TempDir::new()?;
@@ -3882,7 +3858,7 @@ context_mode = "auto"
38823858
}
38833859

38843860
#[test]
3885-
fn context_mode_one_m_is_inert_for_gpt_5_5() -> anyhow::Result<()> {
3861+
fn context_mode_one_m_is_inert_for_unsupported_models() -> anyhow::Result<()> {
38863862
let code_home = TempDir::new()?;
38873863
let cfg = toml::from_str::<ConfigToml>(
38883864
r#"

code-rs/tui/src/bottom_pane/model_selection_view.rs

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,12 +1329,11 @@ mod tests {
13291329

13301330
let lines = buffer_body_lines(&buf, width, height);
13311331
let visible = lines.join("\n");
1332-
let has_header = visible.contains("GPT-5.3-Codex");
1333-
let has_desc = visible.contains("Frontier agentic coding")
1334-
&& visible.contains("25% faster than previous models.");
1332+
let has_header = visible.contains("GPT-5.5");
1333+
let has_desc = visible.contains("Frontier model for complex coding");
13351334

1336-
assert!(has_header);
1337-
assert!(has_desc);
1335+
assert!(has_header, "expected header in rendered model picker:\n{visible}");
1336+
assert!(has_desc, "expected description in rendered model picker:\n{visible}");
13381337
}
13391338

13401339
#[test]
@@ -1607,7 +1606,7 @@ mod tests {
16071606
}
16081607

16091608
#[test]
1610-
fn model_selection_shows_unavailable_context_hint_for_unsupported_model() {
1609+
fn model_selection_shows_available_context_hint_for_supported_model() {
16111610
let presets = vec![make_preset("gpt-5.4")];
16121611
let (tx, _rx) = mpsc::channel::<AppEvent>();
16131612
let view = ModelSelectionView::new(
@@ -1638,13 +1637,10 @@ mod tests {
16381637

16391638
let lines = buffer_body_lines(&buf, width, height);
16401639
assert!(
1641-
lines.iter().any(|line| line.contains("1M Context: unavailable")),
1642-
"expected unsupported model to show unavailable context, got:\n{}",
1640+
lines.iter().any(|line| line.contains("1M Context: auto")),
1641+
"expected supported model to show auto context, got:\n{}",
16431642
lines.join("\n")
16441643
);
1645-
assert!(lines.iter().any(|line| {
1646-
line.contains("Unavailable for this model. Saved settings apply automatically on supported models.")
1647-
}));
16481644
}
16491645

16501646
#[test]

code-rs/tui/src/chatwidget.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32845,7 +32845,7 @@ use code_core::protocol::OrderMeta;
3284532845
chat.handle_model_command("gpt-5.4".to_string());
3284632846

3284732847
assert_eq!(chat.config.model, "gpt-5.4");
32848-
assert_eq!(chat.config.model_reasoning_effort, ReasoningEffort::Medium);
32848+
assert_eq!(chat.config.model_reasoning_effort, ReasoningEffort::XHigh);
3284932849
}
3285032850

3285132851
#[test]

code-rs/tui/src/chatwidget/agent_summary.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ mod agent_summary_counts_tests {
6060
#[test]
6161
fn missing_builtins_default_to_disabled() {
6262
let agents = vec![
63-
make_agent("code-gpt-5.2-codex", true),
63+
make_agent("code-gpt-5.5", true),
6464
make_agent("code-gpt-5.4", true),
6565
];
6666

@@ -74,7 +74,7 @@ mod agent_summary_counts_tests {
7474
#[test]
7575
fn custom_agents_are_counted() {
7676
let agents = vec![
77-
make_agent("code-gpt-5.3-codex", true),
77+
make_agent("code-gpt-5.5", true),
7878
make_agent("my-custom-agent", false),
7979
];
8080

0 commit comments

Comments
 (0)