Repository navigation
Upgrade llama.cpp to b12309; Host/Origin guard in OpenAiCompatServer; quantizer records the matrix by file name - #614
Conversation
Three upstream commits, in the Vulkan and WebGPU backends and upstream's test-backend-ops. No patched file is in the range; all 20 patches apply unchanged, and no source of this library changes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S8cAMZXymmPba3YZr2YCWp
Seventeen upstream commits, pinned by commit (upstream has not tagged the number yet). No patched file is in the range; all 20 patches apply unchanged, and no header this library includes moved. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S8cAMZXymmPba3YZr2YCWp
…gured origin With corsAllowOrigin other than "*" the server only set the Access-Control-Allow-Origin header: a browser hid the response from a foreign page, and the request ran. OriginGuard applies the rules of llama.cpp's --cors-origins (upstream #32098): a foreign Origin or Sec-Fetch-Site, and on a loopback connection a Host that names neither loopback nor the host of an allowed origin (DNS rebinding), are answered 403 before any route runs. The value may be "localhost" or a comma-separated list; --cors-origins sets it on the command line. The default "*" is unchanged. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S8cAMZXymmPba3YZr2YCWp
quantize() wrote the path it was given into quantize.imatrix.file, so a published GGUF named the directories of the machine it was made on. Upstream fixed the same in its tool (#32000), which this library does not use; both keys hold the file name now. New in the C++ suite: NativeServerCors (--cors-origins on the embedded server, upstream #32098) and a chat template with a chained comparison and unpacked arguments (#32072). 736 tests, 780 cases. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S8cAMZXymmPba3YZr2YCWp
|
Caution Review failedThe pull request is closed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
Generated by Claude Code |
|



Summary
2cbe0ec429b849a88664e0f62388fc92a5abd699; upstream has not tagged b12309 yet, so it is pinned by commit, and the configure checks that the commit's count is the number). 20 upstream commits in all. No patched file is in the range: all 20 patches apply unchanged, and no header this library includes moved. What arrives with it: flash attention on the CPU sums an F16 V cache in F32, attstemplate can normalize its text itself, Jinja chains comparisons and unpacks arguments,--cors-originson the embedded server refuses a foreignHost/Originwith403(default*unchanged), cpp-httplib 0.66.0, and GPU-module changes (CUDA graphs, ROCm BLAS workspace, Vulkan batched copy and dequantized KV cache with coopmat2, MetalSOLVE_TRI).OpenAiCompatServerrefuses requests from somewhere else oncecorsAllowOriginis not*. Until now the value only setAccess-Control-Allow-Origin: a browser hid the response from a foreign page and the request still ran. The new pureOriginGuardapplies the rules of llama.cpp's own server (upstream #32098): a foreignOriginorSec-Fetch-Site, and on a loopback connection aHostthat names neither loopback nor the host of an allowed origin (DNS rebinding), are answered403 permission_errorbefore any route runs. The value may belocalhostor a comma-separated list; new CLI option--cors-origins.quantize()wrote the path it was given intoquantize.imatrix.file, so a published GGUF named the directories of the machine it was made on. Upstream fixed the same in its command-line tool (#32000), which this library does not use.NativeServerCors(3, the realllama_server()with and without--cors-origins),CApiTemplate(a chat template with a chained comparison and unpacked arguments), the quantizer test now asserts the recorded value,OriginGuardTest(10),OpenAiCompatServerOriginTest(5, over a socket), one CLI test.Behaviour change: a server configured with a specific
corsAllowOriginanswered every request before; a browser request from another origin is now403, a list orlocalhostis answered with the one origin that asked, andVary: Originis set. The default*and every client that is no browser are unchanged.Test plan
OriginGuardTest,OpenAiCompatServer*Test,OpenAiServerCliTest),WireNameRegistryTest;spotbugs:check,spotlesscheck-natives.py,check-patches.py, the buildcheck unit testsNot covered:
OriginGuardhas no browser test (the rules are tested over a socket); thettstemplate normalizer (no generated speech model) and the F32 accumulation (needs a context long enough to overflow F16) are not testable here; the CUDA, ROCm, Vulkan and Metal changes are not measured on a GPU -- the module jobs build them.Related issues / PRs
Follows #613.
Checklist
CONTRIBUTING.mdandCODE_OF_CONDUCT.mdGenerated by Claude Code