mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-11-05 04:32:21 +01:00
The recipe Run button sent repo_id "<backend> setup"; the space fails the pip package-spec check, so every Run returned "Invalid pip package name". It now sends "<backend>-setup". The vLLM/SGLang recipes start with `uv pip install ... --torch-backend auto`, but uv was not in the serve command allowlist. Allow uv only for the `pip install` subcommand. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
f814018098
commit
631c05603c
@@ -728,8 +728,13 @@ def _check_serve_binary(seg: str) -> None:
|
||||
if not tokens:
|
||||
return
|
||||
env_re = re.compile(r"^[A-Za-z_][A-Za-z0-9_]*=")
|
||||
first = next((t for t in tokens if not env_re.match(t)), "")
|
||||
idx = next((i for i, t in enumerate(tokens) if not env_re.match(t)), len(tokens))
|
||||
first = tokens[idx] if idx < len(tokens) else ""
|
||||
base = os.path.basename(first)
|
||||
# The vLLM/SGLang Dependencies recipes install with `uv pip install …
|
||||
# --torch-backend auto`. Allow uv for that subcommand only, not `uv run`.
|
||||
if base == "uv" and tokens[idx + 1:idx + 3] == ["pip", "install"]:
|
||||
return
|
||||
if base not in _SERVE_CMD_ALLOWLIST:
|
||||
raise HTTPException(
|
||||
400,
|
||||
|
||||
Reference in New Issue
Block a user