Skip to content

Add browser-based auth and improved error handling for model loading#798

Open
brendan-priorlabs wants to merge 8 commits intomainfrom
brendan/hf-ungating
Open

Add browser-based auth and improved error handling for model loading#798
brendan-priorlabs wants to merge 8 commits intomainfrom
brendan/hf-ungating

Conversation

@brendan-priorlabs
Copy link
Contributor

No description provided.

@brendan-priorlabs brendan-priorlabs requested a review from a team as a code owner February 24, 2026 21:11
@brendan-priorlabs brendan-priorlabs requested review from alanprior and removed request for a team February 24, 2026 21:11
@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@brendan-priorlabs brendan-priorlabs removed the request for review from alanprior February 24, 2026 21:11
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a browser-based authentication flow for license acceptance, which is a significant feature addition. The implementation is robust, covering various user scenarios and including a fallback to manual token entry. The changes are well-tested with a new suite of unit tests for the authentication module. I've added a couple of suggestions: one to correct an environment variable name in the user testing documentation, and another to improve debuggability by logging a swallowed exception in the new authentication server thread. Overall, this is a high-quality contribution.

USER_TESTING.md Outdated

```bash
# simulate gating removal by setting a token
export HF_TOKEN=...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The environment variable for the authentication token is TABPFN_TOKEN, not HF_TOKEN. The authentication module specifically checks for TABPFN_TOKEN.

Suggested change
export HF_TOKEN=...
export TABPFN_TOKEN=...

Comment on lines +201 to +202
except Exception:
break
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The except Exception block in the server loop swallows exceptions without logging. This can make it difficult to debug issues with the callback server. It's good practice to log the exception before breaking the loop.

Suggested change
except Exception:
break
except Exception:
logger.debug("Callback server loop error", exc_info=True)
break

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant