Skip to content

feat: send X-Pplx-Integration header on Perplexity API requests - #1

Open
qirh wants to merge 1 commit into
ActiveInferenceInstitute:mainfrom
qirh:feat/perplexity-integration-header
Open

qirh wants to merge 1 commit into
ActiveInferenceInstitute:mainfrom
qirh:feat/perplexity-integration-header

Conversation

@qirh

@qirh qirh commented Oct 23, 2026

Copy link
Copy Markdown

Adds a static X-Pplx-Integration: symposium default header to the OpenAI-compatible client in PerplexityProvider, which always targets https://api.perplexity.ai. The OpenRouter provider is unchanged and does not receive the header.

This lets Perplexity attribute API traffic to Symposium. Authentication, models, request bodies and response handling are unchanged.

Tests: TestPerplexityProvider.test_init now asserts the client is built with the Perplexity base URL and the header, and TestOpenRouterProvider.test_init asserts OpenRouter gets no default_headers.

Verification (locally, matching CI):

  • ruff check src/ tests/ and ruff format --check src/ tests/ pass.
  • python -m pytest --no-header: 188 passed, 8 skipped, coverage 86.26% (gate 80%). The updated Perplexity assertion fails without the source change.

This branch has not been deployed

No deployments
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.

1 participant