File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,9 +33,14 @@ print_recommended_warning() {
3333 local capacity=" $1 "
3434 local recommended_list
3535 recommended_list=$( IFS=, ; echo " ${RECOMMENDED_REGIONS[*]} " )
36+ primary_entry=" ${ALL_RESULTS[0]} "
37+ IFS=' |' read -r _ limit used available <<< " $primary_entry"
3638 echo -e " \n⚠️ You have entered a capacity of $capacity , which is less than the recommended minimum ($RECOMMENDED_TOKENS )."
3739 echo -e " 🚨 This may cause performance issues or unexpected behavior."
38- echo -e " ℹ️ Recommended regions (≥ $RECOMMENDED_TOKENS tokens available): $recommended_list "
40+ echo -e " 📊 Available quota in '$LOCATION ': $available , Required: $capacity "
41+ if [[ -n " $recommended_list " ]]; then
42+ echo -e " ℹ️ Recommended regions (≥ $RECOMMENDED_TOKENS tokens available): $recommended_list "
43+ fi
3944}
4045
4146update_env_and_parameters () {
195200echo -e " \n🔍 Checking quota in the requested region '$LOCATION '..."
196201if check_quota " $LOCATION " ; then
197202 if (( CAPACITY < RECOMMENDED_TOKENS )) ; then
203+ check_fallback_regions
198204 print_recommended_warning " $CAPACITY "
199205 prompt_yes_no " ❓ Proceed anyway? (y/n): " || {
200206 ask_for_location
You can’t perform that action at this time.
0 commit comments