Conversation
edwinpav
commented
Apr 14, 2026
| to retrieve your API keys. **Only** optional when ``limited_access_key`` is provided. | ||
| api_key: One of ``api_key`` or ``limited_access_key`` must be provided; you cannot pass | ||
| both. For standard Scale API key authentication, pass the key here. Follow `this guide | ||
| <https://scale.com/docs/api-reference/authentication>`_ to retrieve API keys. If you omit |
Contributor
Author
There was a problem hiding this comment.
Update link because the old one is outdated and returns a 404 now
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.
Summary
Resolves https://linear.app/scale-epd/issue/DE-7532 and https://linear.app/scale-epd/issue/DE-7605
Enforces mutually exclusive authentication for the Nucleus Python SDK: callers must use either a standard Scale API key (
api_key/NUCLEUS_API_KEY) or a Nucleus-only limited access key (limited_access_key), not both. This release also includes doc / Sphinx fixes, a small import cleanup, and v0.17.14.TODO:
Behavior changes
NucleusClient: RaisesValueErrorif both credential paths apply (e.g. both parameters, orNUCLEUS_API_KEYin the environment together withlimited_access_key).Connection: RaisesValueErrorif Basic Auth andx-limited-access-keywould both be sent (defense in depth).nu): Raises if bothNUCLEUS_API_KEYandNUCLEUS_LIMITED_ACCESS_KEYare set.conftest.py): Raises if bothNUCLEUS_PYTEST_API_KEYandNUCLEUS_PYTEST_LIMITED_ACCESS_KEYare set.scripts/load_test.py: Raises if bothapi_keyandlimited_access_keyresolve from flags/env.Migration: Anyone who previously passed both keys (or had
NUCLEUS_API_KEYset while usinglimited_access_key) must pick one mode and unset the other.Documentation & Sphinx
NucleusClient: Class docstring updated (auth rules, examples, auth doc link).list_jobs,get_job,get_slice,delete_slice,download_pointcloud_task,make_request,valid_dirname,create_datasetmetadata schema,create_launch_model/create_launch_model_from_dirwith.. note::blocks and directory example).docs/conf.py: Droppedinherited-membersfrom autoapi (avoids pydanticBaseModeldoc RST issues); addedsuppress_warnings = ["toc.not_included"]for orphan autoapi pages.Remaining 13 api doc build warnings resolved
After (left) vs Before (right) docs
Other
CHANGELOG.md: Entry for 0.17.14.pyproject.toml: Version 0.17.14.Greptile Summary
This PR enforces mutually exclusive authentication (
api_keyvslimited_access_key) acrossNucleusClient,Connection, the CLI, conftest, and the load-test script, and includes a batch of Sphinx/docstring fixes. The validation logic is consistent and correct — theeffective_basic_keycomputation inNucleusClient.__init__correctly accounts for theNUCLEUS_API_KEYenvironment variable, and the defense-in-depth check inConnectionprotects direct callers who bypassNucleusClient.Confidence Score: 5/5
Safe to merge — validation logic is correct across all entry points, no P0/P1 issues found.
All remaining findings are P2 style suggestions (exception type inconsistency between CLI and SDK layers). The core mutual-exclusion logic is correctly implemented, the env-var fallback is handled properly, and the defense-in-depth check in Connection is appropriate.
No files require special attention.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[NucleusClient init] --> B{api_key arg provided?} B -- yes --> C[effective = api_key arg] B -- no --> D[effective = NUCLEUS_API_KEY env var] C --> E{limited_access_key AND effective both truthy?} D --> E E -- yes --> F[raise ValueError - mutually exclusive] E -- no --> G{api_key is None AND limited_access_key?} G -- yes --> H[self.api_key = None, add limited-access header] G -- no --> I[self.api_key from _set_api_key, no header] H --> J[Connection init] I --> J J --> K{both api_key AND limited-access header present?} K -- yes --> L[raise ValueError - defense in depth] K -- no --> M{neither auth present?} M -- yes --> N[raise NoAPIKey] M -- no --> O[Connection ready]Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "Undo removal of unused imports" | Re-trigger Greptile