llama.cpp/common
Samanvya Tripathi af5c13841f
common : fix tool call type detection for nullable and enum schemas (#21327)
* common : fix tool call type detection for nullable and enum schemas

* common, tests : fix grammar delegation for nullable/enum schemas and add tests

Fix enum type inference to scan all enum values (not just index 0) so
schemas like {"enum": [0, "celsius"]} correctly detect string type.

Fix schema_delegates in peg-parser to handle nullable type arrays
(["string", "null"]) and typeless enum schemas in raw mode, allowing
the tagged parser to use raw text instead of JSON-formatted strings.

Add test cases for Qwen3-Coder (TAG_WITH_TAGGED format):
- nullable string ["string", "null"]
- nullable string with null first ["null", "string"]
- nullable integer ["integer", "null"]
- enum without explicit type key
2026-04-03 17:51:23 +02:00
..
jinja jinja: coerce input for string-specific filters (#21370) 2026-04-03 15:03:33 +02:00
CMakeLists.txt common : add standard Hugging Face cache support (#20775) 2026-03-24 07:30:33 +01:00
arg.cpp tests: allow exporting graph ops from HF file without downloading weights (#21182) 2026-04-02 18:19:20 +02:00
arg.h
base64.hpp
build-info.cpp.in
chat-auto-parser-generator.cpp common : fix tool call type detection for nullable and enum schemas (#21327) 2026-04-03 17:51:23 +02:00
chat-auto-parser-helpers.cpp common : replace wrap_for_generation with a prefix convenience function and fix gpt-oss (#20912) 2026-03-23 22:21:47 -05:00
chat-auto-parser-helpers.h chat : avoid including json in chat.h (#21306) 2026-04-03 09:07:59 +03:00
chat-auto-parser.h chat : avoid including json in chat.h (#21306) 2026-04-03 09:07:59 +03:00
chat-diff-analyzer.cpp fix: gemma 4 template (#21326) 2026-04-02 23:31:02 +02:00
chat-peg-parser.cpp fix: gemma 4 template (#21326) 2026-04-02 23:31:02 +02:00
chat-peg-parser.h fix: gemma 4 template (#21326) 2026-04-02 23:31:02 +02:00
chat.cpp chat : avoid including json in chat.h (#21306) 2026-04-03 09:07:59 +03:00
chat.h chat : avoid including json in chat.h (#21306) 2026-04-03 09:07:59 +03:00
common.cpp tests: allow exporting graph ops from HF file without downloading weights (#21182) 2026-04-02 18:19:20 +02:00
common.h tests: allow exporting graph ops from HF file without downloading weights (#21182) 2026-04-02 18:19:20 +02:00
console.cpp cli : add command and file auto-completion (#19985) 2026-03-05 10:47:28 +01:00
console.h cli : add command and file auto-completion (#19985) 2026-03-05 10:47:28 +01:00
debug.cpp
debug.h chore : correct typos [no ci] (#20041) 2026-03-05 08:50:21 +01:00
download.cpp common : cleanup logs and modernize the progress bar (#21215) 2026-03-31 16:18:00 +02:00
download.h common : add standard Hugging Face cache support (#20775) 2026-03-24 07:30:33 +01:00
hf-cache.cpp common : add getpwuid fallback for HF cache when HOME is not set (#21035) 2026-03-26 20:34:23 +01:00
hf-cache.h common : fix split model migration (#21019) 2026-03-26 12:04:37 +01:00
http.h server: Parse port numbers from MCP server URLs in CORS proxy (#20208) 2026-03-09 17:47:54 +01:00
json-partial.cpp
json-partial.h
json-schema-to-grammar.cpp common/json-schema: fix: handle non-capturing groups (?:...) in JSON schema pattern converter (#21124) 2026-03-28 17:55:38 +01:00
json-schema-to-grammar.h
llguidance.cpp
log.cpp
log.h
ngram-cache.cpp
ngram-cache.h
ngram-map.cpp
ngram-map.h fix: correct misspellings in code comments (#21217) 2026-03-31 13:50:51 +02:00
ngram-mod.cpp
ngram-mod.h
peg-parser.cpp common : fix tool call type detection for nullable and enum schemas (#21327) 2026-04-03 17:51:23 +02:00
peg-parser.h common: consolidate PEG string parsers (#20263) 2026-03-10 00:29:21 +01:00
preset.cpp
preset.h
reasoning-budget.cpp common : inhibit lazy grammar sampler while reasoning is active (#20970) 2026-03-27 18:30:40 +01:00
reasoning-budget.h common : inhibit lazy grammar sampler while reasoning is active (#20970) 2026-03-27 18:30:40 +01:00
regex-partial.cpp common : fix iterator::end() dereference (#20445) 2026-03-16 08:50:38 +02:00
regex-partial.h
sampling.cpp common : Disable backend sampling if reasoning budget is enabled (#21209) 2026-03-31 10:14:01 +03:00
sampling.h
speculative.cpp
speculative.h
unicode.cpp common/parser: handle reasoning budget (#20297) 2026-03-11 10:26:12 +01:00
unicode.h common/parser: handle reasoning budget (#20297) 2026-03-11 10:26:12 +01:00