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
+22 -2
View File
@@ -350,6 +350,16 @@ CREATE TYPE chat_plan_mode AS ENUM (
'plan'
);
CREATE TYPE chat_reasoning_effort AS ENUM (
'none',
'minimal',
'low',
'medium',
'high',
'xhigh',
'max'
);
CREATE TYPE chat_status AS ENUM (
'waiting',
'pending',
@@ -1938,9 +1948,12 @@ CREATE TABLE chat_messages (
deleted boolean DEFAULT false NOT NULL,
provider_response_id text,
api_key_id text,
revision bigint NOT NULL
revision bigint NOT NULL,
reasoning_effort chat_reasoning_effort
);
COMMENT ON COLUMN chat_messages.reasoning_effort IS 'Stores the selected effort for the turn triggered by this message.';
CREATE SEQUENCE chat_messages_id_seq
START WITH 1
INCREMENT BY 1
@@ -1986,9 +1999,12 @@ CREATE TABLE chat_queued_messages (
model_config_id uuid,
api_key_id text,
"position" bigint DEFAULT nextval('chat_queued_messages_position_seq'::regclass) NOT NULL,
created_by uuid NOT NULL
created_by uuid NOT NULL,
reasoning_effort chat_reasoning_effort
);
COMMENT ON COLUMN chat_queued_messages.reasoning_effort IS 'Stores the selected effort until the queued row is promoted.';
CREATE SEQUENCE chat_queued_messages_id_seq
START WITH 1
INCREMENT BY 1
@@ -2062,6 +2078,7 @@ CREATE TABLE chats (
context_dirty_since timestamp with time zone,
context_dirty_resources jsonb,
context_error text DEFAULT ''::text NOT NULL,
last_reasoning_effort chat_reasoning_effort,
CONSTRAINT chat_acl_only_on_root_chats CHECK ((((parent_chat_id IS NULL) AND (root_chat_id IS NULL)) OR ((user_acl = '{}'::jsonb) AND (group_acl = '{}'::jsonb)))),
CONSTRAINT chat_group_acl_not_null_jsonb CHECK (((group_acl IS NOT NULL) AND (jsonb_typeof(group_acl) = 'object'::text))),
CONSTRAINT chat_user_acl_not_null_jsonb CHECK (((user_acl IS NOT NULL) AND (jsonb_typeof(user_acl) = 'object'::text))),
@@ -2083,6 +2100,8 @@ COMMENT ON COLUMN chats.context_dirty_resources IS 'Deterministic prefix of reso
COMMENT ON COLUMN chats.context_error IS 'Snapshot-level error copied from the pinned snapshot (count cap exceeded, watcher degraded, etc.). Empty when healthy.';
COMMENT ON COLUMN chats.last_reasoning_effort IS 'Stores the most recent message effort once per-turn selection is wired.';
CREATE TABLE users (
id uuid NOT NULL,
email text NOT NULL,
@@ -2148,6 +2167,7 @@ CREATE VIEW chats_expanded AS
c.parent_chat_id,
c.root_chat_id,
c.last_model_config_id,
c.last_reasoning_effort,
c.archived,
c.last_error,
c.mode,