Repository navigation
refactor(ai-gateway): share tracking field removal for direct BYOK providers - #7283
Closed
chrarnoldus wants to merge 2 commits into
Closed
chrarnoldus wants to merge 2 commits into
chrarnoldus wants to merge 2 commits into
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryThe refactor that extracts Files Reviewed (4 files)
Notes
Reviewed by deepseek-v4.1-flash · Input: 47.9K · Output: 5.8K · Cached: 391.6K Review guidance: REVIEW.md from base branch |
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.
Stacked on #7282. Merge that PR first; GitHub will then retarget this PR to
main.Summary
Adds
removeTrackingIdsnext toapplyTrackingIdsinproviderHash.ts. It removes the Chat Completions fields thatapplyTrackingIdsadds (prompt_cache_key,safety_identifier,user). OpenCode Go and NVIDIA direct BYOK now use it instead of their owndeletelists.Behavior change
NVIDIA previously removed only
safety_identifierandprompt_cache_key. It now also removesuser. That field is the same hashed user ID assafety_identifier, and the request already uses the user's own NVIDIA key, so nothing upstream needs it. #4803 said NVIDIA rejects gateway attribution fields and listeduseramong them. Onlysafety_identifierwas reported as rejected, so this should not change NVIDIA's responses.Verification
jestonproviderHash.test.tsand all suites inproviders/direct-byok/: 7 suites, 56 tests passed. The run used the web Jest config without the PostgreSQL worker setup, because Docker/PostgreSQL is not available in this environment. These suites do not use the database.pnpm --filter @kilocode/web-shared typecheck: passed.oxlintandoxfmton the changed files: clean.