Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
939ede86
Unverified
Commit
939ede86
authored
Sep 09, 2025
by
Neal Vaidya
Committed by
GitHub
Sep 09, 2025
Browse files
fix: no reasoning parser by default (#2939)
Signed-off-by:
Neal Vaidya
<
nealv@nvidia.com
>
parent
8e4ae22b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
26 deletions
+25
-26
components/backends/sglang/src/dynamo/sglang/args.py
components/backends/sglang/src/dynamo/sglang/args.py
+1
-1
components/backends/trtllm/src/dynamo/trtllm/utils/trtllm_utils.py
...s/backends/trtllm/src/dynamo/trtllm/utils/trtllm_utils.py
+1
-1
components/backends/vllm/src/dynamo/vllm/args.py
components/backends/vllm/src/dynamo/vllm/args.py
+1
-1
lib/llm/src/protocols/openai/chat_completions/delta.rs
lib/llm/src/protocols/openai/chat_completions/delta.rs
+22
-23
No files found.
components/backends/sglang/src/dynamo/sglang/args.py
View file @
939ede86
...
...
@@ -45,7 +45,7 @@ DYNAMO_ARGS: Dict[str, Dict[str, Any]] = {
"type"
:
str
,
"default"
:
None
,
"choices"
:
get_reasoning_parser_names
(),
"help"
:
"Reasoning parser name for the model."
,
"help"
:
"Reasoning parser name for the model.
If not specified, no reasoning parsing is performed.
"
,
},
}
...
...
components/backends/trtllm/src/dynamo/trtllm/utils/trtllm_utils.py
View file @
939ede86
...
...
@@ -283,7 +283,7 @@ def cmd_line_args():
type
=
str
,
default
=
None
,
choices
=
get_reasoning_parser_names
(),
help
=
"Reasoning parser name for the model."
,
help
=
"Reasoning parser name for the model.
If not specified, no reasoning parsing is performed.
"
,
)
args
=
parser
.
parse_args
()
...
...
components/backends/vllm/src/dynamo/vllm/args.py
View file @
939ede86
...
...
@@ -114,7 +114,7 @@ def parse_args() -> Config:
type
=
str
,
default
=
None
,
choices
=
get_reasoning_parser_names
(),
help
=
"Reasoning parser name for the model."
,
help
=
"Reasoning parser name for the model.
If not specified, no reasoning parsing is performed.
"
,
)
parser
.
add_argument
(
"--custom-jinja-template"
,
...
...
lib/llm/src/protocols/openai/chat_completions/delta.rs
View file @
939ede86
...
...
@@ -64,7 +64,8 @@ pub struct DeltaGenerator {
/// Reasoning Parser object
/// This is used to parse reasoning content in the response.
reasoning_parser
:
ReasoningParserWrapper
,
/// None means no reasoning parsing will be performed.
reasoning_parser
:
Option
<
ReasoningParserWrapper
>
,
}
impl
DeltaGenerator
{
...
...
@@ -96,17 +97,12 @@ impl DeltaGenerator {
};
// Reasoning parser type
// This is hardcoded for now, but can be made configurable later.
// TODO: Make parser type configurable once front-end integration is determined
// Change to GptOss to test GptOSS parser
// Reasoning parser wrapper
let
reasoning_parser
=
ReasoningParserType
::
get_reasoning_parser_from_name
(
options
.runtime_config
.reasoning_parser
.as_deref
()
.unwrap_or
(
"basic"
),
);
// If no parser is specified (None), no reasoning parsing will be performed
let
reasoning_parser
=
options
.runtime_config
.reasoning_parser
.as_deref
()
.map
(
ReasoningParserType
::
get_reasoning_parser_from_name
);
let
chatcmpl_id
=
format!
(
"chatcmpl-{request_id}"
);
...
...
@@ -202,13 +198,15 @@ impl DeltaGenerator {
text
:
&
Option
<
String
>
,
token_ids
:
&
[
u32
],
)
->
Option
<
ParserResult
>
{
// If no reasoning parser is configured, return None
let
reasoning_parser
=
self
.reasoning_parser
.as_mut
()
?
;
let
text_ref
=
text
.as_deref
()
.unwrap_or
(
""
);
if
text_ref
.is_empty
()
&&
token_ids
.is_empty
()
{
return
None
;
}
let
parser_result
=
self
.reasoning_parser
.parse_reasoning_streaming_incremental
(
text_ref
,
token_ids
);
let
parser_result
=
reasoning_parser
.parse_reasoning_streaming_incremental
(
text_ref
,
token_ids
);
Some
(
parser_result
)
}
...
...
@@ -334,14 +332,15 @@ impl crate::protocols::openai::DeltaGeneratorExt<NvCreateChatCompletionStreamRes
None
=>
None
,
};
let
reasoning_parser_result
=
self
.create_reasoning_content
(
&
delta
.text
,
&
delta
.token_ids
)
.unwrap_or_default
();
let
(
normal_text
,
reasoning_content
)
=
(
reasoning_parser_result
.get_some_normal_text
(),
reasoning_parser_result
.get_some_reasoning
(),
);
// Handle reasoning parsing if enabled, otherwise treat all text as normal
let
(
normal_text
,
reasoning_content
)
=
match
self
.create_reasoning_content
(
&
delta
.text
,
&
delta
.token_ids
)
{
Some
(
reasoning_parser_result
)
=>
(
reasoning_parser_result
.get_some_normal_text
(),
reasoning_parser_result
.get_some_reasoning
(),
),
None
=>
(
delta
.text
,
None
),
};
// Create the streaming response.
let
index
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment