Skip to content

Studio: Refine chat preset and group built-in presets - #5159

Merged
shimmyshimmer merged 14 commits into
unslothai:mainfrom
Imagineer99:feat/chat-preset-ux
Apr 28, 2026
Merged

shimmyshimmer merged 14 commits into
unslothai:mainfrom
Imagineer99:feat/chat-preset-ux

Conversation

@Imagineer99

@Imagineer99 Imagineer99 commented Apr 23, 2026 •

Copy link
Copy Markdown
Member

Summary

Refines chat preset behavior and built-in preset UX.

image
  • keep Default, Creative, and Precise pinned at the top of dropdown
  • treat default, creative and precise as immutable and save edits as copies
  • keep Default aligned with backend/model generation defaults
  • preserve custom preset generation settings
  • add a divider between built-in and custom presets in the dropdown

Additionally 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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Imagineer99
Imagineer99 force-pushed the feat/chat-preset-ux branch from dca030a to f538c92 Compare April 23, 2026 22:55
@Imagineer99
Imagineer99 marked this pull request as ready for review April 23, 2026 22:56

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

@danielhanchen

Copy link
Copy Markdown
Member

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).

Direct overlap on GGUF defaults and chat runtime defaults; both adjust context-length and inference behavior for Studio chat.

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.

@danielhanchen danielhanchen added auto-has-duplicate Pre-flight: similar to a trusted maintainer's PR auto-reviewing Auto-review in progress labels Apr 24, 2026
danielhanchen added a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Apr 24, 2026
@danielhanchen
danielhanchen self-requested a review as a code owner April 24, 2026 02:17
@danielhanchen danielhanchen added auto-approved Auto-review approved the PR and removed auto-reviewing Auto-review in progress labels Apr 24, 2026
@danielhanchen

Copy link
Copy Markdown
Member

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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.
@Imagineer99

Copy link
Copy Markdown
Member Author

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

@Imagineer99 Imagineer99 removed the auto-has-duplicate Pre-flight: similar to a trusted maintainer's PR label Apr 27, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

@Imagineer99
Imagineer99 requested a review from wasimysaid April 27, 2026 16:44
@shimmyshimmer
shimmyshimmer merged commit 975a5c3 into unslothai:main Apr 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-approved Auto-review approved the PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants