VERIFIED
crewaiinc__crewai-2552
VERIFIED on first verdict
1 attempt, 0 appeals. 1 file, 11 added and 0 removed lines. Tokens: 106,585 tokens. Model cost: $0.03. Sandbox time: 2 min 2 s.
The plan
- Repository
- crewaiinc/crewai
- Base commit
- 9dffd42 (image tag)
- Issue
- [Feature]Huggingface is not mentioned in the provider list but in documentation page also mentioned it as a provider ### Description In the documentation page you have clearly mentioned about the llm [LLMs ](https://docs.crewai.com/concepts/llms#hugging-face) support for crew projects.But when we try to create a crew in the providers list i couldnt see HUggingface anywhere. 
- Files to edit
src/crewai/cli/constants.py
- Approach
- Insert HuggingFace sections into ENV_VARS, PROVIDERS list, and MODELS dict.
Attempt 1
VERIFIEDAgent branch
| Kind | Command | Exit | Duration | Digest |
|---|---|---|---|---|
| command | git ls-files -zexact commandgit ls-files -z | 0 | 0.004s | 7ba1734a |
| write | write src/crewai/cli/constants.pyexact command/opt/receipts-fc6c04d960b240b08e4ae6f8e6e1ad41/bin/busybox sh -c 'mkdir -p /crewAI/src/crewai/cli && cp /opt/receipts-fc6c04d960b240b08e4ae6f8e6e1ad41/incoming/5585ed63ee0916bf1d01a9a43cb93b604a4af433dc26013a95eb06e05ab6cdf8 /crewAI/src/crewai/cli/constants.py' | 0 | 0.005s | 9f2332ef |
| write | write src/crewai/cli/constants.pyexact command/opt/receipts-2330326fe0ed4cd5a1638f57d68ba21a/bin/busybox sh -c 'mkdir -p /crewAI/src/crewai/cli && cp /opt/receipts-2330326fe0ed4cd5a1638f57d68ba21a/incoming/5bf1a2c59652d2d7cbcb1c70cd75fbd0824f6373f900cd9cd7eeccf4a7c263c3 /crewAI/src/crewai/cli/constants.py' | 0 | 0.005s | 104428fe |
| write | write src/crewai/cli/constants.pyexact command/opt/receipts-6e053220362845d4ad1d757d8f379649/bin/busybox sh -c 'mkdir -p /crewAI/src/crewai/cli && cp /opt/receipts-6e053220362845d4ad1d757d8f379649/incoming/6354ff48adcc40ed9bf6f52e109ecc6a8deaf8330873e29a2ced8d884007448a /crewAI/src/crewai/cli/constants.py' | 0 | 0.005s | 806646c0 |
| command | pytest tests/cli/test_constants.py::test_huggingface_env_vars -xvsexact command/opt/receipts-0f5c92f73d824e4c8255a306b52b9cfd/bin/busybox mkdir -p /opt/receipts/reports && python -I /opt/receipts-0f5c92f73d824e4c8255a306b52b9cfd/receipts_pytest.py tests/cli/test_constants.py::test_huggingface_env_vars -xvs -o junit_family=xunit1 -p no:cacheprovider -rA --continue-on-collection-errors --junitxml=/opt/receipts/reports/agent1-5.xml | 0 | 5.523s | b439e23da24e |
| command | pytest tests/cli/test_constants.py::test_huggingface_models -xvsexact command/opt/receipts-afb98675964d449385f3a40ed290b72c/bin/busybox mkdir -p /opt/receipts/reports && python -I /opt/receipts-afb98675964d449385f3a40ed290b72c/receipts_pytest.py tests/cli/test_constants.py::test_huggingface_models -xvs -o junit_family=xunit1 -p no:cacheprovider -rA --continue-on-collection-errors --junitxml=/opt/receipts/reports/agent1-6.xml | 0 | 5.504s | b439e23da24e |
| command | pytest tests/cli/test_constants.py::test_huggingface_in_providers -xvsexact command/opt/receipts-a2cb5b30fcc64764a33bdb11bb15a311/bin/busybox mkdir -p /opt/receipts/reports && python -I /opt/receipts-a2cb5b30fcc64764a33bdb11bb15a311/receipts_pytest.py tests/cli/test_constants.py::test_huggingface_in_providers -xvs -o junit_family=xunit1 -p no:cacheprovider -rA --continue-on-collection-errors --junitxml=/opt/receipts/reports/agent1-7.xml | 0 | 5.548s | b439e23da24e |
| command | pytest tests/cli/test_constants.pyexact command/opt/receipts-6f3cab31b5de4760868bbe253edd2007/bin/busybox mkdir -p /opt/receipts/reports && python -I /opt/receipts-6f3cab31b5de4760868bbe253edd2007/receipts_pytest.py tests/cli/test_constants.py --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning -o junit_family=xunit1 -p no:cacheprovider -rA --continue-on-collection-errors --junitxml=/opt/receipts/reports/agent1-8.xml | 0 | 5.515s | b439e23da24e |
| diff | capture patchexact commandcompute patch in executor staging agent1-12a88772444d48dba6b3b7ca46219eec: /opt/homebrew/Cellar/git/2.53.0/bin/git -c core.hooksPath=/dev/null -c core.attributesFile=/dev/null -c diff.external= -c core.quotePath=false add -A && /opt/homebrew/Cellar/git/2.53.0/bin/git -c core.hooksPath=/dev/null -c core.attributesFile=/dev/null -c diff.external= -c core.quotePath=false diff --cached --binary --no-ext-diff --no-textconv --no-renames 4dabc73cdf08677492bc42a3ea1c9e4560906dbe | 0 | 0.259s | b439e23da24e |
- Finish summary
- Added HuggingFace provider to CLI constants: ENV_VARS with HF_TOKEN, added to PROVIDERS list, and added example models in MODELS dict.
- Worker outcome
- finished
- Target tests pass: yes
- Full suite passes: yes
- Files changed: src/crewai/cli/constants.py
- Ran tests: yes
Witness branch w1
| Kind | Command | Exit | Duration | Digest |
|---|---|---|---|---|
| apply | apply patch ff9dd6ec4f33exact commandgit update-index -q --refresh; git apply -v --3way --recount --ignore-space-change --whitespace=nowarn /opt/receipts-c1eeef8784f74989aabfbe79fb79f9a8/incoming/ff9dd6ec4f338109d5214417a302f74aa2d34c3f89be4fa63e7e71af79411917.diff | 0 | 0.015s | b439e23da24e |
| verification | pytest (witness) tests/cli/test_constants.pyexact command/opt/receipts-b8097173621843d7b86ac8f8ce985acb/bin/busybox mkdir -p /opt/receipts/reports && python -I /opt/receipts-b8097173621843d7b86ac8f8ce985acb/receipts_pytest.py --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning tests/cli/test_constants.py -o junit_family=xunit1 -p no:cacheprovider -rA --continue-on-collection-errors --junitxml=/opt/receipts/reports/w1-2.xml | 0 | 5.531s | b439e23da24e |
Gate predicate checklist
| Predicate | Name | Status | Evidence |
|---|---|---|---|
R1_fail_to_pass | Failing specification tests now pass | PASS | target tests passed: tests/cli/test_constants.py::test_huggingface_env_vars, tests/cli/test_constants.py::test_huggingface_models, tests/cli/test_constants.py::test_huggingface_in_providers |
R2_pass_to_pass | Previously passing tests kept | PASS | 0 baseline-passing tests still pass |
R3_no_shrink | No removed tests or new skips | PASS | all 3 baseline tests collected; skips unchanged (0) |
R4_patch_scope | Patch scope | PASS | patch touches 1 file(s), all in scope |
R5_provenance | Witness chain and patch digest | PASS | agent chain 2fc77a11 -> 66486728 unbroken over 9 receipt(s); witness chain 2fc77a11 -> dce3161c unbroken over 2 receipt(s); applied digest matches |
R6_claim_audit | Agent claim audit (advisory) | PASS | claimed green; own last run: 3 passed, 0 failed |
What it said
- Finish summary
- Added HuggingFace provider to CLI constants: ENV_VARS with HF_TOKEN, added to PROVIDERS list, and added example models in MODELS dict.
- Worker outcome
- finished
- Target tests pass: yes
- Full suite passes: yes
- Files changed: src/crewai/cli/constants.py
- Ran tests: yes
What the record shows
honest: claimed green; own last run: 3 passed, 0 failed
SWE-rebench's official grader: resolved
Agrees with the gate
Shipped patch
diff --git a/src/crewai/cli/constants.py b/src/crewai/cli/constants.pyindex fec0b63..525a979 100644--- a/src/crewai/cli/constants.py+++ b/src/crewai/cli/constants.py@@ -97,6 +97,12 @@ ENV_VARS = { "key_name": "SAMBANOVA_API_KEY", } ],+ "huggingface": [+ {+ "prompt": "Enter your HuggingFace API token (press Enter to skip)",+ "key_name": "HF_TOKEN",+ }+ ], } @@ -112,6 +118,7 @@ PROVIDERS = [ "azure", "cerebras", "sambanova",+ "huggingface", ] MODELS = {@@ -283,6 +290,10 @@ MODELS = { "sambanova/Meta-Llama-3.2-3B-Instruct", "sambanova/Meta-Llama-3.2-1B-Instruct", ],+ "huggingface": [+ "huggingface/HuggingFaceH4/zephyr-7b-beta",+ "huggingface/HuggingFaceH4/zephyr-orpo-141b-A35b-v0.1",+ ], } DEFAULT_LLM_MODEL = "gpt-4o-mini"
Model and costs
- Model
- NVIDIA Nemotron 3 Super thinking off · temperature 1.0 · top_p 0.95
- Tokens
- 106,585 tokens
- Model cost
- $0.03
- Sandbox time
- 2 min 2 s
- Sandbox cost
- Token Factory reported cost: 0.445 (unit not published)
Full environment disclosure
{
"executor_kind": "tokenfactory",
"lock_sha256": "8852d557291af795769c333c63d0b5673adb3ff8556c5252c3a7d8f5f50e4e50",
"model": {
"base_url": "https://api.tokenfactory.nebius.com/v1/",
"client": "TokenFactoryClient",
"max_tokens": null,
"model": "nvidia/nemotron-3-super-120b-a12b",
"temperature": 1.0,
"thinking": false,
"top_p": 0.95
},
"pytest_config_digests": {
"pyproject.toml": "f6f0a4736609c22c4f7c4ed5fd3780801bbf2f29ccee050db0e99eebe762ffee",
"src/crewai/cli/templates/crew/pyproject.toml": "77759122d2d6d2bb2a4c4af160c87c449631472983f532eb604b50105137394e",
"src/crewai/cli/templates/flow/pyproject.toml": "ec745aafced34fd37b60b0abe876b12d7892fdd6767dff713a5a2b68abe35d4d",
"src/crewai/cli/templates/tool/pyproject.toml": "cafab1def508e7aaa83219750c5bd4564cb969015b1c8def19348ab4972d2f67",
"tests/conftest.py": "e0ba34f3ae38b08b66a5a050de759186d8673a6242d85b5a1a90891c31c06467"
},
"receipts_version": "0.0.1",
"test_digests": {
"tests/cli/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"tests/cli/authentication/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"tests/cli/authentication/test_auth_main.py": "6f88bb115a1b5f89f28b716db9496fcb00b1a5b2df699ce3598579931cb71c24",
"tests/cli/authentication/test_utils.py": "7348a5654834683cc2ca1d2e62e936fb36cee541f2644e048c76a77f101996ed",
"tests/cli/cli_test.py": "0011d97578dbbed88821594c02a6ac575559bd91fa3ef641e454083cbfb901e8",
"tests/cli/config_test.py": "4f1493ac0c9eca5cf3108d5a7e6f31e2af6b83648f54ae526b88d6ad811b9595",
"tests/cli/deploy/test_deploy_main.py": "8b056ed39488687d191e511f8ec0983bbf2c6790cb374b4bd024fa8dee9c549c",
"tests/cli/test_constants.py": "7a4b352002e6733374b193cc583d5c58799eb9fafae417573761bbae82e4bd1e",
"tests/cli/test_crew_test.py": "bde0419f140cf73a0e8c416753aaa509ec04ee0c11518fe27968f032f6075842",
"tests/cli/test_git.py": "5204e830be1574903fff5bf457eb22d2be5a6445aa8adfbe93daab1c5eeb12c0",
"tests/cli/test_plus_api.py": "9f0b0ac5e745faab2c4cb2e07e6136b09530912bd19d8454000d9b0ff0023e36",
"tests/cli/test_utils.py": "17ae6e04df5436857c510e34e6a3c49ed67e58d0018c32ba441b360b2acac371",
"tests/cli/tools/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"tests/cli/tools/test_main.py": "02d99db4bc3f431928a75f663d01f8cde7fd543d52f10dad9ba6243fdb3fb061",
"tests/cli/train_crew_test.py": "3f002d3d9293329fa3f7a65766b9cdab02d90aba3f0b4a04c7cd54c870b211ff"
}
}The bundle
Recorded JSON and patches. In these copies the local checkout path is removed from file paths, and the home directory is shown as ~.
- attempts/1/filtered.diff
- attempts/1/patch.diff
- attempts/1/verdict.json
- attempts/1/witness/receipts.jsonl
- baseline.json
- branches/agent1/receipts.jsonl
- branches/base/receipts.jsonl
- branches/official1/receipts.jsonl
- branches/w1/receipts.jsonl
- cost.json
- disclosure.json
- input.json
- lock.txt
- plan.json
- record.json
- result.json