kmesiab / kmesiab/ai-code-critic

Budget Management - Limit token sizes

Open
#40 2 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
Go
Stars
15
Forks
8
PR merge metrics
No merged PRs in 30d

Description

Some diffs can be quite large. Sometimes those large diffs include changes that are not relevant to a code review, like dependency updates.

Sending these diffs to OpenAI will consume credits unecessarily.

Implement a relief valve and budget manager for token usage.
The ability to set a token limit.

This article from Microsoft introduces a strategy for prompt compression with no loss.

https://arxiv.org/abs/2310.05736

Contributor guide

No contributing guide indexed for this repository

Research direction

No files or tests are named. Start by locating the code path that sends diffs to OpenAI and review how token usage is currently measured; define the token-limit behavior and verify that oversized or irrelevant diffs stay within the configured budget.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
ai
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.