Skip to content

Send custom user agent header on Studio Code AI requests - #4437

Open
sejas wants to merge 2 commits into
trunkfrom
add-wordpressstudio-user-agent
Open

Send custom user agent header on Studio Code AI requests#4437
sejas wants to merge 2 commits into
trunkfrom
add-wordpressstudio-user-agent

Conversation

@sejas

@sejas sejas commented Aug 4, 2026

Copy link
Copy Markdown
Member

How AI was used in this PR

AI was used to investigate where Studio Code's AI requests originate, implement the header change, and update the affected tests. The change was reviewed and verified locally.

Proposed Changes

  • Use custom user agent instead of default one.

Testing Instructions

  1. Run npm run cli:build && node apps/cli/dist/cli/main.mjs code and start a Studio Code chat on the WordPress.com provider.
  2. Confirm you get a 403 error. I'll whitelist the new UA before merging this PR.

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@sejas sejas self-assigned this Aug 4, 2026
@sejas
sejas marked this pull request as ready for review August 4, 2026 15:49
@sejas sejas changed the title Send WordPressStudio user agent header on Studio Code AI requests Send custom user agent header on Studio Code AI requests Aug 4, 2026
@wpmobilebot

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 2ce4476 vs trunk

app-size

Metric trunk 2ce4476 Diff Change
App Size (Mac) 1402.84 MB 1402.84 MB +0.00 MB ⚪ 0.0%

site-editor

Metric trunk 2ce4476 Diff Change
load 1064 ms 1057 ms 7 ms ⚪ 0.0%

site-startup

Metric trunk 2ce4476 Diff Change
siteCreation 7533 ms 7523 ms 10 ms ⚪ 0.0%
siteStartup 2865 ms 2874 ms +9 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

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.

2 participants