Skip to content

Preserve caller parameters and per-client API keys - #46

Draft
Kayvan-Zahiri wants to merge 1 commit into
serpapi:masterfrom
Kayvan-Zahiri:codex/preserve-caller-search-parameters
Draft

Kayvan-Zahiri wants to merge 1 commit into
serpapi:masterfrom
Kayvan-Zahiri:codex/preserve-caller-search-parameters

Conversation

@Kayvan-Zahiri

Copy link
Copy Markdown

Reusing a parameter dictionary across clients currently carries the first client's injected API key into later requests. Keyword overrides also change the caller's dictionary.

Copy parameters before applying overrides in the four public methods and before injecting the default key in HTTPClient.request. Explicit caller-provided keys retain precedence.

Adds 14 offline regression cases covering all four public methods, keyword overrides, direct requests, and explicit keys. Requests are serialized normally and intercepted before network I/O.

Validation: 9 failures and 5 passes before the fix; 76 passes and 41 deselected afterward across the new tests and the six offline test files listed in CONTRIBUTING.md (-k 'not live'). git diff --check passes. No live API calls were made.

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