You've already forked agentic-coding-workflow
bugfix
This commit is contained in:
@@ -30,6 +30,19 @@ func TestComputeCost_BasicMath(t *testing.T) {
|
||||
require.InDelta(t, 0.021, got, 1e-9)
|
||||
}
|
||||
|
||||
// TestExportedComputeCost_EqualsUnexported guards that the exported ComputeCost
|
||||
// (reused by internal/acp) returns identical results to the unexported alias.
|
||||
func TestExportedComputeCost_EqualsUnexported(t *testing.T) {
|
||||
m := LLMModel{
|
||||
PromptPricePerMillionUSD: 3.0,
|
||||
CompletionPricePerMillionUSD: 15.0,
|
||||
ThinkingPricePerMillionUSD: 3.0,
|
||||
}
|
||||
for _, c := range [][3]int{{1000, 0, 0}, {0, 1000, 0}, {0, 0, 1000}, {1234, 5678, 90}} {
|
||||
require.Equal(t, computeCost(m, c[0], c[1], c[2]), ComputeCost(m, c[0], c[1], c[2]))
|
||||
}
|
||||
}
|
||||
|
||||
func TestComputeCost_ZeroTokens(t *testing.T) {
|
||||
m := LLMModel{
|
||||
PromptPricePerMillionUSD: 3.0,
|
||||
|
||||
Reference in New Issue
Block a user