[Rust Frontend] Carry reasoning controls over gRPC (#59836)

Signed-off-by: Alec Flowers <aflowers@nvidia.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
Co-authored-by: Bugen Zhao <i@bugenzhao.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alec
2026-10-09 11:11:19 +08:00
committed by GitHub
co-authored by Bugen Zhao Claude Opus 5.5
parent a1cd0ec650
commit 51ef239768
5 changed files with 108 additions and 5 deletions
+22
View File
@@ -58,6 +58,25 @@ message GenerateRequest {
optional bool watermarking = 16;
KVHintsEnvelope kv_hints = 17;
// Transitional, to be deprecated: only consulted when the engine runs its own
// reasoning parser and the structured-output constraint covers only the
// output after reasoning. Prefer a constraint that covers the full output
// from the first generated token.
EngineReasoningGate engine_reasoning_gate = 18;
}
// Inputs to the engine's reasoning gate, which keeps a structured-output
// constraint inactive until the engine's reasoning parser detects the end of
// reasoning.
message EngineReasoningGate {
// Omitted: the engine infers the initial state from the prompt.
// true: apply the constraint from the first generated token.
// false: generation starts inside reasoning.
optional bool reasoning_ended = 1;
// Chat template kwargs used to render the prompt, so the engine's reasoning
// parser observes the same thinking mode.
google.protobuf.Struct chat_template_kwargs = 2;
}
message KVHintsEnvelope {
@@ -118,6 +137,9 @@ message StoppingCriteria {
bool include_stop_strings = 5;
bool ignore_eos = 6;
// Omitted or -1 disables the budget; zero immediately closes reasoning.
optional int64 thinking_token_budget = 7;
}
message ResponseOptions {