{"record":{"id":"16415dad5b56b11e","repo":"sgl-project/sglang","slug":"v1-models-response-status","errorCode":null,"errorMessage":"/v1/models ${response.status}","messagePattern":"/v1/models (.+?)","errorType":"http","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/apps/realtime_webui/app.js","lineNumber":1724,"sourceCode":"  return String(info?.id || info?.model || info?.root || \"\");\n}\n\nfunction presetForModelInfo(info) {\n  const id = servedModelId(info).toLowerCase();\n  if (!id) return null;\n  return presets.find((preset) => (\n    preset.model && id.includes(preset.model.toLowerCase())\n  )) || null;\n}\n\nasync function queryServerModelInfo(options = {}) {\n  const applyPresetForModel = options.applyPresetForModel ?? true;\n  let info;\n  try {\n    const response = await fetch(modelsUrlFromServerUrl($(\"serverUrl\").value), {\n      cache: \"no-store\",\n    });\n    if (!response.ok) throw new Error(`/v1/models ${response.status}`);\n    info = firstServedModelInfo(await response.json());\n  } catch (error) {\n    addHistory(`model query failed · ${error.message || \"unknown\"}`);\n    return null;\n  }\n  if (!info) return null;\n\n  const modelId = servedModelId(info);\n  const preset = presetForModelInfo(info);\n  if (preset && applyPresetForModel && preset !== selectedPreset) {\n    await applyPreset(preset, { sendRuntimeEvents: false });\n  }\n  if (modelId) $(\"model\").value = modelId;\n  addHistory(\n    preset\n      ? `server model · ${preset.name}`\n      : `server model · ${modelId || \"unknown\"}`,\n  );","sourceCodeStart":1706,"sourceCodeEnd":1742,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/apps/realtime_webui/app.js#L1706-L1742","documentation":"RadixTree::writing_through in the tree_v2 C++ radix tree is only implemented for the hicache-disabled fast path; when hierarchical caching is enabled (use_hicache true) the write-through-to-host path is a stub that throws 'Not implemented yet'. It exists so the API surface compiles while the IO path is pending.","triggerScenarios":"Enabling HiCache (use_hicache) with the tree_v2 cpp radix tree backend and triggering a write-through of a newly inserted prefix — i.e. any cache insert once hierarchical caching is active on this tree version.","commonSituations":"Switching to the experimental tree_v2 backend while running with --enable-hicache or hierarchical cache config; upgrading SGLang where tree_v2 advertises the API but the host-tier IO is unfinished.","solutions":["Disable hierarchical cache (use the non-hicache configuration) with tree_v2 — the disabled path returns cleanly","Fall back to the original/v1 cpp radix tree or Python radix cache backend which implements write-through","Track the upstream PR implementing tree_v2 hicache IO and upgrade once merged"],"exampleFix":"# before\nserver_args.enable_hicache = True  # + tree_v2 backend -> throws\n\n# after\nserver_args.enable_hicache = False  # with tree_v2, or keep hicache and use v1 radix tree","handlingStrategy":"fallback","validationCode":"from sglang.srt.mem_cache.cpp_radix_tree import RadixTree  # tree_v2\n# before enabling hicache with tree_v2:\nassert not use_hicache, \"tree_v2 writing_through is unimplemented when hicache is on\"","typeGuard":"def tree_v2_supports_hicache(tree) -> bool:\n    return not getattr(tree, \"is_v2\", False) or not tree.impl.use_hicache","tryCatchPattern":"try:\n    tree.writing_through(node, kvs)\nexcept RuntimeError as e:\n    if \"Not implemented yet\" in str(e):\n        logger.warning(\"tree_v2 hicache write-through unsupported; skipping\")\n    else:\n        raise","preventionTips":["Pin the v1/default radix tree backend when hierarchical caching is required","Gate tree_v2 behind a config check that rejects enable_hicache combinations","Watch release notes for tree_v2 IO completion before enabling it"],"tags":["radix-tree","hicache","not-implemented","mem-cache"],"backgroundTag":"unsupported-operation-not-implemented","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}