JetBrains-Research / JetBrains-Research/TestSpark

Generating tests with HuggingFace leads to 404

Open
#499 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Kotlin
Stars
88
Forks
24
PR merge metrics
No merged PRs in 30d

Description

### Affected Modules
- [ ] UI
- [ ] EvoSuite
- [x] LLM
- [ ] Kex
- [ ] Other (please specify)

### Bug Description
Attempting to generate tests using a HuggingFace token (with either of the two supported models) results in a 404 error.

### Steps to Reproduce
1. Open any Java class
2. Right-click a method and select **TestSpark**
3. Choose HuggingFace and select one of the two Ollama models
4. Click **Generate** → an IntelliJ error notification appears with a 404 error (no additional details provided)

### Expected Behavior
The test generation process completes successfully.

### Additional Information
According to the [API reference](https://huggingface.co/docs/hub/api) of HuggingFace, the issue could be a missing `api/` in the [URL](https://github.com/JetBrains-Research/TestSpark/blob/b2306f08665ac98aa4d192f6c9a3f0f7ef2a9482/src/main/kotlin/org/jetbrains/research/testspark/tools/llm/generation/hf/HuggingFaceRequestManager.kt#L27)

Contributor guide

Open the contributing guide

Research direction

Start with src/main/kotlin/org/jetbrains/research/testspark/tools/llm/generation/hf/HuggingFaceRequestManager.kt at the URL referenced in the issue. Reproduce generation from a Java method using HuggingFace and each supported Ollama model, then compare the request with the HuggingFace API reference. Done means test generation completes without the 404 notification.

Written by the indexing model from the issue text.

Assessment

Tech stack
huggingface, kotlin, ollama
Domain
ai, devtools, testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.