-
Notifications
You must be signed in to change notification settings - Fork 36
fix(profiles): gate DeepSeek thinking-off default on reasoning-hint compatibility #122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
himorishige
wants to merge
1
commit into
NVIDIA-NeMo:main
Choose a base branch
from
himorishige:fix/deepseek-overrides-reasoning-hint
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice — gating the tier default on
model_accepts_reasoning_hintmatches what the classifier already does, so both paths now agree on when to sendenable_thinking=false. (For context:apply_deepseek_overridessets default request options for DeepSeek tier calls, and this hint is one of them.)One thing to flag for later: both the tier default (this function) and the classifier default now depend on that one check being complete. The check works by looking for provider names inside the model id, so a new backend that rejects the hint will still receive it until someone remembers to add its name to
_NO_REASONING_HINT_TAGS. That is easy to forget, and the failure shows up as a hard 400 in production.Concrete suggestion: consider deciding this on the target/endpoint config rather than the model name. For example, add an optional
accepts_reasoning_hintflag to the target (LlmTargetinllm_target.py), default it frommodel_accepts_reasoning_hint(model)when the config doesn't set it, and have bothapply_deepseek_overridesand the classifier presets read that flag. Then a strict backend can be marked incompatible in its own config, with no code change and no name list to keep in sync.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review — agreed on both points.
On the fragility: yes, with this PR both the tier default and the classifier default hang off
_NO_REASONING_HINT_TAGS, and a new strict backend silently inherits the hint until someone adds its name. Your Azure example on #123 already demonstrates a miss.On moving the decision to the target config — one implementation note from reading current
main:LlmTargetis owned by the Rust extension (switchyard_rust.components);llm_target.pyonly hostscoerce_llm_target()and helpers. So anaccepts_reasoning_hintfield on the target itself means a Rust-side schema change, not just a Python default. Two Python-side shapes that stay closer to the current layout:llm_target_with_runtime_defaults(), which already maps model-name fragments (nemotron-3-super) to a thinking-offextra_bodywith an explicit-extra_bodyguard — so per-model request defaults keep living in one place; orreasoning_effort: "none"), not merely to suppress this one, and a boolean flag can never express that.Happy to keep this PR as the minimal consistency fix (both paths agreeing on one check) and follow up with the config/map work as a separate PR — your call on which shape you'd want.