Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files953 unmodified lines95495595695795895996096195796296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899914 unmodified lines1014101510161017101810191020953 unmodified lines if out: return out break except Exception as exc: last_err = exc err_low = str(exc).lower() if "task time budget exhausted" in err_low: raise if any( if any( marker in err_low for marker in ( "400", "badrequesterror", "reasoning is mandatory", "cannot be disabled", "404", "not found", "model_not_found", "decommissioned", "unsupported", ) ): dead_models.add(v_model) break if any( marker in err_low for marker in ( "401", "402", "403", "authentication", "invalid api key", "permission_denied", "insufficient permissions", ) ): if hasattr(self, "_rotate_api_key") and self._rotate_api_key( v_provider, permanent=True ): continue rate_limited_providers.add(v_provider) break if any( marker in err_low for marker in ( "429",14 unmodified lines if hasattr(self, "_sync_provider_env"): self._sync_provider_env(v_provider, pool[0] if pool else "") break break
raise RuntimeError(str(last_err) if last_err else "No vision model available.") except Exception as e:app.py+41-1