Skip to content

chore!: remove the deprecated advisor config request fields - #30982

Draft
ibetitsmike wants to merge 1 commit into
mainfrom
mike/chat-advisor-config-drop-deprecated-fields
Draft

ibetitsmike wants to merge 1 commit into
mainfrom
mike/chat-advisor-config-drop-deprecated-fields

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

Removes the two deprecated advisor model fields, model_config_id and reasoning_effort, from UpdateAdvisorConfigRequest. It also removes the 400 that PUT /api/experimental/chats/config/advisor returned when a client still sent them, and the clamp of negative stored limits in the matching GET. make gen drops the fields from site/src/api/typesGenerated.ts.

Behavior change, approved by Mike: a PUT that still sends model_config_id or reasoning_effort now succeeds, and the endpoint ignores both fields, because httpapi.Read ignores unknown JSON fields. Before, it failed with 400 and named PUT /api/v2/organizations/{organization}/chats/model-overrides/advisor, which has set the advisor model since #28442. Nothing in this repository sends the fields: the settings page sends only the two limits, and no CLI command uses the request type.

Why removing the clamp is safe: putChatAdvisorConfig is the only production writer of agents_advisor_config, and it has rejected negative limits since #24621 added the endpoint, in the same commit as the clamp. No migration writes this key. So a stored limit is never negative.

  • Deleted tests: TestChatAdvisorConfig_StaleModelWriteRejected (the removed 400) and TestChatAdvisorConfig_ClampsNegativeStoredValues (the removed clamp).
  • TestChatAdvisorConfig_IgnoresLegacyReasoningEffort stays. Migration 000583 left old advisor blobs as they were, so upgraded databases can still hold the legacy key, and the test covers how GET reads them.

Review focus: the behavior change, for any client outside this repository that still sends the deprecated fields to this experimental endpoint.

Validation: go test ./coderd -run '^TestChatAdvisorConfig' -count=1 passes (10 tests), go vet ./coderd ./codersdk is clean, and the pre-commit hook passed (make gen, formatting, golangci-lint over every package, and the slim build).

Stack

This stack removes the deprecated advisor config request fields, then runs the advisor config tests on one server.

  1. chore!: remove the deprecated advisor config request fields #30982 Remove the deprecated advisor config request fields
  2. test(coderd): run the advisor config tests on one server #30986 Run the advisor config tests on one server

Xum, an AI agent, opened this PR for @ibetitsmike and wrote this description.

Remove DeprecatedModelConfigID and DeprecatedReasoningEffort from
UpdateAdvisorConfigRequest, and the 400 that PUT
/api/experimental/chats/config/advisor returned when a client still sent
them. Such a request now succeeds and the two fields are ignored. The
advisor model is set through the organization model override endpoint.

Also drop the clamp of negative stored limits in the GET handler. The
PUT handler is the only writer of agents_advisor_config and has rejected
negative limits since the endpoint was added, so a stored limit is never
negative.
@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

Xum, an AI agent, requested this review for @ibetitsmike.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-18T18:03:25.215182Z 9aef2df Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 9aef2dfaaa

ℹ️ 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".

@ibetitsmike ibetitsmike changed the title chore: remove the deprecated advisor config request fields chore!: remove the deprecated advisor config request fields Oct 18, 2026
@github-actions github-actions Bot added the release/breaking This label is applied to PRs to detect breaking changes as part of the release process label Oct 18, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release/breaking This label is applied to PRs to detect breaking changes as part of the release process

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant