You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: manage_api_keys.ps1 CL token detection and OpenAI error UX
Two fixes:
1. CourtListener token showed 'Not set' even when stored:
Get-CourtListenerToken/Set-CourtListenerToken ran Python with
Path('src') as a relative path. If CWD was not the project root,
the import failed silently (stderr suppressed), returning null.
Fixed by wrapping all Python calls with Push-Location/Pop-Location
to the project directory.
2. OpenAI key 'data is invalid' / confusing 'Not set' display:
The .openai_api_key file was written by an older script using a
different DPAPI entropy scheme (USPTO-style fixed entropy). DPAPI
decryption fails for incompatible files.
Fixed by:
- Suppressing the internal [WARN] during status display (-Silent)
- Showing '[!!] File exists but cannot be decrypted (incompatible
format) - use option [2] to re-enter' instead of 'Not set'
- Same pattern applied to Mistral for consistency
Same Push-Location fix applied to Invoke-MigrateCourtListenerToken.
0 commit comments