René's URL Explorer Experiment


Title: feat: set custom User-Agent header for API requests by chingjustwe · Pull Request #196 · lessweb/deepcode-cli · GitHub

Open Graph Title: feat: set custom User-Agent header for API requests by chingjustwe · Pull Request #196 · lessweb/deepcode-cli

X Title: feat: set custom User-Agent header for API requests by chingjustwe · Pull Request #196 · lessweb/deepcode-cli

Description: feat: set custom User-Agent header for API requests Problem When using deepcode-cli with custom/proxy API endpoints routed through Cloudflare or strict enterprise WAFs, requests fail with 403 Forbidden. The root cause is that the OpenAI SDK sends User-Agent: OpenAI/JS x.x.x by default, which proxy operators commonly block via WAF rules to prevent abuse of their OpenAI relay services. Changes New src/common/package-info.ts — central place that reads package.json once and exports APP_NAME and APP_VERSION as shared constants. src/common/openai-client.ts — override the User-Agent in the custom fetch wrapper from OpenAI/JS 6.35.0 to deepcode-cli/${version} (e.g. deepcode-cli/0.1.27). This references the same pattern as opencode: opencode/${version}. src/cli.tsx — use the shared APP_NAME / APP_VERSION from package-info.ts instead of local require("../package.json"). Verification deepcode --version outputs the correct version All 410 tests pass TypeScript typecheck, ESLint, Prettier all pass Build (npm run build) succeeds Related Issue #177

Open Graph Description: feat: set custom User-Agent header for API requests Problem When using deepcode-cli with custom/proxy API endpoints routed through Cloudflare or strict enterprise WAFs, requests fail with 403 Forbi...

X Description: feat: set custom User-Agent header for API requests Problem When using deepcode-cli with custom/proxy API endpoints routed through Cloudflare or strict enterprise WAFs, requests fail with 403 Forbi...

