-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get model availability form endpoint instead of computing it manually (…
…#2386) ## Changes Follow-up to sourcegraph/cody#5804 Instead of manually fetching account tier and computing model availability we instead receiving it from agent. This makes code simpler, ensures the same consitions are used by both Cody and JetBrains, and is less error prone. ## Test plan **Free user** 1. Login as free user 2. Open Edit Code popup 3. Ensure models are visible 4. Choose one without `Pro` label and do the edit -> it should success 5. Choose one with `Pro` label and do the edit -> it should open the account upgrade website **Pro use** 1. Login as pro user 2. Open Edit Code popup 3. Ensure models are visible, and there are no `Pro` labels anywhere 4. Choose model which was previously marked as pro on the free tier and do the edit -> it should success **Enterprise user** 1. Login as enterprise user 2. Open Edit Code popup 3. Ensure models are visible, and there are no `Pro` labels anywhere 4. Choose model which was previously marked as pro (if such exists) on the free tier and do the edit -> it should success Attention: This is different than the current behaviour, but I checked Cody and it allows for model selection for the enterprise accounts so I think JetBrains behaviour drifted there.
- Loading branch information
Showing
9 changed files
with
172 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.