8000 feat: record model thoughts by dannykopping · Pull Request #22676 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

feat: record model thoughts#22676

Open
dannykopping wants to merge 9 commits intomainfrom
dk/model-thoughts
Open

feat: record model thoughts#22676
dannykopping wants to merge 9 commits intomainfrom
dk/model-thoughts

Conversation

@dannykopping
Copy link
Contributor
@dannykopping dannykopping commented Mar 5, 2026

Copy link
Contributor Author
dannykopping commented Mar 5, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@dannykopping dannykopping force-pushed the dk/model-thoughts branch 2 times, most recently from fadd15c to 414e639 Compare March 6, 2026 09:09
@dannykopping dannykopping force-pushed the dk/session-id-tracking branch from c1f7bee to e329db2 Compare March 6, 2026 12:12
@dannykopping dannykopping changed the base branch from dk/session-id-tracking to graphite-base/22676 March 6, 2026 12:43
@dannykopping dannykopping force-pushed the graphite-base/22676 branch from e329db2 to 13e3df6 Compare March 6, 2026 12:44
@graphite-app graphite-app bot changed the base branch from graphite-base/22676 to main March 6, 2026 12:45
@dannykopping dannykopping force-pushed the dk/model-thoughts branch 3 times, most recently from 01ad85f to 1d7044f Compare March 6, 2026 15:16
@dannykopping dannykopping marked this pull request as ready for review March 6, 2026 15:17
@coder-tasks
Copy link
Contributor
coder-tasks bot commented Mar 6, 2026

Documentation Check

Updates Needed

  • docs/ai-coder/ai-bridge/setup.md - The Data Retention section describes captured data as "prompts, token usage, and tool invocations" — model thoughts (model reasoning) should be added to this list since they are now recorded and subject to retention.
  • docs/ai-coder/ai-bridge/monitoring.md - The intro says "AI Bridge records the last user prompt, token usage, and every tool invocation" — should also mention model thoughts/reasoning are captured. Additionally, if the structured logging section documents the record_type field values, model_thought should be included.

These are minor wording updates reflecting that AI Bridge now captures a new category of data (model reasoning/extended thinking), which users and admins should be aware of for privacy, compliance, and data retention planning.


Automated review via Coder Tasks

'be003e1e-b38f-43bf-847d-928074dd0aa8', -- from 000370_aibridge.up.sql
'613b4cfa-a257-4e88-99e6-4d2e99ea25f0', -- from 000370_aibridge.up.sql (tool usage)
'The user is asking about their workspaces. I should use the coder_list_workspaces tool to retrieve this information.',
'{"thinking_tokens": 42}',
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we setting the metadata field in the aibridge PR? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call!

Comment on lines +3 to +4
interception_id UUID NOT NULL,
tool_usage_id UUID NOT NULL,
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we have a foreign key for interception_id and tool_usage_id? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We opted to not have FKs for any of the aibridge tables for performance.

@dannykopping dannykopping changed the base branch from main to graphite-base/22676 March 12, 2026 12:48
@dannykopping dannykopping changed the base branch from graphite-base/22676 to main March 12, 2026 12:54
Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Store recorded model thoughts

2 participants

0