Skip to content

Commit fcf8845

Browse files
committed
add default anthropic version to messages handler for vertex anthropic
1 parent 2817351 commit fcf8845

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/providers/anthropic/messages.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,15 @@ import { AnthropicErrorResponseTransform } from './utils';
66
import { generateInvalidProviderResponseError } from '../utils';
77
import { ANTHROPIC } from '../../globals';
88

9-
export const AnthropicMessagesConfig = getMessagesConfig({});
9+
export const AnthropicMessagesConfig = getMessagesConfig({
10+
extra: {
11+
anthropic_version: {
12+
param: 'anthropic_version',
13+
required: true,
14+
default: 'vertex-2023-10-16',
15+
},
16+
},
17+
});
1018

1119
export const AnthropicMessagesResponseTransform = (
1220
response: MessagesResponse | AnthropicErrorResponse,

0 commit comments

Comments
 (0)