@@ -35,7 +35,6 @@ const mockGetRotatingApiKey = vi.fn().mockReturnValue('rotating-server-key')
3535const originalRequire = module . require
3636
3737describe ( 'getApiKey' , ( ) => {
38- // Save original env and reset between tests
3938 const originalEnv = { ...process . env }
4039
4140 beforeEach ( ( ) => {
@@ -146,6 +145,15 @@ describe('Model Capabilities', () => {
146145 'deepseek-chat' ,
147146 'azure/gpt-4.1' ,
148147 'azure/model-router' ,
148+ // GPT-5.1 models don't support temperature (removed in our implementation)
149+ 'gpt-5.1' ,
150+ 'gpt-5.1-mini' ,
151+ 'gpt-5.1-nano' ,
152+ 'gpt-5.1-codex' ,
153+ 'azure/gpt-5.1' ,
154+ 'azure/gpt-5.1-mini' ,
155+ 'azure/gpt-5.1-nano' ,
156+ 'azure/gpt-5.1-codex' ,
149157 // GPT-5 models don't support temperature (removed in our implementation)
150158 'gpt-5' ,
151159 'gpt-5-mini' ,
@@ -218,6 +226,15 @@ describe('Model Capabilities', () => {
218226 expect ( getMaxTemperature ( 'azure/o3' ) ) . toBeUndefined ( )
219227 expect ( getMaxTemperature ( 'azure/o4-mini' ) ) . toBeUndefined ( )
220228 expect ( getMaxTemperature ( 'deepseek-r1' ) ) . toBeUndefined ( )
229+ // GPT-5.1 models don't support temperature
230+ expect ( getMaxTemperature ( 'gpt-5.1' ) ) . toBeUndefined ( )
231+ expect ( getMaxTemperature ( 'gpt-5.1-mini' ) ) . toBeUndefined ( )
232+ expect ( getMaxTemperature ( 'gpt-5.1-nano' ) ) . toBeUndefined ( )
233+ expect ( getMaxTemperature ( 'gpt-5.1-codex' ) ) . toBeUndefined ( )
234+ expect ( getMaxTemperature ( 'azure/gpt-5.1' ) ) . toBeUndefined ( )
235+ expect ( getMaxTemperature ( 'azure/gpt-5.1-mini' ) ) . toBeUndefined ( )
236+ expect ( getMaxTemperature ( 'azure/gpt-5.1-nano' ) ) . toBeUndefined ( )
237+ expect ( getMaxTemperature ( 'azure/gpt-5.1-codex' ) ) . toBeUndefined ( )
221238 // GPT-5 models don't support temperature
222239 expect ( getMaxTemperature ( 'gpt-5' ) ) . toBeUndefined ( )
223240 expect ( getMaxTemperature ( 'gpt-5-mini' ) ) . toBeUndefined ( )
@@ -306,6 +323,16 @@ describe('Model Capabilities', () => {
306323 )
307324
308325 it . concurrent ( 'should have correct models in MODELS_WITH_REASONING_EFFORT' , ( ) => {
326+ // Should contain GPT-5.1 models that support reasoning effort
327+ expect ( MODELS_WITH_REASONING_EFFORT ) . toContain ( 'gpt-5.1' )
328+ expect ( MODELS_WITH_REASONING_EFFORT ) . toContain ( 'gpt-5.1-mini' )
329+ expect ( MODELS_WITH_REASONING_EFFORT ) . toContain ( 'gpt-5.1-nano' )
330+ expect ( MODELS_WITH_REASONING_EFFORT ) . toContain ( 'gpt-5.1-codex' )
331+ expect ( MODELS_WITH_REASONING_EFFORT ) . toContain ( 'azure/gpt-5.1' )
332+ expect ( MODELS_WITH_REASONING_EFFORT ) . toContain ( 'azure/gpt-5.1-mini' )
333+ expect ( MODELS_WITH_REASONING_EFFORT ) . toContain ( 'azure/gpt-5.1-nano' )
334+ expect ( MODELS_WITH_REASONING_EFFORT ) . toContain ( 'azure/gpt-5.1-codex' )
335+
309336 // Should contain GPT-5 models that support reasoning effort
310337 expect ( MODELS_WITH_REASONING_EFFORT ) . toContain ( 'gpt-5' )
311338 expect ( MODELS_WITH_REASONING_EFFORT ) . toContain ( 'gpt-5-mini' )
@@ -325,6 +352,16 @@ describe('Model Capabilities', () => {
325352 } )
326353
327354 it . concurrent ( 'should have correct models in MODELS_WITH_VERBOSITY' , ( ) => {
355+ // Should contain GPT-5.1 models that support verbosity
356+ expect ( MODELS_WITH_VERBOSITY ) . toContain ( 'gpt-5.1' )
357+ expect ( MODELS_WITH_VERBOSITY ) . toContain ( 'gpt-5.1-mini' )
358+ expect ( MODELS_WITH_VERBOSITY ) . toContain ( 'gpt-5.1-nano' )
359+ expect ( MODELS_WITH_VERBOSITY ) . toContain ( 'gpt-5.1-codex' )
360+ expect ( MODELS_WITH_VERBOSITY ) . toContain ( 'azure/gpt-5.1' )
361+ expect ( MODELS_WITH_VERBOSITY ) . toContain ( 'azure/gpt-5.1-mini' )
362+ expect ( MODELS_WITH_VERBOSITY ) . toContain ( 'azure/gpt-5.1-nano' )
363+ expect ( MODELS_WITH_VERBOSITY ) . toContain ( 'azure/gpt-5.1-codex' )
364+
328365 // Should contain GPT-5 models that support verbosity
329366 expect ( MODELS_WITH_VERBOSITY ) . toContain ( 'gpt-5' )
330367 expect ( MODELS_WITH_VERBOSITY ) . toContain ( 'gpt-5-mini' )
0 commit comments