Skip to content

feat: org-scope the chat model config API - #27959

Draft
ethanndickson wants to merge 1 commit into
ethan/codagt-709-model-config-sdk-renamefrom
ethan/codagt-709-model-config-api
Draft

feat: org-scope the chat model config API#27959
ethanndickson wants to merge 1 commit into
ethan/codagt-709-model-config-sdk-renamefrom
ethan/codagt-709-model-config-api

Conversation

@ethanndickson

@ethanndickson ethanndickson commented Aug 10, 2026

Copy link
Copy Markdown
Member

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-wide GET /chats/models). The old /chats/model-configs tree is deleted. Write handlers swap their interim deployment_config gates for chat_model_config object 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 carries enabled, and user-context pages need the full readable set), whilst /available keeps 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.

@linear-code

linear-code Bot commented Aug 10, 2026

Copy link
Copy Markdown

CODAGT-709

@github-actions

Copy link
Copy Markdown

Docs preview

Check 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant