Repository navigation
Sign in on first use; Client() reads the stored key; sync generated SDK (v1.0.17) - #233
Merged
Merged
Conversation
abonneth
force-pushed
the
antoine/auto-login
branch
from
October 5, 2026 13:02
ebe3598 to
1a41401
Compare
Co-authored-by: Cursor <cursoragent@cursor.com>
abonneth
force-pushed
the
antoine/auto-login
branch
from
October 5, 2026 14:06
1a41401 to
fdb9bb5
Compare
This was referenced Oct 5, 2026
adeprezh
approved these changes
Oct 5, 2026
# Conflicts: # tests/test_credentials.py
This was referenced Oct 5, 2026
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.
Made with Cursor
Note
Medium Risk
Changes how API keys are resolved for SDK and CLI (removed cwd
.env); auth behavior differs for interactive vs scripted use.Overview
Unifies API key discovery so
Client()/AsyncClient()pick up keys fromHAI_API_KEY, thenhai login’s file at~/.config/hai/.env(via sharedcredentials_path()), with a clearApiErrorwhen nothing is configured.CLI onboarding adds interactive sign-in on first use (Google or pasted key) before API commands, MCP install, and local bridges;
hai loginitself prompts for that choice. Non-interactive runs (--json, piped stdin) still fail fast without prompting.Credential resolution drops project-local
.envfor keys—CLI/SDK now use env,--api-key, and the global config file only. Docs and tests reflect the new precedence and flows. Release v1.0.17 (generated client version headers).Reviewed by Cursor Bugbot for commit 29a2ed0. Bugbot is set up for automated code reviews on this repo. Configure here.