Skip to content
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

Adding command 'ai:models:attach' #19

Merged
merged 3 commits into from
Sep 26, 2024
Merged

Adding command 'ai:models:attach' #19

merged 3 commits into from
Sep 26, 2024

Conversation

sbosio
Copy link
Contributor

@sbosio sbosio commented Sep 26, 2024

Description

This PR implements the ai:models:attach command with tests according to the design outlined in the UX design doc.

How to test

Prepare your environment for testing

  • Fetch this branch.
  • Run yarn && yarn build.
  • Set the HEROKU_INFERENCE_ADDON to the production canary add-on via export HEROKU_INFERENCE_ADDON="inference-staging"

Actual testing

  • Verify that help looks ok: ./bin/run ai:models:attach --help
  • Create a test app: heroku apps:create test-cli-plugin-ai
  • Run ./bin/run ai:models:create claude-3-haiku -a test-cli-plugin-ai --as HAIKU_ORIGINAL to create a provisioned model.
  • Run heroku addons -a test-cli-plugin-ai and grab the add-on name for the provisioned model.
  • Run ./bin/run ai:models:attach <addon-name> -a test-cli-plugin-ai --as HAIKU_AGAIN and confirm that the command succeeds, creating another attachment to the model resource. Use heroku config -a test-cli-plugin-ai to confirm that config vars HAIKU_AGAIN_... share the exact same values as HAIKU_ORIGINAL_....
  • Run ./bin/run ai:models:create claude-3-haiku -a test-cli-plugin-ai --as HAIKU_AGAIN to create a new provisioned model reusing the attachment name. A confirmation step will be required to allow overwriting the config vars. Confirm by entering the app name and confirm that now HAIKU_ORIGINAL_KEY and HAIKU_AGAIN_KEY have different values.
  • Remove your test app to get rid of all add-ons: heroku apps:destroy -a test-cli-plugin-ai

SOC2 Compliance

GUS Work Item

@sbosio sbosio requested a review from a team as a code owner September 26, 2024 14:54
Copy link
Contributor

@k80bowman k80bowman left a comment

Choose a reason for hiding this comment

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

Works great! Just one suggestion, but it's not blocking.

@sbosio sbosio merged commit a3a9e01 into main Sep 26, 2024
6 checks passed
@sbosio sbosio deleted the sbosio/ai-models-attach branch September 26, 2024 19:43
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