Skip to content

Commit 8420adb

Browse files
authored
fix(anthropic): remove unsupported structured-outputs beta header for Vertex AI (#462)
Vertex AI's Anthropic integration does not support the structured-outputs-2025-11-13 beta header, causing invalid_request_error responses. Remove this header while keeping web-search-2025-03-05 which is supported.
1 parent c270cf0 commit 8420adb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/ax/ai/anthropic/api.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -878,8 +878,7 @@ export class AxAIAnthropic<TModelKey = string> extends AxBaseAI<
878878
apiURL = `https://${tld}.googleapis.com/v1/projects/${projectId}/locations/${region}/publishers/anthropic/`;
879879
headers = async () => ({
880880
Authorization: `Bearer ${await apiKey()}`,
881-
'anthropic-beta':
882-
'structured-outputs-2025-11-13, web-search-2025-03-05',
881+
'anthropic-beta': 'web-search-2025-03-05',
883882
});
884883
} else {
885884
if (!apiKey) {

0 commit comments

Comments
 (0)