Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Adding host def
  • Loading branch information
whitead committed Nov 2, 2025
commit 068c79e3005b13b9ab9d8b7bec56d58302a171d0
3 changes: 2 additions & 1 deletion src/paperqa/clients/openalex.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
from .client_models import DOIOrTitleBasedProvider, DOIQuery, TitleAuthorQuery
from .exceptions import DOINotFoundError

OPENALEX_BASE_URL = "https://api.openalex.org"
OPENALEX_HOST = "api.openalex.org"
Copy link

Copilot AI Nov 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The newly introduced OPENALEX_HOST constant appears to be unused outside of constructing OPENALEX_BASE_URL. If the intent is to allow host configuration via environment variables (similar to OPENALEX_API_REQUEST_TIMEOUT), consider adding support for this. Otherwise, this intermediate constant adds unnecessary indirection without clear benefit. Recommend either removing it and reverting to the original single-line definition, or documenting its purpose if it's intended for future extensibility.

Copilot uses AI. Check for mistakes.
OPENALEX_BASE_URL = f"https://{OPENALEX_HOST}"
OPENALEX_API_REQUEST_TIMEOUT = float(
os.environ.get("OPENALEX_API_REQUEST_TIMEOUT", "10.0")
) # seconds
Expand Down
Loading