santifer/career-ops · error · Error
All loaded models have been blacklisted this session.
Error message
All loaded models have been blacklisted this session.
What it means
Thrown by callOpenRouter() when the free-model list loaded successfully but every model in it has been added to the session blacklist (blacklistedModels Set). Blacklisting happens during rotation when a model persistently fails (e.g. repeated 429), so once all loaded models are blacklisted there is nothing left to try and the runner gives up for this session. The blacklist is persisted across runs via loadPersistedBlacklist().
Source
Thrown at openrouter-runner.mjs:263
} catch (e) {
if (e.name === 'AbortError') throw new Error(`Pinned model timed out after ${MODEL_TIMEOUT_MS / 1000}s`);
throw e;
} finally {
clearTimeout(timerId);
}
}
const models = await loadFreeModels();
let lastError;
if (models.length === 0) {
throw new Error(
'No free OpenRouter models are available. Model loading may have failed, or your account currently has no free models.'
);
}
// Build the active (non-blacklisted) model list in rotation order
const active = models.filter(m => !blacklistedModels.has(m));
if (active.length === 0) throw new Error('All loaded models have been blacklisted this session.');
for (let attempt = 0; attempt < active.length; attempt++) {
const model = active[(modelIndex % active.length + attempt) % active.length];
activeModel = model;
process.stdout.write(`[model] ${model} ... `);
try {
const body = JSON.stringify({
model,
messages: [
buildCachedSystemMessage(systemPrompt),
{ role: 'user', content: userMessage },
],
max_tokens: MAX_TOKENS,
});
const controller = new AbortController();
const timerId = setTimeout(() => controller.abort(), MODEL_TIMEOUT_MS);View on GitHub (pinned to 9b17a8ac97)
Solutions
- Clear the persisted blacklist file so blacklistedModels starts empty next run (check where loadPersistedBlacklist reads).
- Wait if the blacklisting was due to rate-limiting (429s), then retry so models get a fresh chance.
- Pin a specific model via CAREER_OPS_MODEL to bypass rotation entirely.
- Investigate why all models failed — if it was a network/key issue, fix that root cause so the next run doesn't re-blacklist.
Example fix
# before — all models blacklisted from a prior outage node openrunner-runner.mjs ... # throws: All loaded models have been blacklisted this session. # after — clear persisted blacklist and/or pin a model rm ~/.career-ops/blacklist.json # or wherever loadPersistedBlacklist reads # or export CAREER_OPS_MODEL=google/gemini-2.0-flash-exp:free
Defensive patterns
Strategy: validation
Validate before calling
// Clear a stale persisted blacklist before the run if appropriate
const fs = require('fs');
const blPath = require('os').homedir() + '/.career-ops/blacklist.json';
if (fs.existsSync(blPath)) fs.unlinkSync(blPath); // only if you accept the tradeoff Try / catch
try {
return await callOpenRouter(systemPrompt, userMessage);
} catch (e) {
if (e.message === 'All loaded models have been blacklisted this session.') {
// clear persisted blacklist and retry once
clearPersistedBlacklist();
return await callOpenRouter(systemPrompt, userMessage);
}
throw e;
} Prevention
- Clear the persisted blacklist when a prior outage (not model fault) caused mass blacklisting.
- Fix root causes (key/network) before retrying so models aren't re-blacklisted.
- Pin CAREER_OPS_MODEL to bypass rotation when the blacklist is exhausted.
- Reduce request rate to avoid 429-driven blacklisting.
When it happens
Trigger: models.length > 0, but active = models.filter(m => !blacklistedModels.has(m)) is empty — every model was blacklisted earlier in the session (or loaded from the persisted blacklist file). The `if (active.length === 0)` guard throws.
Common situations: A prior session blacklisted all models due to a transient network issue and the blacklist persisted; aggressive 429s from hitting OpenRouter too hard blacklisted everything; stale persisted blacklist file from an old outage.
Related errors
- No free OpenRouter models are available. Model loading may h
- [models] Failed to fetch free model list: ${reason}. Check t
- OPENROUTER_API_KEY not found. Copy .env.example to .env and
- HTTP ${resp.status}: ${t.slice(0, 120)}
- Timeout after ${MODEL_TIMEOUT_MS / 1000}s
AI-assisted analysis of santifer/career-ops@9b17a8ac97 (2026-08-13).
Data as JSON: /api/errors/167fc431bed2c338.
Report an issue: GitHub.