Default wpcom provider for Studio Code in Studio UI - #3696
Conversation
📊 Performance Test ResultsComparing d1a8562 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
|
Can we instead disable the "api key" provider entirely from Studio App and rely full on the .com provider? Alternative would be to surface the API KEY config in the app settings but I'm not sure it's necessary for a start. I think there's not much value for the moment to provide your own API KEY specially if we're still giving free access. |
@youknowriad do you mean to:
Do I understand your suggestion correctly? I think it doesn't make sense to show only 1 open to chose, like this: |
There was a problem hiding this comment.
Vova, thanks for working to add Anthropic API. I tested it and confirmed I was able to add my Anthropic API key and worked as expected.
In the testing instructions there is a small typo with the Studio home folder. The folder is hidden and requires a dot Open ~/.studio/cli.json.
| Before | After |
|---|---|
api-key-before.mp4 |
enter-anthropic-api-key.mp4 |
I agree with Riad and we can default to WPcom provider without asking the user, at least initially.
|
Yes, that was my suggestion, I'm hesitant about proposing the removal of the anthropic provider entirely from the the code command as well. (CLI). I think it's still useful for me to check whether an issue is due to our proxy or not, but other than that, I don't see it being useful to users right now. |
36d1d61 to
83953c0
Compare
|
@sejas @youknowriad done |
sejas
left a comment
There was a problem hiding this comment.
@nightnei, thanks for the change. I tested it and works as expected. Let's add or update existing unit tests, so we make sure we don't introduce regressions in the future.
I tested it by renaming my ~/.studio I went through the onboarding , logged in and tested the Studio Assistant/Code tab. I confirm it responded correctly instead of asking me to select the provider.
Also noting that we don't need to test if it has the token ready, because the UI limits the chat interface to authenticated users.
| const config = await readCliConfig(); | ||
| let showCapabilitiesOnConnect = ! config.aiProvider; | ||
|
|
||
| // Since Studio Code inside Studio UI is free right now - we decided to default to WordPress.com provider so far. |
There was a problem hiding this comment.
| // Since Studio Code inside Studio UI is free right now - we decided to default to WordPress.com provider so far. | |
| // Studio Code Desktop defaults to WordPress.com provider. |


Related issues
How AI was used in this PR
I figured out and wrote the code manually. AI just double checked the approach. Since AI was generating overengineered solutions.
Proposed Changes
In Studio UI we decided to default to wpcom provider, since it's free right now and there is no sense for users to use own keys.
Testing Instructions
npm run cli:buildnode apps/cli/dist/cli/main.mjs codenpm start~/.studio/cli.jsonaiProviderhito AssistantaiProviderhas valuewpcomin~/.studio/cli.json