github / github/app

Agent merge - eats up tokens for something that could be a simple API call.

Aperta
#185 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Bugs
Lingua principale
Nessun dato sulla lingua
Stelle
2.1k
Fork
153
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### Feature summary

Instead of using the AI and AI credits (soon) simple checks for failing checks or missing reviewers could be an API call

### What problem are you trying to solve?

Currently, Agent Merge appears to invoke AI workflows even for simple deterministic checks such as:

Missing reviewers
Failed CI checks
Mergeability status

These checks could likely be handled through standard GitHub API calls without requiring AI model invocation.

This matters because Agent Merge may remain active for long periods (for example overnight), where repeated polling/checking could accumulate substantial token usage over time.

### Proposed solution

Before invoking AI, perform lightweight GitHub API checks for common deterministic conditions.

For example:

If required reviewers are the only thing missing → return a formatted response immediately

Only invoke AI when actual reasoning, summarization, or decision-making is required.

This would create a lightweight “short-circuit” path before the full AI workflow executes.

### Workflow impact

This could significantly reduce token usage and operational cost while still preserving the full Agent Merge experience when AI capabilities are actually needed.

In my testing, a single enable/disable cycle of Agent Merge appeared to consume roughly:

400k–600k input tokens
~0.4k output tokens

It is difficult from the current UI to understand:

Which model is being used for each interaction
Whether lightweight checks already bypass premium models internally (doesnt seem like it as token use is going up)
How much token usage is cached vs newly processed
What the actual billable token usage is

Additional visibility into token accounting and model selection would also help users better understand operational cost and optimize usage patterns.

### Installation context

_No response_

### Additional context

_No response_

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.