Skip to content

fix(auth): use default label silently in non-interactive environments - #10475

Closed
ygd58 wants to merge 2 commits into
NousResearch:mainfrom
ygd58:fix/auth-add-non-interactive-label
Closed

fix(auth): use default label silently in non-interactive environments#10475
ygd58 wants to merge 2 commits into
NousResearch:mainfrom
ygd58:fix/auth-add-non-interactive-label

Conversation

@ygd58

@ygd58 ygd58 commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Closes #10468

Gate the input() call on sys.stdin.isatty(). Non-interactive environments use default_label silently instead of crashing with EOFError.

hermes auth add <provider> --auth-type api_key unconditionally called
input() for the label prompt, raising EOFError in non-interactive
environments (CI, pipes, scripts, automation).

The command already computed a deterministic fallback label (api-key-N)
so there is no need to block when stdin is not a TTY.

Fix: gate the input() call on sys.stdin.isatty(). When stdin is not
a TTY, fall back to default_label silently and proceed.

Fixes NousResearch#10468
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists area/auth Authentication, OAuth, credential pools labels Apr 26, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the fix, @ygd58! This is an automated hermes-sweeper review.

This change was independently merged the same day this PR was opened — the identical sys.stdin.isatty() guard is already on main at hermes_cli/auth_commands.py line 203, shipped in commit b750c720 as part of the batch fix for #10468.

Closing as implemented on main.

@teknium1 teknium1 closed this Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/auth Authentication, OAuth, credential pools P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: hermes auth add api_key crashes on non-interactive label prompt

3 participants