[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2026-07-29 02:48:08 +00:00
commit 8616d43e31
3 changed files with 4 additions and 7 deletions

View file

@ -174,9 +174,7 @@ class ModelOverridePayload(BaseModel):
spec_draft_n_max: Optional[int] = Field(default = None, ge = 1, le = 16)
# Parallel decode slots (llama-server --parallel), GGUF-only like the picker.
# None follows the server-wide default set at launch.
n_parallel: Optional[int] = Field(
default = None, ge = PARALLEL_SLOTS_MIN, le = PARALLEL_SLOTS_MAX
)
n_parallel: Optional[int] = Field(default = None, ge = PARALLEL_SLOTS_MIN, le = PARALLEL_SLOTS_MAX)
tensor_parallel: bool = False
# Validated in bytes below, not by max_length: pydantic counts characters, so a
# multi-byte template would pass here and be dropped by the UTF-8 normalizer.

View file

@ -156,7 +156,6 @@ def test_override_mirror_matches_shared_bounds():
# The API auto-switch override map mirrors the bounds rather than importing them:
# llama_server_args owns the extra-args allow-list that module stays out of.
from utils.openai_auto_switch_settings import PARALLEL_SLOTS_MAX, PARALLEL_SLOTS_MIN
assert (PARALLEL_SLOTS_MIN, PARALLEL_SLOTS_MAX) == (PARALLEL_MIN, PARALLEL_MAX)

View file

@ -715,9 +715,9 @@ def test_parallel_slots_reach_an_api_load_through_the_server_mirror():
route = (WORKDIR / "studio" / "backend" / "routes" / "settings.py").read_text(encoding = "utf-8")
assert "n_parallel: Optional[int] = Field(" in route
assert "n_parallel = payload.n_parallel," in route
store = (
WORKDIR / "studio" / "backend" / "utils" / "openai_auto_switch_settings.py"
).read_text(encoding = "utf-8")
store = (WORKDIR / "studio" / "backend" / "utils" / "openai_auto_switch_settings.py").read_text(
encoding = "utf-8"
)
assert 'entry["n_parallel"] = n_parallel' in store
# GGUF-only, like the picker: a safetensors load has no llama-server slots.
gguf_block = store.split(" if is_gguf:", 1)[1]