Skip to content

feat(q): builderid "paid tier" flow #1197

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

Merged
merged 8 commits into from
Jun 9, 2025
Merged

feat(q): builderid "paid tier" flow #1197

merged 8 commits into from
Jun 9, 2025

Conversation

justinmk3
Copy link
Contributor

@justinmk3 justinmk3 commented Apr 29, 2025

Problem

When "free tier" limit is reached, there are no clear next steps.

Solution

  • Handle "free tier exceeded" throttling/quota service error: show a chat card with an Upgrade button, and an IDE message.
  • Handle the "Upgrade" button event.
    • Wait for upgrade to complete, show a message on success.
  • Handle the aws/chat/manageSubscription command, so clients can invoke the "Upgrade" codepath.

Related IDE changes:

Todo

  1) MynahUI
       openTab
         should create a new tab with welcome messages if tabId not passed and previous messages not passed:
     AssertError: expected getChatItems to be called once and with exact arguments 

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@justinmk3 justinmk3 changed the title feat: paid tier feat(q paid tier): handle "free tier exceeded" throttle/quota response Apr 29, 2025
return response
throw e
} finally {
this.inflightRequests.delete(controller)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a potential bug? If the service returns an error (which throws), the inflightRequests would not get updated.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, indeed I think we were not handling service errors. Thanks for working on the fix.

@justinmk3 justinmk3 force-pushed the paidtier branch 4 times, most recently from cab289b to 939e748 Compare May 7, 2025 22:57
@justinmk3 justinmk3 force-pushed the paidtier branch 11 times, most recently from ef043b3 to 1968d12 Compare May 15, 2025 23:16
@justinmk3 justinmk3 force-pushed the paidtier branch 7 times, most recently from b40cd74 to 027e119 Compare May 22, 2025 17:05
@justinmk3 justinmk3 force-pushed the paidtier branch 2 times, most recently from 4d7efa4 to 2ec3dfc Compare May 28, 2025 19:35
@justinmk3 justinmk3 changed the title feat(q paid tier): handle "free tier exceeded" throttle/quota response feat(q): builderid "paid tier" flow May 29, 2025
@justinmk3 justinmk3 force-pushed the paidtier branch 2 times, most recently from 19e77d8 to 99f1e7c Compare June 2, 2025 18:41
@@ -390,6 +390,10 @@ export const createChat = (
promptInputOptionChange: (params: PromptInputOptionChangeParams) => {
sendMessageToClient({ command: PROMPT_INPUT_OPTION_CHANGE_METHOD, params })
},
promptInputButtonClick: params => {
// TODO
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whats this TODO for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requires protocol changes in https://github.com/aws/language-server-runtimes to integrate the changes from aws/mynah-ui#322 .

Not a blocker for this PR.

@leigaol
Copy link
Contributor

leigaol commented Jun 3, 2025

Some high level questions:

  1. Does this apply to all IDEs or just VS Code?
  2. Does this require relevant IDE changes? What happens to the old IDE extensions that installs this language server?

If you want to merge it before any launch decision is made, you need a feature flag. then by launch date, disable the feature flag .

@justinmk3
Copy link
Contributor Author

Does this apply to all IDEs or just VS Code?

All IDEs.

Does this require relevant IDE changes? What happens to the old IDE extensions that installs this language server?

The only (optional) change needed in IDEs is if they add a Manage Subscriptions menu item. That is planned for each IDE, but not required.

@justinmk3 justinmk3 force-pushed the paidtier branch 3 times, most recently from f239192 to f27737f Compare June 5, 2025 00:35
})

if (!isFreeTierLimitUi) {
// TODO: how to set a warning icon on the user's failed prompt?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a launch blocking TODO?

Copy link
Contributor Author

@justinmk3 justinmk3 Jun 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a cosmetic issue that will need to be done as a followup. May require changes to mynah-ui.

@leigaol
Copy link
Contributor

leigaol commented Jun 9, 2025

can you fix the CI?

justinmk3 added 8 commits June 9, 2025 17:07
1. get latest service models:
    - `client/token/bearer-token-service.json`
        - from: `<AWSVectorConsolasRuntimeServiceModel>/aws-sdk-external-2022-11-11/c2j/codewhispererruntime-2022-11-11.json`
    - `client/sigv4/service.json`
        - from: `<AWSVectorConsolasRuntimeServiceModel>/aws-sdk-external/c2j/codewhisperer-2024-10-25.json`
2. !!NOTE!! remove line `"signatureVersion": "bearer",` from `bearer-token-service.json`
3. restore the script that was mysteriously reverted in
   aws#161 without any
   documented alternative...
4. run `./node_modules/.bin/ts-node server/aws-lsp-codewhisperer/script/genclient.ts`

service model version: 1.0.20901.0
- control MynahUI from Flare server
@justinmk3 justinmk3 enabled auto-merge (rebase) June 9, 2025 21:19
@justinmk3 justinmk3 disabled auto-merge June 9, 2025 22:03
@justinmk3 justinmk3 merged commit d25bcb6 into aws:main Jun 9, 2025
6 checks passed
@justinmk3 justinmk3 deleted the paidtier branch June 9, 2025 22:04
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.

5 participants