Skip to content

Conversation

@k80bowman
Copy link
Contributor

Work item
#3320

Fixes a bug for the ai:models:call and ai:agents:call commands in heroku-cli-plugin-ai. These commands both have a --prompt flag which allows users to pass prompts to an AI model or agent. The newly-released prompt mode for the CLI also uses a --prompt flag, however, and it was overriding the --prompt flag in the AI plugin. This PR adds a condition such that prompt mode will only begin if the --prompt flag is passed without a value. It also removes --prompt as a help flag.

Testing

  1. Check out this branch and run yarn && yarn build
  2. If you don't already have the AI plugin installed, install it by running heroku plugins:install @heroku/plugin-ai
  3. You'll need to use a test app with an AI model installed (for internal team members, the app test-app-mia should work).
  4. Run the command ./bin/run ai:models:call MODEL_NAME -a APP_NAME --prompt "what is 2+2?". Verify that the response is an answer to the question.
  5. Run the command ./bin/run ai:models:call MODEL_NAME -a APP_NAME --prompt. Verify that you enter prompt mode.

@k80bowman k80bowman requested a review from a team as a code owner June 20, 2025 20:17
Copy link
Contributor

@justinwilaby justinwilaby left a comment

Choose a reason for hiding this comment

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

LGTM - works perfectly.

@k80bowman k80bowman temporarily deployed to AcceptanceTests June 20, 2025 20:52 — with GitHub Actions Inactive
@k80bowman k80bowman temporarily deployed to AcceptanceTests June 20, 2025 20:52 — with GitHub Actions Inactive
@k80bowman k80bowman merged commit 608e299 into main Jun 20, 2025
8 checks passed
@k80bowman k80bowman deleted the k80/prompt-fix branch June 20, 2025 21:05
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