Archived
radiance 1.0.4
- oh-my-pi works unmodified on every Qwen model. Its requests carry a top-level
preserve_thinking, which was refused as an unknown field; it now reaches the chat template the
way enable_thinking does. Its task tool's `model` parameter is the `not` of every JSON type,
which the 1.0.1 fix did not cover: any `not` that excludes every value is now an argument no
call writes, under every chat template and Flash-Next's declared format.
- Command-line defaults and bounds for what a request leaves out. A flag left unset changes
nothing; /server_info reports the values under request_defaults.
- Sampling: --typical-p, --presence-penalty, --frequency-penalty, --repetition-penalty,
--repeat-last-n, --dry-multiplier, --dry-base, --dry-allowed-length, --dry-penalty-last-n,
--dry-sequence-breakers, --xtc-probability, --xtc-threshold.
- Requests: --default-max-tokens N|auto, --max-tokens-cap, --max-n, --max-queued-requests,
--max-stop-strings, --max-stop-bytes.
- Chat template: --chat-template-kwargs JSON|@FILE sets template variables a request's own
chat_template_kwargs override; --reasoning-format auto|none.
- HTTP: --http-threads, --read-timeout, --write-timeout, --keep-alive-timeout, --max-body-mib,
--retry-after, --no-cors.
- Media: --image-min-pixels, --image-max-pixels, --video-min-pixels, --video-max-pixels,
--video-fps, --video-min-frames, --video-max-frames, --video-max-frame-tokens,
--max-source-pixels.
- Under --reasoning-effort none or minimal, a request that sets enable_thinking true now thinks
instead of having the deployment default override it.
- --temp, --top-p, --min-p and --top-k refuse a value that is not a number instead of reading
it as 0.
This commit is contained in:
1 parent
d008fdb32b
commit
09fb41735b
23 files changed
+2478
-104
No files matched your search
+22
-1
@@ -66,8 +66,11 @@ struct ServerOptions {
|
||||
int retry_after_s = 1;
|
||||
|
||||
int64_t max_ctx = 0;
|
||||
int64_t default_max_tokens = 512;
|
||||
int64_t default_max_tokens = 512; /* 0: what the context leaves (OaiLimits) */
|
||||
int64_t max_tokens_cap = 0; /* 0: none */
|
||||
int max_n = 8;
|
||||
int64_t max_stops = 64;
|
||||
int64_t max_stop_bytes = 4096;
|
||||
|
||||
bool supports_logprobs = false;
|
||||
/* The deployment default for `reasoning_effort`, empty for the template's own. See
|
||||
@@ -76,6 +79,10 @@ struct ServerOptions {
|
||||
/* What a request that sends no sampler fields is served with. See
|
||||
* OaiLimits::default_sampling; only the sampler knobs are read from it. */
|
||||
SamplingParams default_sampling;
|
||||
bool default_dry_breakers_set = false;
|
||||
/* The deployment's chat template variables and reply format. See OaiLimits. */
|
||||
std::map<std::string, std::string> default_template_kwargs;
|
||||
std::string reasoning_format = "auto";
|
||||
bool allow_image = false;
|
||||
bool allow_video = false;
|
||||
bool allow_audio = false;
|
||||
@@ -104,6 +111,12 @@ struct ServerOptions {
|
||||
|
||||
std::string api_key;
|
||||
bool cors = true;
|
||||
|
||||
/* The transport's timeouts and body bound. See TransportOptions. */
|
||||
int read_timeout_s = 30;
|
||||
int write_timeout_s = 600;
|
||||
int keep_alive_timeout_s = 5;
|
||||
size_t max_body_bytes = 512ull << 20;
|
||||
};
|
||||
|
||||
class Server {
|
||||
@@ -120,6 +133,14 @@ public:
|
||||
const Router& router() const { return router_; }
|
||||
|
||||
int run(); /* binds, serves, blocks. RAD_OK or negative. */
|
||||
|
||||
/* THE DEPLOYMENT'S TEMPLATE DEFAULTS, RENDERED ONCE BEFORE A CALLER DEPENDS ON THEM. A value
|
||||
* the chat template refuses is a 400 on every request that leaves it to the default, so a
|
||||
* one-message chat is parsed exactly as a request would be: first with no template defaults,
|
||||
* then with the --chat-template-kwargs ones, then with the --reasoning-effort one as well.
|
||||
* A render that fails at the first step says nothing about the defaults and is not reported.
|
||||
* `kwargs_why` / `effort_why` are left empty, or hold the template's refusal at that step. */
|
||||
void check_template_defaults(std::string* kwargs_why, std::string* effort_why) const;
|
||||
void stop();
|
||||
int port() const { return transport_.port(); } /* 0 until run() is accepting */
|
||||
|
||||
|
||||
Reference in new issue
Block a user