Skip to content

fix: vertexai dropping kubectl#450

Merged
droot merged 2 commits into
mainfrom
fix/vertexai-kubectl-prefix
Aug 1, 2025
Merged

fix: vertexai dropping kubectl#450
droot merged 2 commits into
mainfrom
fix/vertexai-kubectl-prefix

Conversation

@ShubyM
Copy link
Copy Markdown
Collaborator

@ShubyM ShubyM commented Aug 1, 2025

Modifies system prompt to fix #447. If anyone has better ways of evaluating if this works 100 percent of the time please let me know!

@ShubyM ShubyM changed the title fix: add examples to system prompt fix: vertexai dropping kubectl Aug 1, 2025
- ✅ Correct: `kubectl get pods --namespace=default`
- ❌ Incorrect: `kubectl --namespace=default get pods`
- This ensures commands are properly recognized and filtered by the system.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This change moves this command structure guidelines block in the if EnableToolUseShim block and also in between the json formatting instructions. That means it will definitely affect the default tool calling (non-shim case).

Is it intentional ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Nope fixed!

@mikebz mikebz requested a review from Copilot August 1, 2025 21:23
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses issue #447 by fixing a problem where vertexai was dropping the kubectl prefix from generated commands. The change modifies the system prompt template to provide clearer and more explicit guidance about proper kubectl command formatting.

Key changes:

  • Added explicit examples showing correct vs incorrect kubectl command formats
  • Reinforced the requirement that all kubectl commands must include the kubectl prefix
  • Added a reminder in the guidelines section about proper kubectl command structure
Comments suppressed due to low confidence (1)

@droot droot merged commit e043b97 into main Aug 1, 2025
6 checks passed
@ShubyM ShubyM deleted the fix/vertexai-kubectl-prefix branch August 12, 2025 00:09
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.

[Bug]: vertexai llm provider invokes kubectl tool without the kubectl prefix

3 participants