@@ -51,15 +51,15 @@ def test_context_window_matching(self):
5151 self .assertEqual (context_window_for ("unknown-model" ), 128_000 )
5252
5353 def test_context_window_config_file_override (self ):
54- """A context_windows section in the config file overrides the
55- built-in table (matched before CONTEXT_WINDOWS) ."""
54+ """A llm.context_window in the config file overrides the
55+ built-in table."""
5656 with tempfile .TemporaryDirectory () as d :
5757 p = Path (d ) / "config.json"
58- p .write_text ('{"context_windows ": {"deepseek-v4 ": 2000000}}' , encoding = "utf-8" )
58+ p .write_text ('{"llm ": {"context_window ": 2000000}}' , encoding = "utf-8" )
5959 self .assertEqual (context_window_for ("deepseek-v4-flash" , str (p )), 2_000_000 )
60- # models the override doesn't cover still use the table
61- self .assertEqual (context_window_for ("gpt-5-mini" , str (p )), 128_000 )
62- self .assertEqual (context_window_for ("unknown-model" , str (p )), 128_000 )
60+ # all models hit the llm.context_window when set
61+ self .assertEqual (context_window_for ("gpt-5-mini" , str (p )), 2_000_000 )
62+ self .assertEqual (context_window_for ("unknown-model" , str (p )), 2_000_000 )
6363
6464 def test_calibrator (self ):
6565 c = TokenCalibrator ()
0 commit comments