Azure / Azure/azure-sdk-for-python
[Hosted Agents] Responses API broken for hosted agent invocation — "ID cannot be null" (since ~27 Feb 2026)
- Dominant language
- Python
- Stars
- 5.6k
- Forks
- 3.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 193
Description
**Package Name:** azure-ai-projects
**Package Version:** 2.0.0b4 (also reproduced on 2.0.0b1, 2.0.0b3)
**Operating System:** Windows 11 Enterprise
**Python Version:** 3.13.5
**Additional packages:** openai==2.24.0(also reproduced on openai==2.21.0) , azure-identity==1.26.0b2
**Describe the bug**
Hosted agent invocation via the Responses API stopped working approximately the week of Feb 27 2026 with no code changes or version upgrade on my side. The code was working correctly till 27th.
**Failure :**
openai.BadRequestError: Error code: 400
{"error": {"code": "bad_request", "message": "ID cannot be null or empty (Parameter 'id')"}}
This behavior is consistent across:
Both /openai/responses?api-version=2025-11-15-preview and /openai/v1/responses
Both SDK (openai_client.responses.create()) and raw requests REST calls
Multiple package versions of azure-ai-projects and openai
**To Reproduce**(The code is from Microsoft document - https://learn.microsoft.com/en-us/azure/foundry/agents/concepts/hosted-agents#invoke-hosted-agents)
```
# Before running the sample:
# pip install --pre azure-ai-projects>=2.0.0b1
# pip install azure-identity
from azure.identity import DefaultAzureCredential,AzureCliCredential
from azure.ai.projects import AIProjectClient
myEndpoint = "my_endpoint"
project_client = AIProjectClient(
endpoint=myEndpoint,
credential=AzureCliCredential(),
)
myAgent = "agent_name"
myVersion = "1"
openai_client = project_client.get_openai_client()
# Reference the agent to get a response
response = openai_client.responses.create(
input=[{"role": "user", "content": "Tell me what you can help with."}],
extra_body={"agent": {"name": myAgent, "version": myVersion, "type": "agent_reference"}},
)
print(f"Response output: {response.output_text}")
```
Contributor guide
Assessment
This issue has not been assessed yet.