From ef24220d3f84f7e7ee3dcc25bd997bdd40b13982 Mon Sep 17 00:00:00 2001 From: David Pryce-Compson Date: Wed, 18 Dec 2024 14:45:10 +0000 Subject: [PATCH] community: adding haiku 3.5 and opus callbacks (#28783) **Description:** Adding new AWS Bedrock model and their respective costs to match https://aws.amazon.com/bedrock/pricing/ for the Bedrock callback **Issue:** Missing models for those that wish to try them out **Dependencies:** Nothing added **Twitter handle:** @David_Pryce and / or @JamfSoftware If no one reviews your PR within a few days, please @-mention one of baskaryan, efriis, eyurtsev, ccurme, vbarda, hwchase17. --- .../callbacks/bedrock_anthropic_callback.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/community/langchain_community/callbacks/bedrock_anthropic_callback.py b/libs/community/langchain_community/callbacks/bedrock_anthropic_callback.py index 6dd88639cbb..4d14fbe99e8 100644 --- a/libs/community/langchain_community/callbacks/bedrock_anthropic_callback.py +++ b/libs/community/langchain_community/callbacks/bedrock_anthropic_callback.py @@ -12,6 +12,8 @@ MODEL_COST_PER_1K_INPUT_TOKENS = { "anthropic.claude-3-5-sonnet-20240620-v1:0": 0.003, "anthropic.claude-3-5-sonnet-20241022-v2:0": 0.003, "anthropic.claude-3-haiku-20240307-v1:0": 0.00025, + "anthropic.claude-3-opus-20240229-v1:0": 0.015, + "anthropic.claude-3-5-haiku-20241022-v1:0": 0.0008, } MODEL_COST_PER_1K_OUTPUT_TOKENS = { @@ -22,6 +24,8 @@ MODEL_COST_PER_1K_OUTPUT_TOKENS = { "anthropic.claude-3-5-sonnet-20240620-v1:0": 0.015, "anthropic.claude-3-5-sonnet-20241022-v2:0": 0.015, "anthropic.claude-3-haiku-20240307-v1:0": 0.00125, + "anthropic.claude-3-opus-20240229-v1:0": 0.075, + "anthropic.claude-3-5-haiku-20241022-v1:0": 0.004, }