node registration fixes
This commit is contained in:
@@ -1101,12 +1101,15 @@ def _registration_quantization(body: dict, quantizations: list[str]) -> str | No
|
||||
|
||||
An absent field predates the protocol adding it: it means "unknown", not
|
||||
"unsupported", so the node keeps the best precision it advertises and stays
|
||||
routable. Anything the node states explicitly is taken at its word -- a null,
|
||||
a non-string, or an unsupported name leaves it with no usable precision and
|
||||
routing excludes it.
|
||||
routable. An explicit "auto" means the same thing — the node's CLI default
|
||||
delegates the choice, it does not refuse one. Anything else the node states
|
||||
explicitly is taken at its word -- a null, a non-string, or an unsupported
|
||||
name leaves it with no usable precision and routing excludes it.
|
||||
"""
|
||||
if "quantization" in body:
|
||||
return _normalize_quantization(body["quantization"])
|
||||
declared = body.get("quantization")
|
||||
declared_auto = isinstance(declared, str) and declared.strip().lower() == "auto"
|
||||
if "quantization" in body and not declared_auto:
|
||||
return _normalize_quantization(declared)
|
||||
supported = [
|
||||
normalized for value in quantizations
|
||||
if (normalized := _normalize_quantization(value)) is not None
|
||||
|
||||
Reference in New Issue
Block a user