Add Haiku 3.5 to Anthropic, Bedrock, Vertex

This commit is contained in:
Saoud Rizwan
2024-11-04 14:08:25 -05:00
parent ac66cb89c0
commit 48cdfa9874
2 changed files with 29 additions and 5 deletions

View File

@@ -28,6 +28,7 @@ export class AnthropicHandler implements ApiHandler {
switch (modelId) { switch (modelId) {
// 'latest' alias does not support cache_control // 'latest' alias does not support cache_control
case "claude-3-5-sonnet-20241022": case "claude-3-5-sonnet-20241022":
case "claude-3-5-haiku-20241022":
case "claude-3-opus-20240229": case "claude-3-opus-20240229":
case "claude-3-haiku-20240307": { case "claude-3-haiku-20240307": {
/* /*
@@ -78,11 +79,8 @@ export class AnthropicHandler implements ApiHandler {
// https://github.com/anthropics/anthropic-sdk-typescript/commit/c920b77fc67bd839bfeb6716ceab9d7c9bbe7393 // https://github.com/anthropics/anthropic-sdk-typescript/commit/c920b77fc67bd839bfeb6716ceab9d7c9bbe7393
switch (modelId) { switch (modelId) {
case "claude-3-5-sonnet-20241022": case "claude-3-5-sonnet-20241022":
return { case "claude-3-5-haiku-20241022":
headers: { case "claude-3-opus-20240229":
"anthropic-beta": "prompt-caching-2024-07-31",
},
}
case "claude-3-haiku-20240307": case "claude-3-haiku-20240307":
return { return {
headers: { "anthropic-beta": "prompt-caching-2024-07-31" }, headers: { "anthropic-beta": "prompt-caching-2024-07-31" },

View File

@@ -66,6 +66,16 @@ export const anthropicModels = {
cacheWritesPrice: 3.75, // $3.75 per million tokens cacheWritesPrice: 3.75, // $3.75 per million tokens
cacheReadsPrice: 0.3, // $0.30 per million tokens cacheReadsPrice: 0.3, // $0.30 per million tokens
}, },
"claude-3-5-haiku-20241022": {
maxTokens: 8192,
contextWindow: 200_000,
supportsImages: false,
supportsPromptCache: true,
inputPrice: 1.0,
outputPrice: 5.0,
cacheWritesPrice: 1.25,
cacheReadsPrice: 0.1,
},
"claude-3-opus-20240229": { "claude-3-opus-20240229": {
maxTokens: 4096, maxTokens: 4096,
contextWindow: 200_000, contextWindow: 200_000,
@@ -102,6 +112,14 @@ export const bedrockModels = {
inputPrice: 3.0, inputPrice: 3.0,
outputPrice: 15.0, outputPrice: 15.0,
}, },
"anthropic.claude-3-5-haiku-20241022-v1:0": {
maxTokens: 8192,
contextWindow: 200_000,
supportsImages: false,
supportsPromptCache: false,
inputPrice: 1.0,
outputPrice: 5.0,
},
"anthropic.claude-3-5-sonnet-20240620-v1:0": { "anthropic.claude-3-5-sonnet-20240620-v1:0": {
maxTokens: 8192, maxTokens: 8192,
contextWindow: 200_000, contextWindow: 200_000,
@@ -167,6 +185,14 @@ export const vertexModels = {
inputPrice: 3.0, inputPrice: 3.0,
outputPrice: 15.0, outputPrice: 15.0,
}, },
"claude-3-5-haiku@20241022": {
maxTokens: 8192,
contextWindow: 200_000,
supportsImages: false,
supportsPromptCache: false,
inputPrice: 1.0,
outputPrice: 5.0,
},
"claude-3-opus@20240229": { "claude-3-opus@20240229": {
maxTokens: 4096, maxTokens: 4096,
contextWindow: 200_000, contextWindow: 200_000,