Archived
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:
1 parent
d5b584a4c1
commit
7c0bd03841
8 files changed
+63
-20
No files matched your search
@@ -1158,6 +1158,7 @@ HttpResponse Server::handle_models(const HttpRequest& req) {
|
||||
c.created = started_at_;
|
||||
c.max_model_len = opt_.max_ctx;
|
||||
c.root = opt_.model_path;
|
||||
c.capabilities = capabilities().dump();
|
||||
metrics_.observe_http(200);
|
||||
return HttpResponse::json_body(200, id.empty() ? models_body(c) : model_body(c));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user