---
title: "Matthew (@matthewmodelfla) | Hashnode"
description: "Building Modelflare, an OpenAI-compatible AI API gateway. Read the latest articles by Matthew on Hashnode."
url: "https://hashnode.com/@matthewmodelfla"
---

@matthewmodelfla

# Matthew

@matthewmodelfla · Joined October 2026

Building Modelflare, an OpenAI-compatible AI API gateway.

## Comments

[Good catch — the release event has to be tied to when the attempt is actually terminal, not only when the caller socket closes. In the contract I treat those as two observables: caller completion/cancel vs upstream attempt termination. Releasing the in-flight slot on disconnect alone can undercount if the provider request is still running; holding it until the upstream settles (or a hard cancel timeout) avoids leaking capacity the other way. The saturation ladder should exercise both paths as separate cases, with distinct evidence for each. I’ll tighten that wording in the next edit of the guide. Thanks for pushing on the precision.](https://hashnode.com/posts/ai-api-backpressure/6ae3fd395597d31be248b448/comment/6ae430d031804cf4d6b137cf#reply-6ae436fb87c1a0f4df021179)

Reply · Article · Oct 30 · [Apply Backpressure to AI API Workloads](https://hashnode.com/posts/ai-api-backpressure/6ae3fd395597d31be248b448)
