fix(use_aws): stop defaulting profile_name to 'default'#3735
Open
sandikodev wants to merge 1 commit intoaws:mainfrom
Open
fix(use_aws): stop defaulting profile_name to 'default'#3735sandikodev wants to merge 1 commit intoaws:mainfrom
sandikodev wants to merge 1 commit intoaws:mainfrom
Conversation
When no AWS profile named 'default' exists, the use_aws tool fails with 'Unable to locate credentials' because the model always fills in profile_name: "default" based on the tool description and examples. Two changes: 1. Update profile_name description to clarify it should only be set when the user explicitly names a profile — otherwise the AWS default credential chain (env vars, instance profile, etc) should be used. 2. Remove hardcoded profile_name: "default" from all tool examples so the model does not learn to always include it. The invoke logic already handles None correctly (no --profile flag is passed), so no runtime change is needed. Fixes aws#1045
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Closes #1045
Problem
When a user has no AWS profile named
default, theuse_awstool fails with:This happens because:
profile_namefield description says "Defaults to default profile if not specified" — the model reads this and always fills inprofile_name: "default"use_aws.rshardcode"profile_name": "default", reinforcing this behaviorThe invoke logic already handles
Nonecorrectly — whenprofile_nameisNone, no--profileflag is passed and the AWS default credential chain is used. The bug is entirely in the tool description and examples.Fix
Update
profile_namedescription to clarify it should only be set when the user explicitly names a profile:Remove
"profile_name": "default"from all tool examples so the model does not learn to always include it.No runtime code change needed.
Testing
cargo test -p chat_cliBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.