Skip to content

docs: list OPENALEX_API_KEY in .env.example so the keyed budget path is discoverable - #353

Closed
fanfyh wants to merge 1 commit into
Companion-Inc:mainfrom
fanfyh:docs-openalex-env-key
Closed

fanfyh wants to merge 1 commit into
Companion-Inc:mainfrom
fanfyh:docs-openalex-env-key

Conversation

@fanfyh

@fanfyh fanfyh commented Oct 17, 2026

Copy link
Copy Markdown

What

Adds OPENALEX_API_KEY to .env.example (one comment + one line), next to the existing NCBI_API_KEY precedent.

Why

The bundled OpenAlex tool reads process.env.OPENALEX_API_KEY (see extensions/research-tools/science-database-openalex.ts), and its rate-limit diagnostics already advise setting it — but .env.example never listed the variable, so the keyed budget path was undiscoverable and sessions silently ran on the anonymous budget.

We hit this in production on a long headless research run: without the key, one OpenAlex request got 429 with Retry-After: 22439s (~6.2 hours), the run stalled and produced zero deliverable. The free key from https://openalex.org raises rate limits, and listing it here is the cheapest fix.

Scope

Docs only — no code change.

The bundled OpenAlex tool reads process.env.OPENALEX_API_KEY
(science-database-openalex.ts) and its rate-limit diagnostics tell users
to set it, but .env.example did not list the variable, so the keyed
budget path was undiscoverable and runs silently fell back to the
anonymous budget.

We hit this in production: a headless research session without the key
received a 429 with Retry-After: 22439s (~6.2h) and stalled with zero
deliverable. Listing the variable next to the existing NCBI_API_KEY
precedent makes the free keyed path discoverable. No code change.
@advaitpaliwal

Copy link
Copy Markdown
Collaborator

Thanks! Cherry-picked into main with your authorship (83aa148), with the key URL changed to https://openalex.org/settings/api to match the tool's own hint. Ships in 0.5.49.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants