发布

  • fix(config): only inject llama.cpp serving options on the llama.cpp path (#10822)

    frostbyte_neo 发布于 2026-07-14 15:46:15 +00:00 | 904 次提交 在此版本后已推送到 master

    SetDefaults injected the llama.cpp server options cache_reuse
    (ApplyServingDefaults) and parallel (ApplyHardwareDefaults, re-applied
    per selected node by the distributed router) onto every model config
    regardless of backend. Every other backend ignores options it does not
    understand, so this was harmless until longcat-video, which strictly
    validates its options and fails LoadModel with
    "unknown model option(s): cache_reuse, parallel".

    Gate both injections behind a new UsesLlamaCppServingOptions allow-list
    (llama-cpp plus the empty/auto-detect case that resolves to llama.cpp
    from a GGUF file, mirroring how llamaCppDefaults is registered). This
    follows the existing UsesLlamaSamplerDefaults precedent for llama-only
    defaults. The typed NBatch field is deliberately left alone: it is a
    proto field every backend simply ignores, which is why batch never
    triggered the error.

    Also harden the longcat-video backend to warn-and-ignore unknown model
    options and request params through a testable select_known_options
    helper, matching the other LocalAI Python backends, so a future
    server-injected option cannot break loading again.

    Assisted-by: Claude:claude-opus-4-8 [Claude Code]

    Signed-off-by: Ettore Di Giacinto mudler@localai.io
    Co-authored-by: Ettore Di Giacinto mudler@localai.io

    下载附件