Repository navigation
fix(google): use header authentication by default - #1139
Merged
Merged
Conversation
This was referenced Oct 22, 2026
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.
Google requests sent API credentials in URL query parameters, exposing them to URL-based proxy/access logs and request telemetry. Only streaming requests supported optional header authentication; non-streaming requests and cached-content operations always used query authentication.
Use
x-goog-api-keyby default for generation, streaming, single/batch embeddings, image generation, and all Google AI Studio cached-content operations. Keep query authentication available throughgoogle_auth_header: false. Update the provider documentation and guide.Non-streaming fixture replay compares the method, URL, and request body, while streaming replay selects the named fixture. Ignore only Google's authentication query parameter when comparing URLs; headers are already excluded from comparison. Preserve all other request comparisons. Add Google header redaction to streaming metadata, fixture capture, and billing test artifacts. No recorded fixtures were changed or re-recorded.
Verification:
mix format: passed.mix compile --warnings-as-errors: passed.mix credo --strict: passed; no issues across 626 source files.mix test: 5,366 passed, 11 skipped, 240 excluded.mix test --only provider:google: failed; 43 passed, 11 failed, 4 skipped, 5,559 excluded. Four failures are missing fixtures (embedding basic/batch and context append), five are existing maxOutputTokens mismatches, one is responseSchema.propertyOrdering, and one is candidateCount. The same 11 failures reproduce in the four affected coverage modules after loading the original Google provider and fixture matcher from the branch baseline in memory (5 passed, 11 failed). The default full suite excludes coverage tests. No authentication URL mismatches remain.The initial
mix compilefailed because copied dependencies differed frommix.lock;mix deps.getfetched the locked versions without changing the lockfile, and compilation then passed. No live requests were run.Compatibility decision: proxies that only accept query authentication now require an explicit opt-out. For provider calls use
provider_options: [google_auth_header: false]; forGoogle.CachedContentcalls passgoogle_auth_header: falsedirectly. Maintainers should decide how to coordinate this default change and the existing coverage-fixture failures for release.🤖 Generated with Codex and Claude Code