Repository navigation
Studio: Refine chat preset and group built-in presets - #5159
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the chat preset management system by centralizing logic into a new preset-policy.ts module and introducing an activePresetSource state to track the origin of current settings (e.g., built-in, custom, or modified). Key changes include moving preset definitions and validation logic out of the UI components, updating model loading hooks to respect preset sources when applying recommended inference parameters, and enhancing the settings UI with better visual separation between built-in and custom presets. Feedback focuses on improving code consistency by utilizing existing constants and optimizing store access by destructuring properties from a single state call.
dca030a to
f538c92
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f538c92b07
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 585e6ddf58
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Possible duplicate of a trusted maintainer's PR. This PR looks like it solves the same underlying problem as unslothai/unsloth#4325 by @danielhanchen (trusted maintainer).
Canonical PR summary: Studio adds GGUF-aware inference defaults, chat-template overrides, and a per-model reasoning toggle by reading GGUF metadata, applying family-specific config to llama-server, and wiring the true context length and toggle through the backend and chat UI. The auto-review is still running against this PR — reviewers will factor in the canonical above. If this PR is genuinely different, call out the delta in the review discussion so the maintainer can decide which to merge. |
|
Auto-review verdict: Approved PR extracts Studio chat preset logic into a shared preset-policy module and adds an activePresetSource flag so backend-recommended inference defaults only overwrite the built-in Default preset, preserving custom and modified presets across model loads. It makes the three built-in presets immutable (saving creates a numbered copy) and pins them above custom presets with a separator, which is a real UX improvement with correct behavior after the review fixes. Reason: All accepted findings (6 in round 1, 2 in round 2) were fixed; remaining rejected items were style nits or 0.01% edge cases |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7484212845
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Limit chat preset compare/apply/save behavior to temperature, topP, topK, minP, repetitionPenalty, presencePenalty, maxTokens, and systemPrompt. Preserve legacy stored preset data on load for backwards compatibility, but stop treating model-specific settings such as checkpoint, trustRemoteCode, and maxSeqLength as part of preset identity. Also align legacy prompt migration dedupe with the new preset semantics and add invariant coverage for preset-owned config comparisons.
|
Presets now save reusable generation behaviour only, so model-specific settings are no longer bundled with sampling params and system prompts, kept existing configs are backwards compatible. Per-model config will follow in a separately scoped PR @Sneakr. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 70bf4e7988
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3b5fc6ae9c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c47f875eb3
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2e1ca1159d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Summary
Refines chat preset behavior and built-in preset UX.
Default,Creative, andPrecisepinned at the top of dropdownDefaultaligned with backend/model generation defaultsAdditionally narrows presets to sampling params and system prompt only, leaving model specific settings to a separately scoped per model config follow up.
Also extracts shared preset behaviour into a small policy module so the sheet, runtime, and store stay in sync.