---
type: email
from: tnduyh5 <notifications@github.com>
subject: [openai/openai-agents-python] Error encountered when calling the API

 with Claude by LiteLLM (Issue #1724)
received: 2026-03-06 07:29:46
date_header: Fri, 12 Sep 2025 00:00:52 -0700
priority: normal
status: awaiting_approval
uid: 30231
---

## Email Content

**From:** tnduyh5 <notifications@github.com>
**Subject:** [openai/openai-agents-python] Error encountered when calling the API

 with Claude by LiteLLM (Issue #1724)
**Date:** Fri, 12 Sep 2025 00:00:52 -0700

### Body (preview)

tnduyh5 created an issue (openai/openai-agents-python#1724)



### Describe the bug

I’m encountering an issue when making API calls to Claude using the liteLLM. Could you please help me investigate this? I’ve noticed errors in the _base_client module of the SDK.



```

LiteLLM completion() model= claude-sonnet-4-20250514; provider = anthropic

Error streaming response: Error code: 400 - {'error': {'message': "Invalid 'input[8].id': '__fake_id__'. Expected an ID that begins with 'msg'.", 'type': 'invalid_request_error', 'param': 'input[8].id', 'code': 'invalid_value'}}

Error in event conversion: Error code: 400 - {'error': {'message': "Invalid 'input[8].id': '__fake_id__'. Expected an ID that begins with 'msg'.", 'type': 'invalid_request_error', 'param': 'input[8].id', 'code': 'invalid_value'}}

Traceback (most recent call last):

  File "/Users/trinhngocduy/Desktop/AI/pfa-ai-services/app/services/agents_event_converter.py", line 58, in convert_stream

    async for event in agent_stream:

  File "/Users/trinhngocduy/Desktop/AI/pfa-ai-services/venv/lib/python3.11/site-packages/agents/result.py", line 215, in stream_events

    raise self._stored_exception

  File "/Users/trinhngocduy/Desktop/AI/pfa-ai-services/venv/lib/python3.11/site-packages/agents/run.py", line 855, in _start_streaming

    turn_result = await cls._run_single_turn_streamed(

                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/Users/trinhngocduy/Desktop/AI/pfa-ai-services/venv/lib/python3.11/site-packages/agents/run.py", line 1015, in _run_single_turn_streamed

    async for event in model.stream_response(

  File "/Users/trinhngocduy/Desktop/AI/pfa-ai-services/venv/lib/python3.11/site-packages/agents/models/openai_responses.py", line 164, in stream_response

    stream = await self._fetch_response(

             ^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/Users/trinhngocduy/Desktop/AI/pfa-ai-services/venv/lib/python3.11/site-packages/agents/models/openai_responses.py", line 299, in _fetc

---

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