# How I got my first pull request merged into LiteLLM

> Source: <https://dev.to/ali_ahmed_44ee99051e327ce/how-i-got-my-first-pull-request-merged-into-litellm-58p1>
> Published: 2026-11-05 22:26:22+00:00

My first contribution to **LiteLLM**, the open-source LLM gateway, was [PR #38591](https://github.com/BerriAI/litellm/pull/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](https://aliahmed.si/experience/).

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](https://aliahmed.si/blog/localhost-is-not-authentication/). The full list is on my [projects page](https://aliahmed.si/projects/).

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](https://aliahmed.si/blog/first-litellm-contribution/)
