can1357/oh-my-pi · error · ParallelApiError
Parallel credentials not found. Set PARALLEL_API_KEY or logi
Error message
Parallel credentials not found. Set PARALLEL_API_KEY or login with 'omp /login parallel'.
What it means
Thrown by searchWithAuthStorage in the Parallel provider when authStorage.getApiKey returns no credential for 'parallel'. Parallel search requires either the PARALLEL_API_KEY environment variable or an interactive login via 'omp /login parallel'.
Source
Thrown at packages/coding-agent/src/web/search/providers/parallel.ts:83
}
return policy.include_domains || policy.exclude_domains || policy.after_date ? policy : undefined;
}
async function searchWithAuthStorage(
objective: string,
queries: string[],
params: {
signal?: AbortSignal;
timeoutMs?: number;
fetch?: FetchImpl;
},
authStorage: AuthStorage,
sessionId?: string,
sourcePolicy?: ParallelSourcePolicy,
): Promise<ParallelSearchResult> {
const apiKey = await authStorage.getApiKey("parallel", sessionId, { signal: params.signal });
if (!apiKey) {
throw new ParallelApiError(
"Parallel credentials not found. Set PARALLEL_API_KEY or login with 'omp /login parallel'.",
);
}
// Drive the (already-present) credential through the central force-refresh /
// sibling-rotate retry policy. The `ParallelApiError` thrown below carries a
// `statusCode`, which `withAuth`'s default classifier reads to detect a
// retryable 401 / usage-limit.
const keyOrResolver: ApiKey = authStorage.resolver("parallel", { sessionId });
return withAuth(
keyOrResolver,
async key => {
const response = await (params.fetch ?? fetch)(PARALLEL_SEARCH_URL, {
method: "POST",
headers: {
Accept: "application/json",
"Content-Type": "application/json",
"x-api-key": key,View on GitHub (pinned to 9690622007)
Solutions
- Set PARALLEL_API_KEY in the environment before running the search
- Run 'omp /login parallel' to store credentials interactively
- Verify the env var is visible to the omp process (export it in the same shell/profile)
- Check the auth storage for a stale/expired entry and re-login
Example fix
// before
const results = await searchParallel({ query }); // no credential
// after
// shell:
export PARALLEL_API_KEY=... // or: omp /login parallel
const results = await searchParallel({ query }); Defensive patterns
Strategy: validation
Validate before calling
// ensure credential before calling
if (!process.env.PARALLEL_API_KEY && !isLoggedIn('parallel')) {
throw new Error('Set PARALLEL_API_KEY or run: omp /login parallel');
} Try / catch
try {
const res = await searchParallel({ query, authStorage });
} catch (err) {
if (err instanceof ParallelApiError && err.message.includes('credentials not found')) {
// guide user to 'omp /login parallel' or export PARALLEL_API_KEY
} else throw err;
} Prevention
- Export PARALLEL_API_KEY in shell profiles and CI secrets
- Run 'omp /login parallel' on new machines
- Confirm the env var is present in the actual process environment, not just the parent shell
- Check auth storage entries when switching sessions or profiles
When it happens
Trigger: Any Parallel web search where no PARALLEL_API_KEY is set in the environment and no stored credential exists for the given sessionId (including force-refresh finding nothing to refresh).
Common situations: Fresh install without login; CI/containers without the env var exported; key stored under a different session; PARALLEL_API_KEY set in one shell but not the process running omp.
Understand the failure class
Background: "API key is required" / "API key not found" / "No API key was set": the missing-api-key error family across 16 libraries — this error's family across 16 libraries.
Related errors
- No image API credentials found. Connect a Codex (ChatGPT) su
- Kimi search credentials not found. Kimi web search uses the
- credentials ${usernameKey} and ${passwordKey} must be config
- No xAI credentials. Run /login → xAI Grok OAuth (SuperGrok o
- No API key available for ${model.provider}/${model.id}. Conf
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/86c4628e38057d51.
Report an issue: GitHub.