Files
coder/codersdk
Hugo Dutka 31146642ba fix(codersdk/toolsdk): select default chat org based on recent usage (#28543)
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>
2026-08-26 14:52:44 +02:00
..
…