v5 Phase 2: aktuelle Modelle, GGUF-Klartext, Tools, HF-Token
- recipes.py: Juni-2026-Modelle (Qwen3-Coder-30B-A3B, Qwen3-8B/30B, Qwen2.5-VL-7B, Qwen3-4B); nur Repo gespeichert, GGUF-Datei wird beim Installieren dynamisch aufgeloest (_pick_gguf) + UPGRADES-Map fuer Phase 3. - cookbook: 'kein GGUF' neutral statt rot + GGUF-Erklaerung (infoDot); ctx-infoDot. - connect.js: 'Empfohlene Tools (Juni 2026)' (OpenCode/Cline/Continue) + MCP-Hinweis. - HF-Token in Einstellungen -> als HF_TOKEN an Downloads/Recipe-Install durchgereicht. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+5
-2
@@ -31,6 +31,7 @@ class DownloadReq(BaseModel):
|
||||
repo: str
|
||||
file: str
|
||||
subdir: str | None = None
|
||||
hf_token: str | None = None
|
||||
|
||||
|
||||
class RegisterReq(BaseModel):
|
||||
@@ -139,8 +140,10 @@ def download(req: DownloadReq):
|
||||
target = MODELS_DIR / sub
|
||||
target.mkdir(parents=True, exist_ok=True)
|
||||
args = ["hf", "download", req.repo, req.file, "--local-dir", str(target)]
|
||||
job_id = start_job(args, f"download {req.repo}/{req.file}",
|
||||
env={"HF_XET_HIGH_PERFORMANCE": "1"})
|
||||
env = {"HF_XET_HIGH_PERFORMANCE": "1"}
|
||||
if req.hf_token:
|
||||
env["HF_TOKEN"] = req.hf_token
|
||||
job_id = start_job(args, f"download {req.repo}/{req.file}", env=env)
|
||||
JOBS[job_id]["result_path"] = str(target / req.file)
|
||||
return {"job_id": job_id, "expected_path": str(target / req.file)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user