@@ -376,7 +376,7 @@ func (h *generateCommandHandler) expandTests(context *PromptPexContext) error {
376376
377377 for _ , test := range context .Tests {
378378 // Generate expanded versions of each test
379- expandedTests , err := h .expandSingleTest (test , context )
379+ expandedTests , err := h .expandSingleTest (test )
380380 if err != nil {
381381 h .cfg .WriteToOut (fmt .Sprintf ("Failed to expand test: %v" , err ))
382382 continue
@@ -395,14 +395,21 @@ func (h *generateCommandHandler) expandTests(context *PromptPexContext) error {
395395}
396396
397397// expandSingleTest expands a single test into multiple variations
398- func (h * generateCommandHandler ) expandSingleTest (test PromptPexTest , context * PromptPexContext ) ([]PromptPexTest , error ) {
398+ func (h * generateCommandHandler ) expandSingleTest (test PromptPexTest ) ([]PromptPexTest , error ) {
399399 prompt := fmt .Sprintf (`Given this test case, generate 2-3 variations that test similar scenarios but with different inputs.
400400Keep the same scenario type but vary the specific details.
401401
402- Original test:
403- Scenario: %s
404- Input: %s
405- Reasoning: %s
402+ <original_test>
403+ <scenario>
404+ %s
405+ </scenario>
406+ <input>
407+ %s
408+ </input>
409+ <reasoning>
410+ %s
411+ </reasoning>
412+ </original_test>
406413
407414Generate variations in JSON format as an array of objects with "scenario", "testinput", and "reasoning" fields.` ,
408415 * test .Scenario , test .TestInput , * test .Reasoning )
@@ -412,7 +419,7 @@ Generate variations in JSON format as an array of objects with "scenario", "test
412419 }
413420
414421 options := azuremodels.ChatCompletionOptions {
415- Model : "openai/gpt-4o-mini" , // GitHub Models compatible model
422+ Model : * h . options . Models . TestExpansion , // GitHub Models compatible model
416423 Messages : messages ,
417424 Temperature : util .Ptr (0.5 ),
418425 }
0 commit comments