SDK-89: Validate test LLM and judge LLM can be accessed from HuggingFace#214
SDK-89: Validate test LLM and judge LLM can be accessed from HuggingFace#214benglewis wants to merge 12 commits into
Conversation
…ate-llm-and-judge-model-can-be # Conflicts: # pyproject.toml # uv.lock
Hardcoded token=None ignores model's stored token & Unreachable hint="private" message branch is dead code
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Thank you Dependabot
Spec Reviewer Report 📪 ✅All 2 Identified Requirements Met for Ticket:
2 met requirements
Used resources: |
…s.py` to use `pytest` instead of `unittest`
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ce40b0a1ab
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…or eval with a model ID
…on & allow skipping HuggingFace validation
User description
Codex generated this pull request, but encountered an unexpected error after generation. This is a placeholder PR message.
Codex Task
Note
Medium Risk
Adds new outbound HuggingFace API calls on critical workflows (
LlmModel.create, eval run launch), which can introduce latency or new failure modes if HF is unavailable or tokens are misconfigured.Overview
Adds pre-flight HuggingFace access validation for both LLM creation and LLM behavior eval runs, surfacing clearer
HirundoErrormessages for gated/private/missing/unauthorized models and skipping validation when the judge model is a local path.Extends model source outputs to carry an optional HuggingFace
token, introduces a new_model_access.pyhelper built onhuggingface_hub, updates several Pydantic models’model_configto protectmodel_validate/model_dump, and adds unit tests plus the newhuggingface-hubdependency.Written by Cursor Bugbot for commit d236474. This will update automatically on new commits. Configure here.
Generated description
Below is a concise technical summary of the changes proposed in this PR:
Validate HuggingFace-hosted LLMs and judge models before use by reusing the new
_model_accesshelper duringLlmModel.createandLlmBehaviorEval.launch_eval_run, surfacing clearerHirundoErrormessages when gated, private, or unauthorized models are encountered. Update environment helpers so feature-gated tests rely onget_env_booland centralize boolean flags while adding thehuggingface-hubdependency for the new API calls.get_env_boolfor the shared QA/eval tests and document pytest-only guidance so long-running flows gate on consistent boolean flags instead of rawos.getenvcalls.Modified files (5)
Latest Contributors(1)
validate_huggingface_model_access/validate_judge_model_accessintoLlmModel,LlmBehaviorEval, and their supporting Pydantic configs, plus covering the new logic with targeted unit tests and thehuggingface-hubdependency.Modified files (10)
Latest Contributors(1)