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. #30982 Remove the deprecated advisor config request fields
2. #30986 Run the advisor config tests on one server
> Xum, an AI agent, opened this PR for @ibetitsmike and wrote this
description.