langchain - 💡(How to fix) Fix feat(exa): add integration header and instant search type

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

  • The instant search type is already live in the Exa API and users who try type="instant" currently get a type error from the Literal.

Code Example

# 1. Integration header (in _utilities.py)
client.headers.set("x-exa-integration", "langchain-integration")

# 2. Add instant to type Literal (in retrievers.py and tools.py)
type: Optional[Literal["auto", "deep", "fast", "instant"]] = None
RAW_BUFFERClick to expand / collapse

Submission checklist

  • This is a feature request, not a bug report or usage question.
  • I added a clear and descriptive title that summarizes the feature request.
  • I used the GitHub search to find a similar feature request and didn't find it.
  • I checked the LangChain documentation and API reference to see if this feature already exists.
  • This is not related to the langchain-community package.

Package (Required)

  • langchain
  • langchain-openai
  • langchain-anthropic
  • langchain-classic
  • langchain-core
  • langchain-model-profiles
  • langchain-tests
  • langchain-text-splitters
  • langchain-chroma

Feature Description

Two small additive changes to the langchain-exa partner package:

  1. Integration header — adds x-exa-integration: langchain-integration header to all Exa API requests via client.headers.set(). This is for Exa's internal usage analytics and has no effect on request/response behavior.

  2. instant search type — Exa now supports 4 search types: auto, deep, fast, instant. The current Literal only has 3 (auto, deep, fast). Adding instant so users can pass it without type errors.

Use Case

These changes come from the Exa team to keep the LangChain integration aligned with the current Exa API.

  • The integration header lets Exa track usage from different integrations for analytics.
  • The instant search type is already live in the Exa API and users who try type="instant" currently get a type error from the Literal.

Proposed Solution

PR #37496 is ready with the implementation:

# 1. Integration header (in _utilities.py)
client.headers.set("x-exa-integration", "langchain-integration")

# 2. Add instant to type Literal (in retrievers.py and tools.py)
type: Optional[Literal["auto", "deep", "fast", "instant"]] = None

No function signatures changed, no defaults changed, no breaking changes. Both changes are additive only. CI passes.

Alternatives Considered

No alternatives — these are straightforward additive changes requested by the API provider.

Additional Context

I'm from the Exa team. Happy to answer any questions.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING