@@ -2,16 +2,18 @@ import { describe, expect, it } from "vitest";
22import { buildQaImageGenerationConfigPatch } from "./image-generation.js" ;
33
44describe ( "QA provider image generation config" , ( ) => {
5- it ( "uses the selected mock provider for mock-openai image generation " , ( ) => {
5+ it ( "uses the OpenAI image provider against the selected mock-openai endpoint " , ( ) => {
66 const patch = buildQaImageGenerationConfigPatch ( {
77 providerMode : "mock-openai" ,
88 providerBaseUrl : "http://127.0.0.1:44080/v1" ,
99 requiredPluginIds : [ "qa-channel" ] ,
1010 } ) ;
1111
12- expect ( patch . plugins . allow ) . toEqual ( [ "acpx" , "memory-core" , "qa-channel" ] ) ;
13- expect ( patch . agents . defaults . imageGenerationModel . primary ) . toBe ( "mock-openai/gpt-image-1" ) ;
12+ expect ( patch . plugins . allow ) . toEqual ( [ "acpx" , "memory-core" , "openai" , "qa-channel" ] ) ;
13+ expect ( patch . plugins . entries ?. openai ) . toEqual ( { enabled : true } ) ;
14+ expect ( patch . agents . defaults . imageGenerationModel . primary ) . toBe ( "openai/gpt-image-1" ) ;
1415 expect ( patch . models ?. providers [ "mock-openai" ] ?. baseUrl ) . toBe ( "http://127.0.0.1:44080/v1" ) ;
16+ expect ( patch . models ?. providers . openai ?. baseUrl ) . toBe ( "http://127.0.0.1:44080/v1" ) ;
1517 } ) ;
1618
1719 it ( "preserves already-allowed plugins when configuring image generation" , ( ) => {
0 commit comments