llm/ant: add Claude 4 sonnet/opus
Not set as default yet.
There's a bit of prompt engineering work
to do before we flip the switch.
diff --git a/llm/ant/ant.go b/llm/ant/ant.go
index 970662d..6a0a393 100644
--- a/llm/ant/ant.go
+++ b/llm/ant/ant.go
@@ -30,6 +30,8 @@
Claude35Sonnet = "claude-3-5-sonnet-20241022"
Claude35Haiku = "claude-3-5-haiku-20241022"
Claude37Sonnet = "claude-3-7-sonnet-20250219"
+ Claude4Sonnet = "claude-sonnet-4-20250514"
+ Claude4Opus = "claude-opus-4-20250514"
)
// Service provides Claude completions.
@@ -239,6 +241,7 @@
"max_tokens": llm.StopReasonMaxTokens,
"end_turn": llm.StopReasonEndTurn,
"tool_use": llm.StopReasonToolUse,
+ "refusal": llm.StopReasonRefusal,
}
)
@@ -554,6 +557,18 @@
CacheRead: 30, // $0.30
CacheCreation: 375, // $3.75
},
+ Claude4Sonnet: {
+ Input: 300, // $3
+ Output: 1500, // $15
+ CacheRead: 30, // $0.30
+ CacheCreation: 375, // $3.75
+ },
+ Claude4Opus: {
+ Input: 1500, // $15
+ Output: 7500, // $75
+ CacheRead: 150, // $1.50
+ CacheCreation: 1875, // $18.75
+ },
}
// TotalDollars returns the total cost to obtain this response, in dollars.