refactor!: remove default organization model routes by ethanndickson · Pull Request #28632 · coder/coder · GitHub
Skip to content

refactor!: remove default organization model routes - #28632

Merged
ethanndickson merged 2 commits into
ethan/chat-model-acl-availablefrom
refactor/coderd-remove-default-org-model-routes
Aug 27, 2026
Merged

refactor!: remove default organization model routes#28632
ethanndickson merged 2 commits into
ethan/chat-model-acl-availablefrom
refactor/coderd-remove-default-org-model-routes

Conversation

@ethanndickson

@ethanndickson ethanndickson commented Aug 26, 2026

Copy link
Copy Markdown
Member

Important

Most of the added lines in this PR are generated API reference content for publishing the organization-scoped GET and POST /api/v2/organizations/{organization}/chats/models replacements. There is no matching generated-doc deletion because the three removed default-organization endpoints are experimental and are not present in the generated public API reference on the current base. The removed paths remain only as explicit 404 reservations, with no default-organization shim or functional handler.

Summary

Remove the unused default-organization chat model collection routes:

GET  /api/experimental/chats/models
GET  /api/experimental/chats/model-configs
POST /api/experimental/chats/model-configs

Use the organization-scoped collection instead:

GET  /api/v2/organizations/{organization}/chats/models
POST /api/v2/organizations/{organization}/chats/models

Context

The intention of PR #28440 was to consolidate model availability into the organization-scoped models collection for CODAGT-898 and remove the superseded collection routes. That PR removed /organizations/{organization}/chats/models/available, but it missed these older default-organization routes and explicitly retained one of them. This PR completes the intended #28440 cutover. The repository has no SDK, CLI, or frontend consumer for the removed routes.

This change also prevents PR #28496 from promoting the missed default-organization /chats/models route into the stable /api/v2 API.

This change is separate from the one-release /api/experimental compatibility window in CODAGT-921. That window preserves experimental versions of the intended stable API. It does not require compatibility routes for unused deployment-scoped endpoints.

Refs CODAGT-898.

Breaking change

Clients that call the removed routes must use the organization-scoped model collection and provide an organization.

Changelog

Remove unused default-organization Coder Agents model API routes. API clients must use the organization-scoped chat models collection.

Note

Coder Agents generated this pull request on Ethan Dickson's behalf.

@linear-code

linear-code Bot commented Aug 26, 2026

Copy link
Copy Markdown

@ethanndickson
ethanndickson force-pushed the refactor/coderd-remove-default-org-model-routes branch from 95aa29d to d5c5aa8 Compare August 26, 2026 12:48
@github-actions

github-actions Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

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.

@ethanndickson
ethanndickson changed the base branch from main to ethan/chat-model-acl-available August 26, 2026 12:48
@ethanndickson
ethanndickson force-pushed the refactor/coderd-remove-default-org-model-routes branch from d5c5aa8 to edc8c08 Compare August 26, 2026 12:49
@ethanndickson ethanndickson changed the title refactor!(coderd): remove default organization model routes refactor!: remove default organization model routes Aug 26, 2026
@ethanndickson
ethanndickson marked this pull request as ready for review August 26, 2026 13:17
@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 Aug 26, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: edc8c086d7

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

Comment thread docs/reference/api/chats.md
@ethanndickson

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 89f27a1d56

ℹ️ 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 added a commit that referenced this pull request Aug 26, 2026
Address review feedback on the /api/v2 chat promotion:

- Collapse the per-group chat register helpers into a single
  registerChatAPIRoutes mounted once per API prefix, inverting the
  unpromoted experimental routes and the /api/v2 404 reservations into
  chat_routes.go behind a chatAPIPrefix selector. Merge the MCP OAuth2
  helper pair and fold the organization MCP server config routes into
  registerOrganizationChatRoutes.
- Keep GET /chats/models experimental-only instead of promoting it: the
  organization-scoped models collection supersedes it and #28632
  removes it. /api/v2/chats/models now 404s via a segment reservation.
- Reword the MCP OAuth2 callback TODO: providers pin the redirect URI
  for existing sessions, so promotion needs a re-auth story rather than
  a redirect URI migration.
- Fold the chat file @produce exceptions into the swagger parser's
  existing no-response-model exception list.
ibetitsmike added a commit that referenced this pull request Aug 26, 2026
GET /chats/models is no longer promoted to /api/v2 (superseded by the
organization-scoped collection; #28632 removes it), so point the
disclosure comparison back at the experimental path.
@ibetitsmike

Copy link
Copy Markdown
Collaborator

Heads up: review feedback on #28496 (968b807) moved the default-organization model routes you're removing here. They're no longer registered inline in coderd.go; the /chats/model-configs and /chats/models mounts now live in coderd/chat_routes.go inside the experimental branch of registerChatAPIRoutes, and GET /chats/models is no longer promoted to /api/v2 (it 404s there via a segment reservation). Expect a conflict in that file when you restack, and the /models v2 reservation can go away entirely once this lands after the compatibility window.

🤖 Posted by Xum on Mike's behalf.

ibetitsmike added a commit that referenced this pull request Aug 26, 2026
GET /chats/models is no longer promoted to /api/v2 (superseded by the
organization-scoped collection; #28632 removes it), so point the
disclosure comparison back at the experimental path.
@ethanndickson
ethanndickson force-pushed the refactor/coderd-remove-default-org-model-routes branch 3 times, most recently from b968673 to a19d675 Compare August 26, 2026 14:53
@ethanndickson

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a19d6755bc

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

Comment thread coderd/chat_routes.go
@ethanndickson
ethanndickson force-pushed the refactor/coderd-remove-default-org-model-routes branch 2 times, most recently from a6ec22e to 06dcc05 Compare August 26, 2026 15:10
@ethanndickson

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 06dcc05534

ℹ️ 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 force-pushed the refactor/coderd-remove-default-org-model-routes branch from 06dcc05 to e1140af Compare August 26, 2026 16:46
@ibetitsmike
ibetitsmike force-pushed the refactor/coderd-remove-default-org-model-routes branch from e1140af to 9f460fd Compare August 26, 2026 17:25
@ibetitsmike

Copy link
Copy Markdown
Collaborator

Updated this branch by merging the new base tip b390553d (pixel storybook fix in ChatModelSharingDialog.stories.tsx); the same Empty ACL capture failure reproduced on this head. GitHub refuses update-branch for stacked PRs, hence the manual merge commit.

@codex review

Please review current head 7f459631a3dbf99f4b3b00d0468ee0b646d879ab.

Xum acted on Mike's behalf.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 7f459631a3

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

Copy link
Copy Markdown
Collaborator

Merged the updated base (which now includes main and the #28593 conflict resolution, see #28542). No conflicts on this branch; go build over coderd/codersdk/enterprise passes on the merged tree.

@codex review

Please review current head 3f5fedf37006c3751360e407843bfef11221f668.

Xum acted on Mike's behalf.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 3f5fedf370

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

@ethanndickson
ethanndickson force-pushed the refactor/coderd-remove-default-org-model-routes branch from 3f5fedf to 76d8c5e Compare August 27, 2026 08:57
@ethanndickson

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

@ethanndickson
ethanndickson force-pushed the refactor/coderd-remove-default-org-model-routes branch from 76d8c5e to f513360 Compare August 27, 2026 09:33
@ethanndickson
ethanndickson merged commit 0f5c7b3 into main Aug 27, 2026
39 of 60 checks passed
@ethanndickson
ethanndickson deleted the refactor/coderd-remove-default-org-model-routes branch August 27, 2026 09:49
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cherry-pick 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.

2 participants