Repository navigation
feat: send X-Pplx-Integration header on Perplexity API requests (carries #1 by @qirh) - #4
Merged
docxology merged 1 commit intoNov 2, 2026
Conversation
incorporates #1 by @qirh 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 receives no default_headers. Tests: TestPerplexityProvider.test_init asserts the client is built with the Perplexity base URL and the header; TestOpenRouterProvider.test_init asserts OpenRouter gets no default_headers. The Perplexity assertion fails without the source change. Validation: full suite 621 passed, 9 skipped, coverage 88.82% (gate 80%); ruff check and format clean. Co-authored-by: Saleh Alghusson <1331721+qirh@users.noreply.github.com> Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Carries forward #1 by @qirh as a commit of ours, so the change runs through CI here. The original PR's head branch was deleted upstream, so it cannot be merged directly; the content is unchanged.
Change
PerplexityProvider.__init__now builds its OpenAI-compatible client with a staticdefault_headers={"X-Pplx-Integration": "symposium"}alongside the existingbase_url="https://api.perplexity.ai". The OpenRouter provider is unchanged and receives nodefault_headers. Authentication, models, request bodies and response handling are untouched.The contributor's test assertions are kept as written:
TestPerplexityProvider.test_initasserts the exact client construction (API key, Perplexity base URL, header) andTestOpenRouterProvider.test_initassertsdefault_headersis absent.Validation
api.py).ruff checkandruff format --check: clean.Credit for the original change: @qirh (#1).