can1357/oh-my-pi · error
Failed to fetch ClinePass models: HTTP ${response.status}
Error message
Failed to fetch ClinePass models: HTTP ${response.status} What it means
ClinePass discovery fetches the static models catalog and the live catalog in parallel and throws this when the static catalog response status is not ok. The status code is included to distinguish auth vs server vs not-found problems.
Source
Thrown at packages/catalog/src/provider-models/openai-compat.ts:2686
...(reasoning ? {} : { thinking: undefined }),
compat: { supportsReasoningEffort: false, wireModelIdMode: "raw" },
};
}
async function fetchClinePassModels(
fetchImpl: FetchImpl,
references: ReadonlyMap<string, ModelSpec<"openai-completions">>,
): Promise<ModelSpec<"openai-completions">[]> {
// The roster is authoritative for ids; the live reference catalog is a pure
// enrichment tier fetched alongside and tolerated away (offline → bundle).
const [response, liveCatalog] = await Promise.all([
withCatalogDiscoveryTimeout(5_000, signal =>
fetchImpl(CLINEPASS_MODELS_URL, { signal, headers: clinePassClientHeaders() }),
),
fetchClinePassLiveCatalog(fetchImpl),
]);
if (!response.ok) {
throw new Error(`Failed to fetch ClinePass models: HTTP ${response.status}`);
}
const payload: unknown = await response.json();
if (!isRecord(payload) || !Array.isArray(payload.clinePass)) {
throw new Error("ClinePass model catalog response is missing clinePass");
}
const models = new Map<string, ModelSpec<"openai-completions">>();
for (const entry of payload.clinePass) {
if (!isRecord(entry) || typeof entry.id !== "string") {
continue;
}
const wireId = entry.id.trim();
if (!wireId.startsWith("cline-pass/")) {
continue;
}
const id = toClinePassPublicModelId(wireId).trim();
if (!id) {
continue;View on GitHub (pinned to 9690622007)
Solutions
- Check the HTTP status in the message: 401/403 → fix the ClinePass API key; 404 → endpoint changed, update package
- Retry — the fetch has a 5s timeout that may have been hit upstream
- Verify network/proxy access to the ClinePass API host
- Update to the latest catalog version in case the endpoint URL changed
Defensive patterns
Strategy: retry
Try / catch
try {
models = await fetchClinePassModels();
} catch (err) {
const m = err instanceof Error ? err.message : "";
if (/ClinePass models: HTTP 4\d\d/.test(m)) {
logger.error("ClinePass auth rejected; refresh API key", { status: m });
} else if (m.includes("ClinePass models: HTTP")) {
logger.warn("ClinePass transient error; retrying", { cause: err });
return retry();
}
throw err;
} Prevention
- Keep the ClinePass API key valid and rotated
- Check the status code in the message before choosing a fix
- Update the catalog package when ClinePass changes endpoints
When it happens
Trigger: GET CLINEPASS_MODELS_URL (with a 5s catalog timeout) returns 4xx/5xx — e.g. 401 for a bad/expired key, 404 if the endpoint moved, 5xx on outage.
Common situations: Expired ClinePass API key, ClinePass API URL change after a provider update, corporate proxy blocking the request, transient server outage.
Understand the failure class
Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.
Related errors
- V2 remote compaction failed (${response.status} ${response.s
- sso-role
- HTTP request failed. status=${response.status}; url=${url};
- ${response.status} ${response.statusText}: ${text}
- HTTP ${response.status} from ${baseUrl}/api/tags
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/4737f2ac4e8268d6.
Report an issue: GitHub.