cd /news/ai-agents/how-i-got-my-first-pull-request-merg… · home › topics › ai-agents › article
[ARTICLE · art-164938] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

How I got my first pull request merged into LiteLLM

Ali Ahmed merged his first contribution to LiteLLM, the open-source LLM gateway, with PR #38591, which fixed a bug where content retrieved by an agent's tool loop was re-compressed into the same reference, causing agents to loop or answer from an empty skeleton. The fix stops re-compressing content that was just retrieved in client-side tool loops. Ahmed has since contributed to Node.js, Symfony, Grafana Pyroscope, LibrePods and NanoClaw.

by read2 min views1 publishedNov 5, 2026

My first contribution to LiteLLM, the open-source LLM gateway, was PR #38591. It fixed a bug where content an agent had retrieved was compressed again and lost, which made agents loop. It was merged. If you want to make your first open-source contribution, the short version is: pick a project you already use, reproduce one specific bug, fix only that bug, and let the project's CI teach you its standards.

LiteLLM can compress long context before sending it to a model. Large content is swapped for a compact reference, and the model can call a retrieval tool with that reference to get the full content back when it needs it.

The bug hit clients that run their own tool loop. When the agent asked for the full content, the retrieved text went back through compression and was replaced by the same reference again. The agent never saw the content it had asked for, so it either asked again (a loop) or answered from an empty skeleton.

The fix was to stop re-compressing content that had just been retrieved in those client-side tool loops.

I wasn't hunting for a famous repository. I was using LiteLLM, had some free time, and saw something I could pick up. That's the best starting point, because you already understand the problem as a user.

What worked for me:

LiteLLM is a big, fast-moving repository, and its CI/CD is thorough: linting, type checks, a large test suite and more. Going through those checks was one of the most useful parts. I picked up ideas I've since applied to my own projects, including at SmartLogics.

A big project's CI is a free code review of your habits. Let it fail, read why, and fix it properly rather than working around it.

That first PR made the next ones easier. I've since contributed to Node.js (counting buffered HTTP output in bytes, not string length, so backpressure works), Symfony, Grafana Pyroscope, LibrePods, and NanoClaw, where I wrote a fix for an unauthenticated loopback webhook. The full list is on my projects page.

The best part wasn't the code. It was seeing that a small, careful fix to a project used by thousands of people is completely within reach. Here's to many more.

Written by Ali Ahmed · Original article

── more in #ai-agents 4 stories · sorted by recency
── more on @litellm 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-i-got-my-first-p…] indexed:0 read:2min 2026-11-05 · —