File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
src/agents/pi-embedded-runner Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -200,6 +200,32 @@ describe("resolveModel", () => {
200200 expect ( result . model ?. maxTokens ) . toBe ( 32768 ) ;
201201 } ) ;
202202
203+ it ( "propagates reasoning from matching configured fallback model" , ( ) => {
204+ const cfg = {
205+ models : {
206+ providers : {
207+ custom : {
208+ baseUrl : "http://localhost:9000" ,
209+ models : [
210+ {
211+ ...makeModel ( "model-a" ) ,
212+ reasoning : false ,
213+ } ,
214+ {
215+ ...makeModel ( "model-b" ) ,
216+ reasoning : true ,
217+ } ,
218+ ] ,
219+ } ,
220+ } ,
221+ } ,
222+ } as OpenClawConfig ;
223+
224+ const result = resolveModel ( "custom" , "model-b" , "/tmp/agent" , cfg ) ;
225+
226+ expect ( result . model ?. reasoning ) . toBe ( true ) ;
227+ } ) ;
228+
203229 it ( "builds an openai-codex fallback for gpt-5.3-codex" , ( ) => {
204230 mockOpenAICodexTemplateModel ( ) ;
205231
You can’t perform that action at this time.
0 commit comments