---
type: email
from: Kazuhiro Sera <notifications@github.com>
subject: Re: [openai/openai-agents-python] Add opt-in cost tracking for

 LiteLLM models (PR #1832)
received: 2026-03-06 07:47:52
date_header: Tue, 30 Sep 2025 11:13:43 -0700
priority: normal
status: awaiting_approval
uid: 31652
---

## Email Content

**From:** Kazuhiro Sera <notifications@github.com>
**Subject:** Re: [openai/openai-agents-python] Add opt-in cost tracking for

 LiteLLM models (PR #1832)
**Date:** Tue, 30 Sep 2025 11:13:43 -0700

### Body (preview)

@seratch requested changes on this pull request.



Unlocking the access itself is fine, but we'd like to hold off relying on an internal modules within a different package.



> @@ -124,6 +124,15 @@ async def get_response(

 

             if hasattr(response, "usage"):

                 response_usage = response.usage

+

+                # Extract cost from LiteLLM's hidden params if cost tracking is enabled.

+                cost = None

+                if model_settings.track_cost:

+                    if hasattr(response, "_hidden_params") and isinstance(



We'd like to avoid accessing the internal modules



-- 

Reply to this email directly or view it on GitHub:

https://github.com/openai/openai-agents-python/pull/1832#pullrequestreview-3286180700

You are receiving this because you are subscribed to this thread.



Message ID: <openai/openai-agents-python/pull/1832/review/3286180700@github.com>

---

## Suggested Actions
- [ ] Reply
- [ ] Archive
- [ ] Escalate
