Skip to content

Commit 5fb4f93

Browse files
committed
fix bug
1 parent 34ebf34 commit 5fb4f93

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

internal/provider/anthropic/cost.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,13 @@ func (ce *CostEstimator) EstimatePromptCost(model string, tks int) (float64, err
6464

6565
}
6666

67-
selected := selectModel(model)
67+
selected := ""
68+
if strings.HasPrefix(model, "us") {
69+
selected = convertAmazonModelToAnthropicModel(model)
70+
} else {
71+
selected = selectModel(model)
72+
}
73+
6874
cost, ok := costMap[selected]
6975
if !ok {
7076
return 0, fmt.Errorf("%s is not present in the cost map provided", model)

0 commit comments

Comments
 (0)