feat: add configurable reasoning effort to Coder agents (#26974)

This commit is contained in:
Danielle Maywood
2026-07-09 23:35:12 +01:00
committed by GitHub
parent 5fed583a46
commit d66e4d794f
72 changed files with 4389 additions and 1275 deletions
+56 -46
View File
@@ -2105,6 +2105,7 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
"status_code": 0
},
"last_model_config_id": "30ebb95f-c255-4759-9429-89aa4ec1554c",
"last_reasoning_effort": "string",
"last_turn_summary": "string",
"mcp_server_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
@@ -2197,6 +2198,7 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
"status_code": 0
},
"last_model_config_id": "30ebb95f-c255-4759-9429-89aa4ec1554c",
"last_reasoning_effort": "string",
"last_turn_summary": "string",
"mcp_server_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
@@ -2222,39 +2224,40 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
### Properties
| Name | Type | Required | Restrictions | Description |
|------------------------|-----------------------------------------------------------------|----------|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `agent_id` | string | false | | |
| `archived` | boolean | false | | |
| `build_id` | string | false | | |
| `children` | array of [codersdk.Chat](#codersdkchat) | false | | Children holds child (subagent) chats nested under this root chat. Always initialized to an empty slice so the JSON field is present as []. Child chats cannot create their own subagents, so nesting depth is capped at 1 and this slice is always empty for child chats. |
| `client_type` | [codersdk.ChatClientType](#codersdkchatclienttype) | false | | |
| `context` | [codersdk.ChatContext](#codersdkchatcontext) | false | | Context reports the chat's pinned workspace-context state and whether it has drifted from the agent's latest pushed snapshot. Nil when the chat has no pinned context yet. |
| `created_at` | string | false | | |
| `diff_status` | [codersdk.ChatDiffStatus](#codersdkchatdiffstatus) | false | | |
| `files` | array of [codersdk.ChatFileMetadata](#codersdkchatfilemetadata) | false | | |
| `has_unread` | boolean | false | | Has unread is true when assistant messages exist beyond the owner's read cursor, which updates on stream connect and disconnect. |
| `id` | string | false | | |
| `labels` | object | false | | |
| » `[any property]` | string | false | | |
| `last_error` | [codersdk.ChatError](#codersdkchaterror) | false | | |
| `last_model_config_id` | string | false | | |
| `last_turn_summary` | string | false | | |
| `mcp_server_ids` | array of string | false | | |
| `organization_id` | string | false | | |
| `owner_id` | string | false | | |
| `owner_name` | string | false | | |
| `owner_username` | string | false | | |
| `parent_chat_id` | string | false | | |
| `pin_order` | integer | false | | |
| `plan_mode` | [codersdk.ChatPlanMode](#codersdkchatplanmode) | false | | |
| `root_chat_id` | string | false | | |
| `shared` | boolean | false | | Shared is true when this chat's root chat has explicit user or group ACL entries. |
| `status` | [codersdk.ChatStatus](#codersdkchatstatus) | false | | |
| `title` | string | false | | |
| `updated_at` | string | false | | |
| `warnings` | array of string | false | | |
| `workspace_id` | string | false | | |
| Name | Type | Required | Restrictions | Description |
|-------------------------|-----------------------------------------------------------------|----------|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `agent_id` | string | false | | |
| `archived` | boolean | false | | |
| `build_id` | string | false | | |
| `children` | array of [codersdk.Chat](#codersdkchat) | false | | Children holds child (subagent) chats nested under this root chat. Always initialized to an empty slice so the JSON field is present as []. Child chats cannot create their own subagents, so nesting depth is capped at 1 and this slice is always empty for child chats. |
| `client_type` | [codersdk.ChatClientType](#codersdkchatclienttype) | false | | |
| `context` | [codersdk.ChatContext](#codersdkchatcontext) | false | | Context reports the chat's pinned workspace-context state and whether it has drifted from the agent's latest pushed snapshot. Nil when the chat has no pinned context yet. |
| `created_at` | string | false | | |
| `diff_status` | [codersdk.ChatDiffStatus](#codersdkchatdiffstatus) | false | | |
| `files` | array of [codersdk.ChatFileMetadata](#codersdkchatfilemetadata) | false | | |
| `has_unread` | boolean | false | | Has unread is true when assistant messages exist beyond the owner's read cursor, which updates on stream connect and disconnect. |
| `id` | string | false | | |
| `labels` | object | false | | |
| » `[any property]` | string | false | | |
| `last_error` | [codersdk.ChatError](#codersdkchaterror) | false | | |
| `last_model_config_id` | string | false | | |
| `last_reasoning_effort` | string | false | | |
| `last_turn_summary` | string | false | | |
| `mcp_server_ids` | array of string | false | | |
| `organization_id` | string | false | | |
| `owner_id` | string | false | | |
| `owner_name` | string | false | | |
| `owner_username` | string | false | | |
| `parent_chat_id` | string | false | | |
| `pin_order` | integer | false | | |
| `plan_mode` | [codersdk.ChatPlanMode](#codersdkchatplanmode) | false | | |
| `root_chat_id` | string | false | | |
| `shared` | boolean | false | | Shared is true when this chat's root chat has explicit user or group ACL entries. |
| `status` | [codersdk.ChatStatus](#codersdkchatstatus) | false | | |
| `title` | string | false | | |
| `updated_at` | string | false | | |
| `warnings` | array of string | false | | |
| `workspace_id` | string | false | | |
## codersdk.ChatACL
@@ -3980,6 +3983,7 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
"status_code": 0
},
"last_model_config_id": "30ebb95f-c255-4759-9429-89aa4ec1554c",
"last_reasoning_effort": "string",
"last_turn_summary": "string",
"mcp_server_ids": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
@@ -4391,19 +4395,21 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"model_config_id": "f5fb4d91-62ca-4377-9ee6-5d43ba00d205",
"plan_mode": "plan"
"plan_mode": "plan",
"reasoning_effort": "string"
}
```
### Properties
| Name | Type | Required | Restrictions | Description |
|-------------------|-----------------------------------------------------------|----------|--------------|--------------------------------------------------------------------------------------------------------------|
| `busy_behavior` | [codersdk.ChatBusyBehavior](#codersdkchatbusybehavior) | false | | |
| `content` | array of [codersdk.ChatInputPart](#codersdkchatinputpart) | false | | |
| `mcp_server_ids` | array of string | false | | |
| `model_config_id` | string | false | | |
| `plan_mode` | [codersdk.ChatPlanMode](#codersdkchatplanmode) | false | | Plan mode switches the chat's persistent plan mode. nil: no change, ptr to "plan": enable, ptr to "": clear. |
| Name | Type | Required | Restrictions | Description |
|--------------------|-----------------------------------------------------------|----------|--------------|--------------------------------------------------------------------------------------------------------------|
| `busy_behavior` | [codersdk.ChatBusyBehavior](#codersdkchatbusybehavior) | false | | |
| `content` | array of [codersdk.ChatInputPart](#codersdkchatinputpart) | false | | |
| `mcp_server_ids` | array of string | false | | |
| `model_config_id` | string | false | | |
| `plan_mode` | [codersdk.ChatPlanMode](#codersdkchatplanmode) | false | | Plan mode switches the chat's persistent plan mode. nil: no change, ptr to "plan": enable, ptr to "": clear. |
| `reasoning_effort` | string | false | | |
#### Enumerated Values
@@ -4608,6 +4614,7 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
"model_config_id": "f5fb4d91-62ca-4377-9ee6-5d43ba00d205",
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
"plan_mode": "plan",
"reasoning_effort": "string",
"system_prompt": "string",
"unsafe_dynamic_tools": [
{
@@ -4634,6 +4641,7 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
| `model_config_id` | string | false | | |
| `organization_id` | string | false | | |
| `plan_mode` | [codersdk.ChatPlanMode](#codersdkchatplanmode) | false | | |
| `reasoning_effort` | string | false | | |
| `system_prompt` | string | false | | |
| `unsafe_dynamic_tools` | array of [codersdk.DynamicTool](#codersdkdynamictool) | false | | Unsafe dynamic tools declares client-executed tools that the LLM can invoke. This API is highly experimental and highly subject to change. |
| `workspace_id` | string | false | | |
@@ -6975,16 +6983,18 @@ CreateWorkspaceRequest provides options for creating a new workspace. Only one o
"type": "text"
}
],
"model_config_id": "f5fb4d91-62ca-4377-9ee6-5d43ba00d205"
"model_config_id": "f5fb4d91-62ca-4377-9ee6-5d43ba00d205",
"reasoning_effort": "string"
}
```
### Properties
| Name | Type | Required | Restrictions | Description |
|-------------------|-----------------------------------------------------------|----------|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `content` | array of [codersdk.ChatInputPart](#codersdkchatinputpart) | false | | |
| `model_config_id` | string | false | | Model config ID when set, overrides the model used for the replacement user message and the assistant turn that follows. When nil the original message's model is preserved. |
| Name | Type | Required | Restrictions | Description |
|--------------------|-----------------------------------------------------------|----------|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `content` | array of [codersdk.ChatInputPart](#codersdkchatinputpart) | false | | |
| `model_config_id` | string | false | | Model config ID when set, overrides the model used for the replacement user message and the assistant turn that follows. When nil the original message's model is preserved. |
| `reasoning_effort` | string | false | | |
## codersdk.EditChatMessageResponse