Skip to content

fix: scope OpenRouter attribution to its gateway - #57

Draft
jatmn wants to merge 2 commits into
mainfrom
fix/openrouter-attribution-destination
Draft

fix: scope OpenRouter attribution to its gateway#57
jatmn wants to merge 2 commits into
mainfrom
fix/openrouter-attribution-destination

Conversation

@jatmn

@jatmn jatmn commented Aug 19, 2026

Copy link
Copy Markdown
Owner

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

  • cargo fmt
  • cargo test --locked http::tests (15 passed)
  • bash scripts/source-checks.sh
  • cargo test --locked (650 passed)
  • cargo build --locked
  • git diff --check

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.

jatmn added 2 commits August 18, 2026 20:33
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.
@jatmn jatmn self-assigned this Aug 19, 2026
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