You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, the model_str is "claude-3.5-sonnet", and in other places we refer to "claude-3-5-sonnet" (for example, in the cost dictionaries). Essentially, there are three different naming variations in use:
"claude-3-5-sonnet" in the cost dictionaries
"claude-3.5-sonnet" in the elif check
"claude-3-5-sonnet-latest" in client.messages.create()
If the intention is to refer to the exact same model, these should be unified or mapped consistently. Otherwise, token usage and cost may be misattributed or incorrectly tallied
Steps to Reproduce
Call the function query_model("claude-3.5-sonnet", ...)
Notice the cost dictionary uses "claude-3-5-sonnet"
Observe the actual function call references "claude-3-5-sonnet-latest"
Expected Behavior
All references (model checks, cost dictionary keys, model calls, etc.) should match consistently so that token usage and costs align with the same model name.
Actual Behavior
There are three different model strings in the codebase, which may cause inconsistencies in cost calculation or model selection.
Proposed Fix
Choose a single, standardized model name—e.g. "claude-3-5-sonnet"—and update:
The elif condition to match that name
The cost dictionary keys to match that name
The actual messages.create() call to also match
By unifying all references, you ensure the correct model is being used throughout the code and that costs are properly tallied.
The text was updated successfully, but these errors were encountered:
In the
elif model_str == "claude-3.5-sonnet":
block, the code calls:However, the
model_str
is"claude-3.5-sonnet"
, and in other places we refer to"claude-3-5-sonnet"
(for example, in the cost dictionaries). Essentially, there are three different naming variations in use:"claude-3-5-sonnet"
in the cost dictionaries"claude-3.5-sonnet"
in theelif
check"claude-3-5-sonnet-latest"
inclient.messages.create()
If the intention is to refer to the exact same model, these should be unified or mapped consistently. Otherwise, token usage and cost may be misattributed or incorrectly tallied
Steps to Reproduce
query_model("claude-3.5-sonnet", ...)
"claude-3-5-sonnet"
"claude-3-5-sonnet-latest"
Expected Behavior
All references (model checks, cost dictionary keys, model calls, etc.) should match consistently so that token usage and costs align with the same model name.
Actual Behavior
There are three different model strings in the codebase, which may cause inconsistencies in cost calculation or model selection.
Proposed Fix
"claude-3-5-sonnet"
—and update:elif
condition to match that namemessages.create()
call to also matchBy unifying all references, you ensure the correct model is being used throughout the code and that costs are properly tallied.
The text was updated successfully, but these errors were encountered: