Enable reasoning for Claude Haiku 4.5. Track costs of Opus 4.5

This commit is contained in:
Debanjum
2025-12-05 11:43:36 -08:00
parent f1337c3b07
commit 4654ac4962
2 changed files with 3 additions and 1 deletions

View File

@@ -39,7 +39,7 @@ anthropic_async_clients: Dict[str, anthropic.AsyncAnthropic | anthropic.AsyncAnt
DEFAULT_MAX_TOKENS_ANTHROPIC = 8000 DEFAULT_MAX_TOKENS_ANTHROPIC = 8000
MAX_REASONING_TOKENS_ANTHROPIC = 12000 MAX_REASONING_TOKENS_ANTHROPIC = 12000
REASONING_MODELS = ["claude-3-7", "claude-sonnet-4", "claude-opus-4"] REASONING_MODELS = ["claude-3-7", "claude-sonnet-4", "claude-opus-4", "claude-haiku-4"]
@retry( @retry(

View File

@@ -72,6 +72,8 @@ model_to_cost: Dict[str, Dict[str, float]] = {
"claude-sonnet-4-5-20250929": {"input": 3.0, "output": 15.0, "cache_read": 0.3, "cache_write": 3.75}, "claude-sonnet-4-5-20250929": {"input": 3.0, "output": 15.0, "cache_read": 0.3, "cache_write": 3.75},
"claude-haiku-4-5": {"input": 1.0, "output": 5.0, "cache_read": 0.08, "cache_write": 1.0}, "claude-haiku-4-5": {"input": 1.0, "output": 5.0, "cache_read": 0.08, "cache_write": 1.0},
"claude-haiku-4-5-20251001": {"input": 1.0, "output": 5.0, "cache_read": 0.08, "cache_write": 1.0}, "claude-haiku-4-5-20251001": {"input": 1.0, "output": 5.0, "cache_read": 0.08, "cache_write": 1.0},
"claude-opus-4-5": {"input": 5.0, "output": 25.0, "cache_read": 1.50, "cache_write": 6.25},
"claude-opus-4-5-20251101": {"input": 5.0, "output": 25.0, "cache_read": 1.50, "cache_write": 6.25},
# Grok pricing: https://docs.x.ai/docs/models # Grok pricing: https://docs.x.ai/docs/models
"grok-3": {"input": 3.0, "output": 15.0}, "grok-3": {"input": 3.0, "output": 15.0},
"grok-3-latest": {"input": 3.0, "output": 15.0}, "grok-3-latest": {"input": 3.0, "output": 15.0},