I built an async wrapper for OpenAI/Anthropic SDKs because I didn't want a proxy in my request path
I kept running into the same tradeoff building cost tooling for teams shipping LLM features. Every attribution tool in this space works the same way: you point base_url at a proxy, and it sees every call before it happens. That's genuinely useful if you want to block or downgrade a call before it fires. It also means the proxy's uptime is now your uptime, and you've added a network hop to every…
The author of Cognocient, a Python wrapper for OpenAI and Anthropic SDKs, explains why they created the tool. They observed a common tradeoff in developing tools for teams working with large language model (LLM) features: attribution tools usually require a proxy, which can impact uptime and add a network hop to each request. The author wanted attribution without modifying the request path.
Therefore, they built a wrapper that directly calls the OpenAI and Anthropic Python clients, timing the calls and generating cost reports in the background after the real response is returned to the code. The wrapper ensures that any failure in the reporting endpoint does not affect the application, as it stays invisible to the user.
The wrapper provides per-call cost information and tags for chargeback reporting, but does not prevent calls from being blocked if they exceed budget. Streaming responses are not supported yet, but the author plans to implement this feature in the future. The wrapper is MIT licensed and currently at version v0.1.x. The author invites feedback from users who want cost visibility but do not want an additional network hop. The source code is available on GitHub and can be installed via PyPI.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written; read the original for the full account.
This story
This is one outlet's version. Read the fullest account.

