llama.cpp/tools/server/tests/unit
손희준 fbbf3ad190
server: /v1/responses (partial) (#18486)
* from previous PR

* Make instruction(system) as first message

* Convert [input_message] (text/image/file)

* Rename convert_responses_to_chatcmpl(body) -> response_body

* Initial tool call support

* Erase instructions field from chatcmpl body

* Feed reasoning texts to chat template

* Use std::vector instead of opaque json array

* Make output_item.added events consistent

* Move `server_task_result_cmpl_partial::update` from header to source

* Match ID of output_item.added and .done events

* Add function_call only if there is no "fc_" prefix

* Add function call output at non-streaming API

* Test if ID is persistent

* Add doc

* Fix style - use trailing comma

* Rewrite state management

* catch up with upstream/master

* Fix style - "type" is the first item of SSE data

* Explicitly check "instructions" from response_body

* Make lambdas static

* Check if reasoning content exists

* Add `oai_resp_id` to task_result_state(also initialized at ctor), server_task_result_cmpl_partial, and server_task_result_cmpl_final

* Reject `input_file` since it is not supported by chatcmpl

* Add "fc_" prefix to non-straming function call id as coderabbit pointed out

---------

Co-authored-by: openingnow <>
2026-01-21 17:47:23 +01:00
..
test_basic.py
test_chat_completion.py server: improve slots scheduling for n_cmpl (#18789) 2026-01-15 17:10:28 +01:00
test_compat_anthropic.py server : add thinking content blocks to Anthropic Messages API (#18551) 2026-01-06 16:17:13 +01:00
test_compat_oai_responses.py server: /v1/responses (partial) (#18486) 2026-01-21 17:47:23 +01:00
test_completion.py server : adjust unified KV cache tests (#18716) 2026-01-10 17:51:56 +02:00
test_ctx_shift.py
test_embedding.py
test_infill.py
test_lora.py
test_rerank.py
test_router.py
test_security.py
test_sleep.py server: add auto-sleep after N seconds of idle (#18228) 2025-12-21 02:24:42 +01:00
test_slot_save.py
test_speculative.py
test_template.py
test_tokenize.py
test_tool_call.py
test_vision_api.py