feat: allow overriding advisor reasoning effort#27196
Conversation
Adds an optional reasoning_effort to the advisor config. The effort is only accepted alongside a dedicated advisor model and is validated against that model's selectable efforts. The Coder Agents settings page now uses the shared ModelSelector with its effort slider for the advisor override.
Docs preview📖 View docs preview for |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 953adada20
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…soning effort on save
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 84d6a6875e
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… selector The shared ModelSelector gains an optional unsetLabel entry that selects the empty value, so admins can switch the advisor back to the chat model without the Clear button that also resets the usage limits.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 83bae83667
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…empty on save Only sanitize a stored reasoning effort when one was explicitly set. An empty effort now survives unrelated form edits so the advisor keeps following the model config's default.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 24db316621
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ith no model options A selector with an unsetLabel no longer disables itself when the options list is empty, so an override pointing at a disabled model can still be switched back to the chat model without Clear.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5ad6b1a464
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…rt and unset styling Drop a stored reasoning effort on save when the selected model is unavailable so unrelated edits are not rejected, and base the unset option's selected styling on the value being empty rather than on whether the selected model resolved.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fcb840ac3d
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ile model configs load Only drop a stored reasoning effort once the model config list has loaded successfully and proven the saved model unavailable. Loading, refetching, or errored config queries keep the stored effort intact.
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Adds an optional reasoning effort override for the Advisor on the Coder Agents settings page, using the same model selector + effort slider that other agent overrides use.
Changes
codersdk/coderd:AdvisorConfiggains an optionalreasoning_effort. It is only accepted alongside a dedicated advisormodel_config_idand is validated against that model's selectable efforts (400 with the selectable values otherwise). GET ignores stray legacy values without a model config.chatd: when an advisor model override resolves and an effort is configured, the advisor call uses that effort as its fixed default/max. If the advisor model is unavailable and the runtime falls back to the chat model, the override effort is not applied.AdvisorSettingsnow uses the sharedModelSelectorwith its Effort slider. Selecting a model initializes the effort from the model's default; an explicitly unset effort stays empty so the advisor follows the model config's default.ModelSelectorgains an optionalunsetLabelentry ("Use chat model" for the advisor) so the model can be unset without the Clear button that also resets usage limits; it stays usable when no enabled models exist.Testing
TestChatAdvisorConfig_*(coderd), advisor runtime/override tests (chatd), Storybook stories for the settings page.chat-advisorexperiment: selected a reasoning model, moved the slider to High, saved, verified API round-trip and reload persistence, cleared and verified the effort is dropped, plus API validation assertions (effort without model 400, invalid effort 400 with selectable values).