Verify Fireworks API key once for CLI flows #407
+8
−7
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.
Motivation
Description
_ensure_account_idto accept an optionalapi_keyparameter and prefer an explicitly provided key over re-reading the environment by changingdef _ensure_account_id(api_key: Optional[str] = None) -> Optional[str]ineval_protocol/cli_commands/utils.py.api_keyinto_ensure_account_idfromcreate_rft_commandby calling_ensure_account_id(api_key=api_key)ineval_protocol/cli_commands/create_rft.py.FIREWORKS_API_KEYinupload_commandand pass it into_ensure_account_idandcreate_or_update_fireworks_secretineval_protocol/cli_commands/upload.pyso secret registration uses the same key.Testing
pre-commit run --all-files, but the check failed becausepre-commitwas not installed in the environment.Codex Task
Note
Ensures CLI flows consistently use a single resolved API key, avoiding mid-run environment drift.
utils._ensure_account_id(api_key)to accept an optionalapi_keyand prefer it over re-reading the environmentcreate_rft.py, pass the resolvedapi_keyinto_ensure_account_idupload.py, resolveFIREWORKS_API_KEYonce and pass it to_ensure_account_idandcreate_or_update_fireworks_secretso secret registration uses the same keyWritten by Cursor Bugbot for commit f93bd40. This will update automatically on new commits. Configure here.