Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
spikelu2016 committed Jan 5, 2025
1 parent 34ebf34 commit 5fb4f93
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion internal/provider/anthropic/cost.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,13 @@ func (ce *CostEstimator) EstimatePromptCost(model string, tks int) (float64, err

}

selected := selectModel(model)
selected := ""
if strings.HasPrefix(model, "us") {
selected = convertAmazonModelToAnthropicModel(model)
} else {
selected = selectModel(model)
}

cost, ok := costMap[selected]
if !ok {
return 0, fmt.Errorf("%s is not present in the cost map provided", model)
Expand Down

0 comments on commit 5fb4f93

Please sign in to comment.