mirror of
https://github.com/coder/coder.git
synced 2026-10-31 02:43:21 +08:00
When `coder_create_chat` omitted `organization_id`, it selected the first organization membership, which could choose an organization without an available chat model. Default to the organization used by the user's most recently updated chat. For users with multiple organizations and no prior chats, return a descriptive error requiring `organization_id`; single-organization behavior is unchanged. Closes https://linear.app/codercom/issue/CODAGT-968/fix-mcp-chat-creation-organization-selection <details> <summary>Coder Agents disclosure</summary> This pull request was generated by Coder Agents. </details>