Repository navigation
feat(ollama): add reasoning effort selectors and gate on Enable Thinking #1345
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
3ac8333
a31a586
416e0ea
c59b0df
7cf0e61
9e6edc5
391e5aa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,6 +27,7 @@ import { StandardTooltip } from "@src/components/ui" | |
| import Thumbnails from "../common/Thumbnails" | ||
| import { ModeSelector } from "./ModeSelector" | ||
| import { ApiConfigSelector } from "./ApiConfigSelector" | ||
| import { ReasoningEffortSelector } from "./ReasoningEffortSelector" | ||
| import { AutoApproveDropdown } from "./AutoApproveDropdown" | ||
| import { MAX_IMAGES_PER_MESSAGE } from "./ChatView" | ||
| import ContextMenu from "./ContextMenu" | ||
|
|
@@ -1319,6 +1320,7 @@ export const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>( | |
| lockApiConfigAcrossModes={!!lockApiConfigAcrossModes} | ||
| onToggleLockApiConfig={handleToggleLockApiConfig} | ||
| /> | ||
| <ReasoningEffortSelector triggerClassName="min-w-[28px] text-ellipsis overflow-hidden flex-shrink" /> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This adds a visible control to the compact chat toolbar, but the PR adds no
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added |
||
| <AutoApproveDropdown triggerClassName="min-w-[28px] text-ellipsis overflow-hidden flex-shrink" /> | ||
| </div> | ||
| <div className={cn("flex flex-shrink-0 items-center gap-0.5 h-5 leading-none pr-2")}> | ||
|
|
||
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.
Ollama documents GPT-OSS as accepting only
low,medium, orhigh, so this advertises an unsupported Max choice for that model. Can we make the capability list model-specific and add a GPT-OSS regression test?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.
Previously reasoning selector had none - high for every models, thanks for noting about for gpt-oss and
https://docs.ollama.com/capabilities/thinking#python-2according to ollama docs, changes has been made to reflect the reasoning selector for gpt-oss. So, Detection matches on model id, family, or architecture, hyphen/underscore-normalized so "gpt-oss" / "gptoss" / "gpt_oss" all match — Ollama reports family/architecture as gptoss (no hyphen) while the model id keeps the hyphen (gpt-oss:20b/gpt-oss:120b), so checking all three is robust. The supportsReasoningEffort is always an explicit array (never bare true), so the selector respects it verbatim.Added 3 regression tests in ollama.test.ts: gpt-oss advertises exactly ["low","medium","high"] with no max/disable; detection by architecture alone (gptoss); detection by model id alone.