feat: org-scope the chat model config API - #27959
Draft
ethanndickson wants to merge 1 commit into
Draft
Conversation
Docs previewCheck off each page once it's been reviewed. If a page changes in a later push, its checkbox clears automatically so it gets a fresh look. Pages not yet wired into the docs navigation aren't listed here. |
Move chat model configuration endpoints under the organization scope, add the chat model config param middleware, and remove the default organization fallback in chatd. The management list intentionally returns disabled configs to readers (the response carries enabled). Availability keeps the enabled-only contract because it feeds the model picker. coderd/x/chatd/title_override.go changes the model override failure mode from hard to soft.
ethanndickson
force-pushed
the
ethan/codagt-709-model-config-api
branch
from
August 10, 2026 06:57
be2b1b4 to
e9f0c68
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of CODAGT-709.
The backend cutover. Model management moves to
GET/POST/api/experimental/organizations/{organization}/chats/models, with flat item routes at/api/experimental/chats/models/{model}behind a new param middleware, and runtime discovery at.../models/available(the org-scoped relocation of the old deployment-wideGET /chats/models). The old/chats/model-configstree is deleted. Write handlers swap their interimdeployment_configgates forchat_model_configobject checks, chatd loses the default-organisation fallback, and cross-org model use is rejected.This PR is runtime-broken on its own: the frontend still calls the deleted routes and no required check catches it, so it must merge together with the frontend PR above it. Anything deployed between the two will have a broken model settings page.
The org list response becomes
{models, providers}, where providers are redacted descriptors (key presence booleans only, read under the chatd subject). Two behaviour notes: the management list intentionally returns disabled configs to members (the response carriesenabled, and user-context pages need the full readable set), whilst/availablekeeps the enabled-only contract because it feeds the model picker. The original cutover dropped that filter; I restored it here with a test. Title generation's deployment-wide model override also changes from hard to soft failure, since after org-scoping the override may not resolve for chats outside the default organisation.The seven legacy provider routes that return 410 are untouched; removing them is a follow-up PR.