feat(sdk): load API key from notte-cli keyring - #901
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (6)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. WalkthroughThe SDK adds Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This change adds SDK API-key fallback to the notte-cli keyring with caching and documentation; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
| Filename | Overview |
|---|---|
| packages/notte-sdk/src/notte_sdk/auth.py | Adds environment mapping, CLI credential decoding, platform keyring retrieval, and API-key precedence resolution with best-effort error handling. |
| packages/notte-sdk/src/notte_sdk/endpoints/base.py | Resolves the server URL before authentication and caches one resolved credential across endpoint clients belonging to the same root client. |
| packages/notte-sdk/pyproject.toml | Adds keyring as a required SDK dependency, with the corresponding lockfile update. |
| tests/sdk/test_sdk_auth.py | Covers environment labels, CLI secret decoding, environment and legacy key lookup, precedence, and per-client caching. |
| tests/sdk/test_client.py | Isolates missing-key initialization from host keyring state while retaining AuthenticationError coverage. |
| packages/notte-sdk/README.md | Documents the new keyring fallback when explicit and environment credentials are absent. |
Reviews (1): Last reviewed commit: "feat(sdk): load API key from CLI keyring" | Re-trigger Greptile
Summary
NOTTE_API_KEY, then the notte-cli system keyringTesting
uv run ruff check packages/notte-sdk/src/notte_sdk/auth.py packages/notte-sdk/src/notte_sdk/endpoints/base.py tests/sdk/test_sdk_auth.py tests/sdk/test_client.pyuv run basedpyright packages/notte-sdk/src/notte_sdk/auth.py packages/notte-sdk/src/notte_sdk/endpoints/base.pyuv run pytest -q tests/sdk/test_sdk_auth.py tests/sdk/test_client.py tests/sdk/test_base_client_version_check.py(48 passed)NOTTE_API_KEYunset confirmedNotteClient()loads the notte-cli credentialNeed help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
New Features
notte auth login.NOTTE_API_KEY, then the system keyring.Bug Fixes
Documentation