The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi..
Am trying to run Fabric Data Agent SDK. However I am unable to proceed due to the below error. There is no documentation post the migration Assistant API.Can someone help to guide on the correct method to call.
Solved! Go to Solution.
Hi @ann33
The `FabricOpenAI` client does not have a direct `list_messages()` method. the correct way to list messages is to use the thread-based message listing pattern from the OpenAI Assistants API
Give this a try :
from fabric.dataagent.client import FabricOpenAI
fabric_client = FabricOpenAI(artifact_name=ai_skill_name)
response = fabric_client.beta.threads.messages.list(
thread_id=thread.id,
order="asc"
)
print(response.model_dump_json(indent=2))
Hi @ann33 ,
Thank you for reaching out to the Microsoft Fabric Community and thank you @nilendraFabric for sharing the helpful response.
The warning you’re seeing is from the openai Python package, which flags that the Assistants API will eventually be replaced by the Responses API. However, it remains fully supported and will be available until at least mid-2026, with a 12-month notice before deprecation.
As of now, the Fabric Data Agent SDK supports only the Assistants API. The correct method:
fabric_client.beta.threads.messages.list(thread_id=thread.id, order="asc")
is still valid and safe to use.
If you'd prefer to remove the warning, you can suppress it using:
import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning)
Support for the Responses API in Fabric will come in a future update. Meanwhile, you're good to proceed with the current SDK.
Hope this helps. Please reach out for further assistance.
If this post helps, then please consider to Accept as the solution to help the other members find it more quickly and a kudos would be appreciated.
Thank you.
Hi @ann33 ,
Thank you for reaching out to the Microsoft Fabric Community and thank you @nilendraFabric for sharing the helpful response.
The warning you’re seeing is from the openai Python package, which flags that the Assistants API will eventually be replaced by the Responses API. However, it remains fully supported and will be available until at least mid-2026, with a 12-month notice before deprecation.
As of now, the Fabric Data Agent SDK supports only the Assistants API. The correct method:
fabric_client.beta.threads.messages.list(thread_id=thread.id, order="asc")
is still valid and safe to use.
If you'd prefer to remove the warning, you can suppress it using:
import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning)
Support for the Responses API in Fabric will come in a future update. Meanwhile, you're good to proceed with the current SDK.
Hope this helps. Please reach out for further assistance.
If this post helps, then please consider to Accept as the solution to help the other members find it more quickly and a kudos would be appreciated.
Thank you.
Thank You. It worked.
Hi @ann33
The `FabricOpenAI` client does not have a direct `list_messages()` method. the correct way to list messages is to use the thread-based message listing pattern from the OpenAI Assistants API
Give this a try :
from fabric.dataagent.client import FabricOpenAI
fabric_client = FabricOpenAI(artifact_name=ai_skill_name)
response = fabric_client.beta.threads.messages.list(
thread_id=thread.id,
order="asc"
)
print(response.model_dump_json(indent=2))
Thank You.
Now facing the below.
DeprecationWarning: The Assistants API is deprecated in favor of the Responses API
Does the SDK support Responses API
User | Count |
---|---|
14 | |
9 | |
5 | |
3 | |
2 |
User | Count |
---|---|
44 | |
23 | |
17 | |
13 | |
12 |