unslothai/unsloth · error · HTTPException
Provider '{config['display_name']}' is disabled.
Error message
Provider '{config['display_name']}' is disabled. What it means
A 400 from _bind_saved_provider_target: the referenced provider row exists but is_enabled is false, and the request has no explicit encrypted_api_key (so it would use the saved credential). Disabled providers are excluded from saved-credential use; the message includes the provider's display name.
Source
Thrown at studio/backend/routes/providers.py:449
except Exception:
logger.exception(
"provider.delete_credential_rollback_failed", provider_id = provider_id
)
raise
def _bind_saved_provider_target(payload):
"""Use the saved provider's endpoint whenever its saved credential may be used."""
if not payload.provider_id or payload.encrypted_api_key:
return payload
config = providers_db.get_provider(payload.provider_id)
if config is None:
raise HTTPException(
status_code = 404,
detail = f"Provider config not found: {payload.provider_id}",
)
if not config["is_enabled"]:
raise HTTPException(
status_code = 400,
detail = f"Provider '{config['display_name']}' is disabled.",
)
return payload.model_copy(
update = {
"provider_type": config["provider_type"],
"base_url": config["base_url"],
}
)
# ── Test connectivity ─────────────────────────────────────────────
@router.post("/test", response_model = ProviderTestResult)
async def test_provider(
payload: ProviderTestRequest,
_current_subject: str = Depends(get_current_subject),View on GitHub (pinned to 203007d190)
Solutions
- Re-enable the provider in the UI (or via PUT with is_enabled: true) and retry.
- Switch the request to a different enabled provider.
- Send an explicit encrypted_api_key if you intend to test the endpoint independently of the saved, disabled config.
Defensive patterns
Strategy: validation
Validate before calling
const target = providers.find(p => p.id === payload.provider_id);
if (target && !target.is_enabled && !payload.encrypted_api_key) {
throw new Error(`Provider '${target.display_name}' is disabled`);
} Type guard
function usableSavedProvider(p: { is_enabled: boolean } | undefined): boolean {
return !!p && p.is_enabled === true;
} Try / catch
try { await testConnectivity(payload); } catch (e) { if (e.status === 400 && /disabled/i.test(e.detail)) { promptEnableProvider(payload.provider_id); return; } throw e; } Prevention
- Filter saved-provider pickers to enabled rows.
- Offer to re-enable or switch provider on this specific 400.
When it happens
Trigger: Calling a connectivity test or inference endpoint with the provider_id of a provider toggled off in the UI; requests racing a user disabling the provider.
Common situations: Providers disabled during incident response or key rotation but still referenced by pinned client state; stale UI selections after an admin disables a shared provider.
Related errors
- load error: {p.get('error')}
- model load did not reach ready within {timeout_s}s
- load error: {p.get('error')}
- model load did not reach ready
- unknown family '{name}'
AI-assisted analysis of unslothai/unsloth@203007d190 (2026-08-15).
Data as JSON: /api/errors/8287462b9610da38.
Report an issue: GitHub.