Archived
radiance 1.0.5
- Answers no longer stop partway through. A request without max_tokens got 512 tokens, and a reasoning model can think for thousands before it answers, so the reply ended inside the reasoning with finish_reason "length", which chat clients do not show. It now gets whatever the context leaves after the prompt, as in vLLM. --default-max-tokens N sets a number, and --max-tokens-cap bounds every request. - Qwen3.8-Flash-Next in Docker without --security-opt seccomp=unconfined is refused at startup, in about a second, with a message naming that option. It used to load the whole model and then fail every request as "unsupported", and a restart policy reloaded it over and over. The n-gram table is read through io_uring, which Docker's default seccomp profile refuses. - A request the engine fails says what failed, in the 500 or the stream's error event. It read "the engine failed this request: ok". - Flash-Next no longer crashes at startup about one start in seven (a race between the parallel declares that size the activation arena). - rad-convert no longer needs io_uring, so it converts in a sandbox that forbids it.
This commit is contained in:
1 parent
09fb41735b
commit
6c11671bdd
30 files changed
+541
-120
No files matched your search
+13
-4
@@ -412,6 +412,16 @@ bool Server::pump(std::vector<Generation>& gens, const OaiRequest& r) {
|
||||
|
||||
/* ------------------------------------------------------------------ metrics bookkeeping */
|
||||
|
||||
/* WHAT FAILED, for the client: the sentence the failing component gave, and the status. A failed
|
||||
* request always carries a status -- an engine that stopped carries the one that stopped it -- so
|
||||
* this never reads "ok". */
|
||||
static std::string engine_failure(const Sink& s) {
|
||||
const int st = s.status() < 0 ? s.status() : RAD_E_STATE;
|
||||
const char* why = s.why();
|
||||
return why ? fmt("the engine failed this request: %s (%s)", why, rad_strerror(st))
|
||||
: fmt("the engine failed this request: %s", rad_strerror(st));
|
||||
}
|
||||
|
||||
static SuccessReason to_reason(Finish f) {
|
||||
switch (f) {
|
||||
case Finish::Length: return SuccessReason::Length;
|
||||
@@ -536,14 +546,14 @@ HttpResponse Server::blocking_completion(const HttpRequest& req, OaiRequest& r)
|
||||
/* An engine-side failure is not a 200 with an empty answer. */
|
||||
for (auto& g : gens) {
|
||||
if (g.finish == Finish::Error) {
|
||||
int st = g.sink->status();
|
||||
const std::string why = engine_failure(*g.sink);
|
||||
retire(gens);
|
||||
release(r.n_choices());
|
||||
record(r, gens, Finish::Error);
|
||||
ApiError e;
|
||||
e.status = 500;
|
||||
e.type = "internal_server_error";
|
||||
e.message = std::string("the engine failed this request: ") + rad_strerror(st);
|
||||
e.message = why;
|
||||
return error_response(e);
|
||||
}
|
||||
}
|
||||
@@ -689,8 +699,7 @@ HttpResponse Server::streaming_completion(const HttpRequest& req, OaiRequest& r)
|
||||
ApiError e;
|
||||
e.status = 500;
|
||||
e.type = "internal_server_error";
|
||||
e.message = std::string("the engine failed this request: ") +
|
||||
rad_strerror(g.sink->status());
|
||||
e.message = engine_failure(*g.sink);
|
||||
out += sse_error(e);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user