{"slug": "how-i-got-my-first-pull-request-merged-into-litellm", "title": "How I got my first pull request merged into LiteLLM", "summary": "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.", "body_md": "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.\n\nLiteLLM 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.\n\nThe 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.\n\nThe fix was to **stop re-compressing content that had just been retrieved** in those client-side tool loops.\n\nI 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.\n\nWhat worked for me:\n\nLiteLLM 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/).\n\nA 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.\n\nThat 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/).\n\nThe 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.\n\nWritten by Ali Ahmed · [Original article](https://aliahmed.si/blog/first-litellm-contribution/)", "url": "https://wpnews.pro/news/how-i-got-my-first-pull-request-merged-into-litellm", "canonical_source": "https://dev.to/ali_ahmed_44ee99051e327ce/how-i-got-my-first-pull-request-merged-into-litellm-58p1", "published_at": "2026-11-05 22:26:22+00:00", "updated_at": "2026-11-05 22:28:47.220323+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "large-language-models", "developer-tools"], "entities": ["LiteLLM", "Ali Ahmed", "BerriAI", "Node.js", "Symfony", "Grafana Pyroscope", "NanoClaw", "SmartLogics"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/how-i-got-my-first-pull-request-merged-into-litellm", "markdown": "https://wpnews.pro/news/how-i-got-my-first-pull-request-merged-into-litellm.md", "text": "https://wpnews.pro/news/how-i-got-my-first-pull-request-merged-into-litellm.txt", "jsonld": "https://wpnews.pro/news/how-i-got-my-first-pull-request-merged-into-litellm.jsonld"}}