@@ -119,12 +119,13 @@ test('claude-api: keeps temperature for Opus 4.6', async (t) => {
119119 assert . equal ( body . stream , true )
120120} )
121121
122- test ( 'claude-api: omits temperature for Opus 4.7 and 4.8 ' , async ( t ) => {
122+ test ( 'claude-api: omits temperature for models that reject custom sampling ' , async ( t ) => {
123123 t . mock . method ( console , 'debug' , ( ) => { } )
124124
125125 for ( const [ modelName , model ] of [
126126 [ 'claudeOpus47Api' , 'claude-opus-4-7' ] ,
127127 [ 'claudeOpus48Api' , 'claude-opus-4-8' ] ,
128+ [ 'claudeSonnet5Api' , 'claude-sonnet-5' ] ,
128129 ] ) {
129130 await t . test ( modelName , async ( t ) => {
130131 setStorage ( {
@@ -158,6 +159,11 @@ test('claude-api: omits temperature for Opus 4.7 and 4.8', async (t) => {
158159 assert . equal ( body . max_tokens , 1024 )
159160 assert . equal ( body . stream , true )
160161 assert . equal ( Object . hasOwn ( body , 'temperature' ) , false )
162+ if ( model === 'claude-sonnet-5' ) {
163+ assert . deepEqual ( body . thinking , { type : 'disabled' } )
164+ } else {
165+ assert . equal ( Object . hasOwn ( body , 'thinking' ) , false )
166+ }
161167 } )
162168 }
163169} )
0 commit comments