Opengraph URL: https://github.com/lessweb/deepcode-cli/pull/196

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:26c882f7-2762-babd-f6e1-f73ef93c8859
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB9DC:3C7B0B:22D904:2E8C6D:6A4D3364
html-safe-nonce4ac54f97a944284d94c0c88822077489b63e540cd7e02c0d8479da07a4bcb6df
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOURDOjNDN0IwQjoyMkQ5MDQ6MkU4QzZEOjZBNEQzMzY0IiwidmlzaXRvcl9pZCI6IjI2NTM1NDc5NjgyNTUwNDY1MDAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac35d3744701b7501e0eeb567cb5e10defe7e8aab28dc6c953a487e838b23c27f9
hovercard-subject-tagpull_request:3932061379
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/lessweb/deepcode-cli/pull/196/files
twitter:imagehttps://avatars.githubusercontent.com/u/13643747?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/13643747?s=400&v=4
og:image:altfeat: set custom User-Agent header for API requests Problem When using deepcode-cli with custom/proxy API endpoints routed through Cloudflare or strict enterprise WAFs, requests fail with 403 Forbi...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None92571a8944142227b7e19cd10918b1ddd06e5066c1ad5bc7e4769cf6140a87e6
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/lessweb/deepcode-cli git https://github.com/lessweb/deepcode-cli.git
octolytics-dimension-user_id118287711
octolytics-dimension-user_loginlessweb
octolytics-dimension-repository_id1223512305
octolytics-dimension-repository_nwolessweb/deepcode-cli
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1223512305
octolytics-dimension-repository_network_root_nwolessweb/deepcode-cli
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release56fc8347865a14e2ec811533d68f929cf4e0ec19
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/lessweb/deepcode-cli/pull/196/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Flessweb%2Fdeepcode-cli%2Fpull%2F196%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Flessweb%2Fdeepcode-cli%2Fpull%2F196%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=lessweb%2Fdeepcode-cli
Reloadhttps://github.com/lessweb/deepcode-cli/pull/196/files
Reloadhttps://github.com/lessweb/deepcode-cli/pull/196/files
Reloadhttps://github.com/lessweb/deepcode-cli/pull/196/files
Please reload this pagehttps://github.com/lessweb/deepcode-cli/pull/196/files
lessweb https://github.com/lessweb
deepcode-clihttps://github.com/lessweb/deepcode-cli
Notifications https://github.com/login?return_to=%2Flessweb%2Fdeepcode-cli
Fork 150 https://github.com/login?return_to=%2Flessweb%2Fdeepcode-cli
Star 1.7k https://github.com/login?return_to=%2Flessweb%2Fdeepcode-cli
Code https://github.com/lessweb/deepcode-cli
Issues 43 https://github.com/lessweb/deepcode-cli/issues
Pull requests 22 https://github.com/lessweb/deepcode-cli/pulls
Actions https://github.com/lessweb/deepcode-cli/actions
Projects https://github.com/lessweb/deepcode-cli/projects
Security and quality 0 https://github.com/lessweb/deepcode-cli/security
Insights https://github.com/lessweb/deepcode-cli/pulse
Code https://github.com/lessweb/deepcode-cli
Issues https://github.com/lessweb/deepcode-cli/issues
Pull requests https://github.com/lessweb/deepcode-cli/pulls
Actions https://github.com/lessweb/deepcode-cli/actions
Projects https://github.com/lessweb/deepcode-cli/projects
Security and quality https://github.com/lessweb/deepcode-cli/security
Insights https://github.com/lessweb/deepcode-cli/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Flessweb%2Fdeepcode-cli%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Flessweb%2Fdeepcode-cli%2Fissues%2Fnew%2Fchoose
chingjustwehttps://github.com/chingjustwe
lessweb:mainhttps://github.com/lessweb/deepcode-cli/tree/main
chingjustwe:feature/deepcode-user-agenthttps://github.com/chingjustwe/deepcode-cli/tree/feature/deepcode-user-agent
Conversation 1 https://github.com/lessweb/deepcode-cli/pull/196
Commits 2 https://github.com/lessweb/deepcode-cli/pull/196/commits
Checks 0 https://github.com/lessweb/deepcode-cli/pull/196/checks
Files changed 2 https://github.com/lessweb/deepcode-cli/pull/196/files
feat: set custom User-Agent header for API requests https://github.com/lessweb/deepcode-cli/pull/196/files#top
Show all changes 2 commits https://github.com/lessweb/deepcode-cli/pull/196/files
8b98837 add specific user agent for deepcode chingjustwe Jun 25, 2026 https://github.com/lessweb/deepcode-cli/pull/196/commits/8b9883718732a9c69bb595cc974230c8d704c4a6
2756358 Merge branch 'deepcode/main' into feature/deepcode-user-agent chingjustwe Jul 3, 2026 https://github.com/lessweb/deepcode-cli/pull/196/commits/2756358d257d2a728f22ef1eb67f5cc7b9d625f2
Clear filters https://github.com/lessweb/deepcode-cli/pull/196/files
Please reload this pagehttps://github.com/lessweb/deepcode-cli/pull/196/files
Please reload this pagehttps://github.com/lessweb/deepcode-cli/pull/196/files
openai-client.ts https://github.com/lessweb/deepcode-cli/pull/196/files#diff-d928b5d1d1bb6e97ca2ca259b9e46da2ba2614a240877e2d8f996dd5cd9cdd78
package-info.ts https://github.com/lessweb/deepcode-cli/pull/196/files#diff-dcd30ba3e045dcfe79cfde992b233116fdd8672c0ddbfda2c246113c646fb1ff
packages/core/src/common/openai-client.tshttps://github.com/lessweb/deepcode-cli/pull/196/files#diff-d928b5d1d1bb6e97ca2ca259b9e46da2ba2614a240877e2d8f996dd5cd9cdd78
View file https://github.com/lessweb/deepcode-cli/blob/2756358d257d2a728f22ef1eb67f5cc7b9d625f2/packages/core/src/common/openai-client.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/lessweb/deepcode-cli/pull/196/{{ revealButtonHref }}
https://github.com/lessweb/deepcode-cli/pull/196/files#diff-d928b5d1d1bb6e97ca2ca259b9e46da2ba2614a240877e2d8f996dd5cd9cdd78
https://github.com/lessweb/deepcode-cli/pull/196/files#diff-d928b5d1d1bb6e97ca2ca259b9e46da2ba2614a240877e2d8f996dd5cd9cdd78
https://github.com/lessweb/deepcode-cli/pull/196/files#diff-d928b5d1d1bb6e97ca2ca259b9e46da2ba2614a240877e2d8f996dd5cd9cdd78
https://github.com/lessweb/deepcode-cli/pull/196/files#diff-d928b5d1d1bb6e97ca2ca259b9e46da2ba2614a240877e2d8f996dd5cd9cdd78
packages/core/src/common/package-info.tshttps://github.com/lessweb/deepcode-cli/pull/196/files#diff-dcd30ba3e045dcfe79cfde992b233116fdd8672c0ddbfda2c246113c646fb1ff
View file https://github.com/lessweb/deepcode-cli/blob/2756358d257d2a728f22ef1eb67f5cc7b9d625f2/packages/core/src/common/package-info.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/lessweb/deepcode-cli/pull/196/{{ revealButtonHref }}
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.