Spaces:
Sleeping
Sleeping
Commit History
-
Fix generation outage: retired Groq model and anthropic SDK signature
Donne120 +1: Claude Opus 5Two separate production failures, neither an expired key, both surfacing to students as "the AI service is unavailable": Groq 404 - The model `llama-3.3-70b-versatile` does not exist Claude Messages.create() got an unexpected keyword argument 'temperature' The Groq id was hardcoded in five places, so a retirement broke chat and the email briefing at once. From outside, a 404 on a retired model is indistinguishable from a bad key, which is what made this expensive to find. The Claude break came from `anthropic>=0.39.0` having no upper bound: the Space rebuilt, pip resolved a build with a different signature, and every call failed. The code never changed. Changes: - model_discovery.py: shared model-resolution helper. Walks a candidate list on model errors only, adopts what works, and remembers it so later requests do not re-probe dead models. Auth/quota/rate-limit errors stop after one attempt — walking the list there would multiply latency on a request that is already …107a904