github / github/app

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

Ouverte
#185 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Bugs
Langage dominant
Aucune donnée de langage
Étoiles
2.1k
Forks
153
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

### 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_

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.