Skip to content

docs: simplify pull request template into plain English questions - #42813

Merged
kerry-berri merged 1 commit into
mainfrom
litellm_pr_template_plain_english
Sep 23, 2026
Merged

kerry-berri merged 1 commit into
mainfrom
litellm_pr_template_plain_english

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

What's the problem?

The PR template is 162 lines of TLDR, Before/After user flows, checklists, a severity taxonomy for caveats, a QA runbook and an attestation. Descriptions written against it are long, procedural and hard to skim, and it is hard to tell from them what actually changed in the product

What's the solution?

Replace it with seven plain English questions a contributor answers in prose, with a one line hint under each

How does it fix it?

The template now asks: what's the problem, what's the solution (the approach), how does it fix it (the mechanism), how does the product experience change, what major caveats are there, the Linear ticket, and how did you test this. The TLDR, checklist, proof of fix block, QA runbook, caveat severity tiers, Type and Final Attestation sections are gone. The one AGENTS.md sentence that referred to "Screenshots / Proof of Fix" now refers to "How did you test this?"

How does the product experience change?

Contributors opening a PR see a 27 line template instead of 162. Reviewers get a description that reads top to bottom as problem, approach, mechanism, user impact, caveats, then evidence at the bottom. Nothing in the shipped product changes

What caveats are there, if any?

Internal skills and docs that name the old section headings will need a follow up. The ## Linear ticket heading is unchanged so ticket linking keeps working

Linear ticket

How did you test this?

This description is the first one written against the new template. As a backtest, here is the description of the merged PR #41293 (about 180 lines in the old template) rewritten into the new one using only what its body already said, about 40 lines:


What's the problem?

On deployments with a few thousand API keys, the Admin UI Usage page never finishes loading. The query behind it breaks every number down per key, so 3,000 keys over 30 days turns into half a million rows, the database sidecar climbs past 15 GB of memory, and the request times out with a 500 after 30 seconds. The page falls back to paging raw data and shows partial totals that creep up for minutes

What's the solution?

Compute the totals and the per-model, per-provider, per-endpoint breakdowns without touching keys at all, and only list the 100 highest-spend keys individually

How does it fix it?

The aggregated usage query now runs as a single statement with two parts: one key-free rollup that produces every total, plus a second part capped at the top 100 keys by spend. The response reports the cap (metadata.api_key_limit) and how many keys exist (metadata.total_api_keys) so the UI can say when the key list is truncated. The cap is configurable with USAGE_TOP_API_KEYS_LIMIT

How does the product experience change?

Before: an admin with 3,000 keys opens Usage, waits 30 seconds for a 500, then watches partial totals fill in over several minutes with Export disabled

After: the same page loads in about 4 seconds with exact totals across every key. The Key Activity tab lists the 100 highest-spend keys and shows a note "Only the 100 highest-spend keys of 3,000 are loaded". Export Data stays disabled while the list is capped, with a tooltip naming the env var to raise. Deployments with 100 keys or fewer see no difference

What caveats are there, if any?

Only the 100 highest-spend keys are listed, so a key that is big for one model or leaks a lot of uncached input but sits outside the top 100 will not appear in the Key Activity tab, the per-model Top Keys lists, or the Cost Optimization cache leakage card. The Key Activity tab and the cache leakage card say so; the per-model lists do not. Raise USAGE_TOP_API_KEYS_LIMIT to list more

Wall time still grows with row count because the key-free query scans the same table. The follow-up in LIT-7818 adds a rollup table to fix that half

Linear ticket

Resolves LIT-7203

How did you test this?

Seeded a local Postgres with 3,000 keys over 30 days (270,000 rows) and ran the same curl and the same browser steps against a live proxy at the merge base and at the PR tip

Before: GET /user/daily/activity/aggregated returned HTTP 500 in 30.05s, query-engine memory peaked at 15.8 GB, and the Usage page was still paging (55 of 270 pages) after 75 seconds

After: the same call returned HTTP 200 in 4.04s, memory peaked at 612 MB, and total_spend 13,201.65 and total_api_requests 1,350,000 matched psql exactly. Filtered calls (by model, by key, by user, by timezone) and Team Usage all matched psql too. Screenshots of the Usage page and Key Activity tab before and after:

Usage page before
Usage page after
Key Activity after

Link to Devin session: https://app.devin.ai/sessions/98ea5960b1984dc19da81a38313ebfc1
Open in Devin Desktop: https://app.devin.ai/desktop/session/98ea5960b1984dc19da81a38313ebfc1?variant=devin
Requested by: @kerry-berri


Note

Low Risk
Documentation and contributor workflow only; no application, auth, or deployment code paths change

Overview
Replaces the 162-line GitHub PR template with a 27-line version built around seven prose questions: problem, solution, how it fixes the issue, product experience, caveats, Linear ticket, and how it was tested. Removed sections include TLDR, Before/After user flows, pre-submission checklist, Greptile gate, Screenshots/Proof of Fix structure, QA runbook, caveat severity tiers, Type picker, and Final Attestation

AGENTS.md now tells agents to answer "How did you test this?" instead of filling "Screenshots / Proof of Fix", keeping agent guidance aligned with the new template. Shipped product behavior is unchanged; only what contributors see when opening a PR and how maintainers expect descriptions to read

Reviewed by Cursor Bugbot for commit 040d9a1. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@kerry-berri

Copy link
Copy Markdown
Contributor

@greptileai

@kerry-berri

Copy link
Copy Markdown
Contributor

bugbot run

@CLAassistant

CLAassistant commented Sep 23, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 040d9a1. Configure here.

@greptile-apps

greptile-apps Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The documentation-only change appears safe to merge.

Summary

This PR replaces the lengthy pull-request template with seven plain-English prompts and updates AGENTS.md to reference the renamed testing section.

  • Retains the exact ## Linear ticket heading used for ticket linking.
  • Preserves live-proxy testing guidance while presenting a shorter contributor workflow.
  • Does not change shipped product behavior or runtime code.

Reviews (1) · Last reviewed commit: "docs: simplify pull request template int..."

@kerry-berri
kerry-berri merged commit deab924 into main Sep 23, 2026
98 checks passed
@kerry-berri
kerry-berri deleted the litellm_pr_template_plain_english branch September 23, 2026 22:55
kerry-berri added a commit that referenced this pull request Sep 24, 2026
…ions (#42813)" (#42828)

This reverts commit deab924.

Co-authored-by: kerry <kerry@berri.ai>
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.

3 participants