diff --git a/backend/app/api/endpoints/compatibility.py b/backend/app/api/endpoints/compatibility.py index c3abbdf..9283956 100644 --- a/backend/app/api/endpoints/compatibility.py +++ b/backend/app/api/endpoints/compatibility.py @@ -139,7 +139,7 @@ Return ONLY the JSON. Include exactly 5 recommendations.""" client = anthropic.Anthropic(api_key=settings.ANTHROPIC_API_KEY) message = client.messages.create( - model="claude-sonnet-4-20250514", + model="claude-haiku-4-5-20251001", max_tokens=1024, messages=[{"role": "user", "content": prompt}], ) diff --git a/backend/app/api/endpoints/playlist_fix.py b/backend/app/api/endpoints/playlist_fix.py index fa48595..1771adb 100644 --- a/backend/app/api/endpoints/playlist_fix.py +++ b/backend/app/api/endpoints/playlist_fix.py @@ -109,7 +109,7 @@ Return ONLY the JSON object.""" # Call Claude API client = anthropic.Anthropic(api_key=settings.ANTHROPIC_API_KEY) message = client.messages.create( - model="claude-sonnet-4-20250514", + model="claude-haiku-4-5-20251001", max_tokens=2000, messages=[{"role": "user", "content": prompt}], ) diff --git a/backend/app/api/endpoints/recommendations.py b/backend/app/api/endpoints/recommendations.py index ea5d42d..760a7d0 100644 --- a/backend/app/api/endpoints/recommendations.py +++ b/backend/app/api/endpoints/recommendations.py @@ -127,7 +127,7 @@ Return ONLY the JSON object.""" client = anthropic.Anthropic(api_key=settings.ANTHROPIC_API_KEY) message = client.messages.create( - model="claude-sonnet-4-20250514", + model="claude-haiku-4-5-20251001", max_tokens=2000, messages=[{"role": "user", "content": prompt}], ) @@ -217,7 +217,7 @@ Return ONLY the JSON object.""" client = anthropic.Anthropic(api_key=settings.ANTHROPIC_API_KEY) message = client.messages.create( - model="claude-sonnet-4-20250514", + model="claude-haiku-4-5-20251001", max_tokens=2000, messages=[{"role": "user", "content": prompt}], ) @@ -313,7 +313,7 @@ Return ONLY the JSON object.""" client = anthropic.Anthropic(api_key=settings.ANTHROPIC_API_KEY) message = client.messages.create( - model="claude-sonnet-4-20250514", + model="claude-haiku-4-5-20251001", max_tokens=4000, messages=[{"role": "user", "content": prompt}], ) @@ -431,7 +431,7 @@ Only recommend real songs. Return ONLY the JSON array.""" client = anthropic.Anthropic(api_key=settings.ANTHROPIC_API_KEY) message = client.messages.create( - model="claude-sonnet-4-20250514", + model="claude-haiku-4-5-20251001", max_tokens=4000, messages=[{"role": "user", "content": prompt}], ) @@ -565,7 +565,7 @@ Only use real songs. Return ONLY the JSON.""" client = anthropic.Anthropic(api_key=settings.ANTHROPIC_API_KEY) message = client.messages.create( - model="claude-sonnet-4-20250514", + model="claude-haiku-4-5-20251001", max_tokens=4000, messages=[{"role": "user", "content": prompt}], ) diff --git a/backend/app/api/endpoints/timeline.py b/backend/app/api/endpoints/timeline.py index 6e66e0c..50cc0da 100644 --- a/backend/app/api/endpoints/timeline.py +++ b/backend/app/api/endpoints/timeline.py @@ -101,7 +101,7 @@ Return ONLY a valid JSON object with "decades" and "insight" keys. No other text try: message = await client.messages.create( - model="claude-sonnet-4-20250514", + model="claude-haiku-4-5-20251001", max_tokens=1024, messages=[{"role": "user", "content": prompt}], )