serve: the model entry carries the capabilities /server_info reports

OpenAI's model object has no field for what a model can be asked for, so a client learned it
by sending a request and reading the refusal. The entry it already fetches now carries the same
capabilities object /server_info does (tools, reasoning, grammar, media, logprobs, the reasoning
efforts the template takes), built by one Server::capabilities() so the two cannot disagree.
This commit is contained in:
baKon authored and StillDeadcode committed 2026-10-08 15:57:51 +02:00
1 parent d5b584a4c1
commit 7c0bd03841
8 files changed
+63 -20

No files matched your search

+4
View File
@@ -201,6 +201,10 @@ private:
HttpResponse handle_detokenize(const HttpRequest& req);
HttpResponse handle_tokenizer_info(const HttpRequest& req);
HttpResponse handle_server_info(const HttpRequest& req);
/* What this deployment can do -- chat, tools, reasoning, grammar, media, logprobs, the
* reasoning efforts it takes -- as /server_info's `capabilities` and the model entry both
* report it, built in one place so the two cannot disagree. */
json capabilities() const;
HttpResponse handle_sessions(const HttpRequest& req);
HttpResponse handle_reset_prefix_cache(const HttpRequest& req);