At the moment, unless --prefer-profile is passed, a BRAINTRUST_API_KEY in the env takes precedence over the logged-in profile.
This is probably a footgun.
Replace --prefer-profile with --prefer-env-api-key: if this flag is not passed, prefer the logged-in profile if it exists. If it is passed, prefer the BRAINTRUST_API_KEY if it is passed.
In both cases auth uses the non preferred method of authentication if the preferred one is not available.
Thanks to Alex Steere for surfacing this.
At the moment, unless
--prefer-profileis passed, a BRAINTRUST_API_KEY in the env takes precedence over the logged-in profile.This is probably a footgun.
Replace
--prefer-profilewith--prefer-env-api-key: if this flag is not passed, prefer the logged-in profile if it exists. If it is passed, prefer the BRAINTRUST_API_KEY if it is passed.In both cases auth uses the non preferred method of authentication if the preferred one is not available.
Thanks to Alex Steere for surfacing this.