diegosouzapw/OmniRoute · error
[InnerAI] /ai-models fetch failed (status=${err instanceof I
Error message
[InnerAI] /ai-models fetch failed (status=${err instanceof InnerAiModelsError ? err.status : "n/a"}) — falling back to synthetic model entry What it means
Error "[InnerAI] /ai-models fetch failed (status=${err instanceof InnerAiModelsError ? err.status : "n/a"}) — falling back to synthetic model entry" thrown in diegosouzapw/OmniRoute.
Source
Thrown at open-sse/executors/inner-ai.ts:595
const requestedModel = String(bodyObj.model ?? "").trim() || "gpt-4o";
let models: InnerAiModel[] = [];
try {
models = await resolveModels(token, deviceId, email, signal);
} catch (err) {
// Auth failures on /ai-models are surfaced explicitly so operators don't
// chase a "Inner.ai invalid model" downstream symptom when the real cause
// is the user's token expiring on the models endpoint.
if (err instanceof InnerAiModelsError && (err.status === 401 || err.status === 403)) {
return makeErrorResult(
err.status,
"Inner.ai /ai-models authentication failed — re-paste your token cookie",
body
);
}
// Non-auth failures (5xx, network): proceed with empty list and let the
// synthetic-model fallback try. Log so the operator sees the upstream blip.
// No `log` accessor in this executor scope — propagate via a runtime warning.
console.warn(
`[InnerAI] /ai-models fetch failed (status=${
err instanceof InnerAiModelsError ? err.status : "n/a"
}) — falling back to synthetic model entry`
);
}
const modelEntry: InnerAiModel = findModel(models, requestedModel) ?? {
id: "",
llm_model: requestedModel,
};
// Build message content from OpenAI messages array
const rawMessages = Array.isArray(bodyObj.messages) ? bodyObj.messages : [];
const { hasTools, requestedTools, effectiveMessages } = prepareToolMessages(
bodyObj,
rawMessages
);
const messages = effectiveMessages as Array<Record<string, unknown>>;View on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at open-sse/executors/inner-ai.ts:595 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/81ab56955ea62be2.
Report an issue: GitHub.