-
Notifications
You must be signed in to change notification settings - Fork 46
Remove OpenAI bots from UA sniffing #3125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-Authored-By: Claude Sonnet 4.5 (1M context) <[email protected]>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe PR removes support for detecting two specific LLM bot User-Agents (ChatGPT-User and GPTBot) by deleting their regex patterns from Nginx bot-detection configuration and removing corresponding test cases, reducing the test suite from 23 to 20 assertions. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@bin/assert-content-negotiation.sh`:
- Line 155: The final echo message currently hardcodes "✅ All 20 tests passed!"
which is incorrect because there are 21 run_test invocations; update the echo in
bin/assert-content-negotiation.sh (the line with echo "✅ All 20 tests passed!")
to reflect the correct count (e.g., "✅ All 21 tests passed!") or, better,
compute the total dynamically from the run_test calls and print that number so
the message always matches the actual number of tests.
Co-Authored-By: Claude Sonnet 4.5 (1M context) <[email protected]>
9489fe8 to
7c5c154
Compare
Summary
Context
We likely tripped OpenAI's stricter fetch consistency checks because we historically served different content based on UA (even though we also support proper content negotiation). OpenAI compares responses across multiple fetch modes (direct, cached, headless), and UA-based divergence can cause certain URLs to be excluded from their sandbox fetcher — even though we still see ChatGPT traffic elsewhere. Excluding OpenAI bots from UA sniffing (and letting Accept headers / explicit .md URLs decide) should resolve this over time; this also explains why we don't see the same issue with Claude or others.
🤖 Generated with Claude Code
Summary by CodeRabbit
Tests
Chores
✏️ Tip: You can customize this high-level summary in your review settings.