@@ -364,6 +364,7 @@ describe("applyExtraParamsToAgent", () => {
364364 applyModelId : string ;
365365 model :
366366 | Model < "openai-responses" >
367+ | Model < "azure-openai-responses" >
367368 | Model < "openai-codex-responses" >
368369 | Model < "openai-completions" >
369370 | Model < "anthropic-messages" > ;
@@ -418,7 +419,11 @@ describe("applyExtraParamsToAgent", () => {
418419 function runParallelToolCallsPayloadMutationCase ( params : {
419420 applyProvider : string ;
420421 applyModelId : string ;
421- model : Model < "openai-completions" > | Model < "openai-responses" > | Model < "anthropic-messages" > ;
422+ model :
423+ | Model < "openai-completions" >
424+ | Model < "openai-responses" >
425+ | Model < "azure-openai-responses" >
426+ | Model < "anthropic-messages" > ;
422427 cfg ?: Record < string , unknown > ;
423428 extraParamsOverride ?: Record < string , unknown > ;
424429 payload ?: Record < string , unknown > ;
@@ -656,6 +661,34 @@ describe("applyExtraParamsToAgent", () => {
656661 expect ( payload . parallel_tool_calls ) . toBe ( true ) ;
657662 } ) ;
658663
664+ it ( "injects parallel_tool_calls for azure-openai-responses payloads when configured" , ( ) => {
665+ const payload = runParallelToolCallsPayloadMutationCase ( {
666+ applyProvider : "azure-openai-responses" ,
667+ applyModelId : "gpt-5" ,
668+ cfg : {
669+ agents : {
670+ defaults : {
671+ models : {
672+ "azure-openai-responses/gpt-5" : {
673+ params : {
674+ parallelToolCalls : true ,
675+ } ,
676+ } ,
677+ } ,
678+ } ,
679+ } ,
680+ } ,
681+ model : {
682+ api : "azure-openai-responses" ,
683+ provider : "azure-openai-responses" ,
684+ id : "gpt-5" ,
685+ baseUrl : "https://example.openai.azure.com/openai/v1" ,
686+ } as unknown as Model < "azure-openai-responses" > ,
687+ } ) ;
688+
689+ expect ( payload . parallel_tool_calls ) . toBe ( true ) ;
690+ } ) ;
691+
659692 it ( "does not inject parallel_tool_calls for unsupported APIs" , ( ) => {
660693 const payload = runParallelToolCallsPayloadMutationCase ( {
661694 applyProvider : "anthropic" ,
@@ -2664,11 +2697,11 @@ describe("applyExtraParamsToAgent", () => {
26642697 } ,
26652698 } ,
26662699 model : {
2667- api : "openai-responses" ,
2700+ api : "azure- openai-responses" ,
26682701 provider : "azure-openai-responses" ,
26692702 id : "gpt-5.4" ,
26702703 baseUrl : "https://example.openai.azure.com/openai/v1" ,
2671- } as unknown as Model < "openai-responses" > ,
2704+ } as unknown as Model < "azure- openai-responses" > ,
26722705 } ) ;
26732706 expect ( payload ) . not . toHaveProperty ( "service_tier" ) ;
26742707 } ) ;
@@ -2829,7 +2862,7 @@ describe("applyExtraParamsToAgent", () => {
28292862 applyProvider : "azure-openai-responses" ,
28302863 applyModelId : "gpt-4o" ,
28312864 model : {
2832- api : "openai-responses" ,
2865+ api : "azure- openai-responses" ,
28332866 provider : "azure-openai-responses" ,
28342867 id : "gpt-4o" ,
28352868 name : "gpt-4o" ,
@@ -2840,7 +2873,7 @@ describe("applyExtraParamsToAgent", () => {
28402873 contextWindow : 128_000 ,
28412874 maxTokens : 16_384 ,
28422875 compat : { supportsStore : false } ,
2843- } as unknown as Model < "openai-responses" > ,
2876+ } as unknown as Model < "azure- openai-responses" > ,
28442877 } ) ;
28452878 expect ( payload ) . not . toHaveProperty ( "store" ) ;
28462879 } ) ;
@@ -2917,11 +2950,11 @@ describe("applyExtraParamsToAgent", () => {
29172950 applyProvider : "azure-openai-responses" ,
29182951 applyModelId : "gpt-4o" ,
29192952 model : {
2920- api : "openai-responses" ,
2953+ api : "azure- openai-responses" ,
29212954 provider : "azure-openai-responses" ,
29222955 id : "gpt-4o" ,
29232956 baseUrl : "https://example.openai.azure.com/openai/v1" ,
2924- } as unknown as Model < "openai-responses" > ,
2957+ } as unknown as Model < "azure- openai-responses" > ,
29252958 } ) ;
29262959 expect ( payload ) . not . toHaveProperty ( "context_management" ) ;
29272960 } ) ;
@@ -2945,11 +2978,11 @@ describe("applyExtraParamsToAgent", () => {
29452978 } ,
29462979 } ,
29472980 model : {
2948- api : "openai-responses" ,
2981+ api : "azure- openai-responses" ,
29492982 provider : "azure-openai-responses" ,
29502983 id : "gpt-4o" ,
29512984 baseUrl : "https://example.openai.azure.com/openai/v1" ,
2952- } as unknown as Model < "openai-responses" > ,
2985+ } as unknown as Model < "azure- openai-responses" > ,
29532986 } ) ;
29542987 expect ( payload . context_management ) . toEqual ( [
29552988 {
@@ -3081,16 +3114,16 @@ describe("applyExtraParamsToAgent", () => {
30813114 expect ( payload . prompt_cache_retention ) . toBe ( "24h" ) ;
30823115 } ) ;
30833116
3084- it ( "keeps prompt cache fields for direct Azure OpenAI openai-responses endpoints" , ( ) => {
3117+ it ( "keeps prompt cache fields for direct Azure OpenAI azure- openai-responses endpoints" , ( ) => {
30853118 const payload = runResponsesPayloadMutationCase ( {
30863119 applyProvider : "azure-openai-responses" ,
30873120 applyModelId : "gpt-4o" ,
30883121 model : {
3089- api : "openai-responses" ,
3122+ api : "azure- openai-responses" ,
30903123 provider : "azure-openai-responses" ,
30913124 id : "gpt-4o" ,
30923125 baseUrl : "https://example.openai.azure.com/openai/v1" ,
3093- } as unknown as Model < "openai-responses" > ,
3126+ } as unknown as Model < "azure- openai-responses" > ,
30943127 payload : {
30953128 store : false ,
30963129 prompt_cache_key : "session-azure" ,
0 commit comments