Skip to content

feat: extract and surface AI model and version#44

Open
abhinavgautam01 wants to merge 2 commits into
chaoss:mainfrom
abhinavgautam01:issue-29-extract-tool-info
Open

feat: extract and surface AI model and version#44
abhinavgautam01 wants to merge 2 commits into
chaoss:mainfrom
abhinavgautam01:issue-29-extract-tool-info

Conversation

@abhinavgautam01
Copy link
Copy Markdown
Contributor

fixes #29

Description

Previously, all detection data was lumped into a single Detail string, making it difficult to systematically identify the exact AI models and versions being used. This PR introduces dedicated fields for Model and Version in our core detection structures and surfaces them natively in the CLI outputs.

Changes Made

  • Core Update: Added Model and Version fields to the detection.Finding struct.
  • GitNotes Extractor: Updated detection/gitnotes/gitnotes.go to directly capture the model from prompt.AgentID.Model instead of burying it in the detail string.
  • Co-Author Extractor: Added regex parsing in detection/coauthor/coauthor.go to pull out explicit model strings from Co-Authored-By trailers (e.g. aider (gpt-4o) now captures gpt-4o, Claude Opus 4 captures Claude Opus 4, etc.).
  • Output Rendering: Updated the CLI's standard text formatter (output/output.go) to automatically append [model_name] next to the tool name if a model was successfully extracted.
  • Testing: Updated coauthor_test.go to rigorously assert model extractions and verified all project tests pass natively.

Testing

  • go test ./... passes without errors.
  • Text outputs now neatly group tools alongside their respective models (e.g. Aider [gpt-4o]).

Signed-off-by: abhinavgautam01 <abgautam1017@gmail.com>
Copy link
Copy Markdown
Contributor

@MoralCode MoralCode left a comment

Choose a reason for hiding this comment

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

I was skeptical at first given this is a new PR filed so close time-wise to your other one, but overall I like how small and concise the diff is.

Leaving this as comments to see if other contributors/maintainers have feedback, but overall i think this is a good change. I'd like to see maybe more robust parsing that isnt just focused on two frontier models, but id probably be fine with iterating on that over time

Comment thread detection/coauthor/coauthor_test.go Outdated
Comment thread detection/coauthor/coauthor_test.go
Signed-off-by: abhinavgautam01 <abgautam1017@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Extract and surface AI tool type, Model used, and version

2 participants