File tree Expand file tree Collapse file tree 5 files changed +8
-12
lines changed
providers/azure-anthropic Expand file tree Collapse file tree 5 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -337,7 +337,7 @@ Return ONLY the JSON array.`,
337337 connectionDroppable : false ,
338338 condition : {
339339 field : 'model' ,
340- value : providers [ 'azure-openai' ] . models ,
340+ value : [ ... providers [ 'azure-openai' ] . models , ... providers [ 'azure-anthropic' ] . models ] ,
341341 } ,
342342 } ,
343343 {
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ export function getProviderCredentialSubBlocks(): SubBlockConfig[] {
129129 connectionDroppable : false ,
130130 condition : {
131131 field : 'model' ,
132- value : providers [ 'azure-openai' ] . models ,
132+ value : [ ... providers [ 'azure-openai' ] . models , ... providers [ 'azure-anthropic' ] . models ] ,
133133 } ,
134134 } ,
135135 {
Original file line number Diff line number Diff line change @@ -132,9 +132,7 @@ export class EvaluatorBlockHandler implements BlockHandler {
132132
133133 if ( providerId === 'azure-openai' || providerId === 'azure-anthropic' ) {
134134 providerRequest . azureEndpoint = inputs . azureEndpoint
135- if ( providerId === 'azure-openai' ) {
136- providerRequest . azureApiVersion = inputs . azureApiVersion
137- }
135+ providerRequest . azureApiVersion = inputs . azureApiVersion
138136 }
139137
140138 if ( providerId === 'bedrock' ) {
Original file line number Diff line number Diff line change @@ -107,9 +107,7 @@ export class RouterBlockHandler implements BlockHandler {
107107
108108 if ( providerId === 'azure-openai' || providerId === 'azure-anthropic' ) {
109109 providerRequest . azureEndpoint = inputs . azureEndpoint
110- if ( providerId === 'azure-openai' ) {
111- providerRequest . azureApiVersion = inputs . azureApiVersion
112- }
110+ providerRequest . azureApiVersion = inputs . azureApiVersion
113111 }
114112
115113 if ( providerId === 'bedrock' ) {
@@ -266,9 +264,7 @@ export class RouterBlockHandler implements BlockHandler {
266264
267265 if ( providerId === 'azure-openai' || providerId === 'azure-anthropic' ) {
268266 providerRequest . azureEndpoint = inputs . azureEndpoint
269- if ( providerId === 'azure-openai' ) {
270- providerRequest . azureApiVersion = inputs . azureApiVersion
271- }
267+ providerRequest . azureApiVersion = inputs . azureApiVersion
272268 }
273269
274270 if ( providerId === 'bedrock' ) {
Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ export const azureAnthropicProvider: ProviderConfig = {
3535 // The SDK appends /v1/messages automatically
3636 const baseURL = `${ request . azureEndpoint . replace ( / \/ $ / , '' ) } /anthropic`
3737
38+ const anthropicVersion = request . azureApiVersion || '2023-06-01'
39+
3840 return executeAnthropicProviderRequest (
3941 {
4042 ...request ,
@@ -49,7 +51,7 @@ export const azureAnthropicProvider: ProviderConfig = {
4951 apiKey,
5052 defaultHeaders : {
5153 'api-key' : apiKey ,
52- 'anthropic-version' : '2023-06-01' ,
54+ 'anthropic-version' : anthropicVersion ,
5355 ...( useNativeStructuredOutputs
5456 ? { 'anthropic-beta' : 'structured-outputs-2025-11-13' }
5557 : { } ) ,
You can’t perform that action at this time.
0 commit comments