-
Notifications
You must be signed in to change notification settings - Fork 304
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
Send info if model is available together with the model #5804
Conversation
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.
I think the ModelTag
approach would be slightly cleaner but anyway lgtm
export interface ModelAvailabilityStatus { | ||
model: Model | ||
isModelAvailable: boolean | ||
} |
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.
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.
We already have model tags in the model.
But that does not solve our issue.
It's ok to know if model is available for free
or pro
user, but that in itself does not answer the question if current user is pro
or free
. That is something outside of the model itself.
…#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.
Changes
This change will allow clients to know if model is useable for them with of manually fetching account tier and computing model availability.
This makes client code simpler, ensures the same conditions are used by both Cody and clients, and is less error prone.
Test plan
This is only used in JetBrains currently.
Testplan on the JetBrains side:
sourcegraph/jetbrains#2386