fix: scope OpenRouter attribution to its gateway - #57
Draft
jatmn wants to merge 2 commits into
Draft
Conversation
Only attach OpenRouter attribution headers when the configured provider targets openrouter.ai, preserving explicit headers for other providers. Correct attribution documentation and cover direct, lookalike, and override destinations.\n\nValidation: bash scripts/source-checks.sh; cargo test --locked; cargo build --locked; git diff --check.
Normalize a terminal DNS dot before applying OpenRouter attribution and cover the valid fully qualified hostname form.\n\nValidation: cargo fmt; cargo test --locked http::tests; bash scripts/source-checks.sh; cargo test --locked; cargo build --locked; git diff --check.
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.
Summary
OpenRouter attribution is request metadata, not a usage-reporting API. This branch limits automatic attribution headers to requests whose configured destination is openrouter.ai, including a trailing-dot hostname. Explicit provider headers remain unchanged.
Only traffic routed through OpenRouter can appear in its app rankings and analytics.
Validation
Review
Final reviewed SHA: 274564d.
The final base-to-head diff completed the full independent two-wave review campaign after resolving a trailing-dot hostname edge case.