ai platform
55 TopicsAzure AI Foundry SDK File Attachment Issue
Problem Summary We are unable to attach files to Azure AI Foundry agents using the Python SDK (`azure-ai-projects` and `azure-ai-agents`). **Every approach to file attachment results in a generic HTTP 500 error** from the Azure API: ``` HttpResponseError: (None) The server had an error processing your request. Sorry about that! You can retry your request, or us through our help center at oai-assistants@ if you keep seeing this error. ``` This occurs consistently across: - Code Interpreter file attachments - Vision/image file references - All documented attachment patterns from Microsoft's official documentation Environment Details - **SDK Versions:** - `azure-ai-projects`: 1.0.0 - `azure-ai-agents`: 1.1.0 - **Python**: 3.12 - **Azure Region**: East US 2 - **Model**: gpt-4o, gpt-5-mini - **File Upload**: Files upload successfully to Azure AI Foundry (status: "processed") - **Agent Creation**: Agents create successfully without file attachments What We've Tried Files Upload Successfully But Cannot Be Connected to Agents While file upload and agent creation work individually, **we cannot link files to agents** - every attempt to connect them fails with HTTP 500: # 1. File upload - No errors, but agent cannot access the file with open("data.csv", 'rb') as f: file_response = openai_client.files.create(file=f, purpose="assistants") # Result: File ID returned, file status = "processed" # Problem: File exists on Azure but no way to connect it to an agent # 2. Agent creation without files - No errors, but cannot attach files later agent = project_client.agents.create_agent( model="gpt-4o", name="test-agent", instructions="You are helpful", tools=[CodeInterpreterToolDefinition()] ) # Result: Agent created successfully # Problem: Agent exists but cannot access any files ❌ All Attempts to Connect Files to Agents Fail (HTTP 500) Attempt 1: Message Attachments (per Microsoft docs) from azure.ai.agents.models import MessageAttachment, CodeInterpreterToolDefinition attachment = MessageAttachment( file_id=file_id, tools=[CodeInterpreterToolDefinition()] ) message = project_client.agents.messages.create( thread_id=thread_id, role="user", content="Analyze this file", attachments=[attachment] # ❌ HTTP 500 ) **Request ID**: `649ec8ad5b8941804068be4f41ccb680` Attempt 2: Thread Creation with Tool Resources from azure.ai.agents.models import ToolResources, CodeInterpreterToolResource tool_resources = ToolResources( code_interpreter=CodeInterpreterToolResource(file_ids=[file_id]) ) thread = project_client.agents.threads.create( tool_resources=tool_resources # ❌ HTTP 500 ) **Request ID**: `17501cc0daa8e0a4a7bcc95945231b10` Attempt 3: Thread Update with Tool Resources project_client.agents.threads.update( thread_id=thread_id, tool_resources=tool_resources # ❌ HTTP 500 ) **Request ID**: `418f1aeedb94b55504fcee444ae471ee` Attempt 4: Agent Creation with Tool Resources (Microsoft's recommended approach) Following the official documentation at: https://learn.microsoft.com/en-us/azure/ai-foundry/agents/how-to/tools/code-interpreter-samples from azure.ai.agents.models import ( ToolResources, CodeInterpreterToolResource, CodeInterpreterToolDefinition ) # Upload file file = openai_client.files.create(file=f, purpose="assistants") # Create tool resources tool_resources = ToolResources( code_interpreter=CodeInterpreterToolResource(file_ids=[file.id]) ) # Create agent with files agent = project_client.agents.create_agent( model="gpt-4o", name="test-agent", instructions="You are helpful", tools=[CodeInterpreterToolDefinition()], tool_resources=tool_resources # ❌ HTTP 500 ) **Request ID**: `c2e1a86cfa0dd09d4448092a3139dae5` Attempt 5: Vision with Image File Content (no code_interpreter) message_content = [ { "type": "text", "text": "Please describe this image." }, { "type": "image_file", "image_file": { "file_id": file_id } } ] message = project_client.agents.messages.create( thread_id=thread_id, role="user", content=message_content # ❌ HTTP 500 ) **Request ID**: `401e53a5802d1e203e6fe92d74ad59f1` Summary Table | Approach | API Method | Code Interpreter | Result | |----------|-----------|------------------|--------| | Message attachments | `messages.create(attachments=[...])` | Yes | ❌ HTTP 500 | | Thread creation | `threads.create(tool_resources=...)` | Yes | ❌ HTTP 500 | | Thread update | `threads.update(tool_resources=...)` | Yes | ❌ HTTP 500 | | Agent creation | `agents.create_agent(tool_resources=...)` | Yes | ❌ HTTP 500 | | Vision image_file | `messages.create(content=[image_file])` | No | ❌ HTTP 500 | Questions: **Has anyone successfully attached files to Azure AI Foundry agents using the Python SDK?** **Is there a specific Azure configuration, permission, or feature flag required for file attachments?** **Are file attachments only available in certain Azure regions or subscription tiers?** **Is this a known issue with the current SDK version?** **Are there any alternative approaches we haven't tried?** Documentation followed: https://learn.microsoft.com/en-us/azure/ai-foundry/agents/how-to/tools/code-interpreter-samples?pivots=python Yes this was AI written - but human validated!9Views0likes0CommentsDeep Fake - what do u think about it ?
Hi, what do u think about deepfake technology ? I found this article https://jelesnianski.com/artificial-intelligence/before-you-believe-how-to-recognize-a-deepfake-and-is-it-inherently-evil/ Do you think that AI is more of a threat or an opportunity for development?293Views1like1CommentIs it possible to customize the automatically created webapp for chat?
Ive used AI studio to create an intelligent agent that answers questions on my content via the automatically created webapp (tutorial https://learn.microsoft.com/en-us/azure/ai-studio/tutorials/deploy-chat-web-app) Is it possible to customize this webapp, or use it as a base webpage and add additional features?256Views0likes1CommentDemystifying Error in Microsoft Designer "Image Couldn't Be Generated"
The error message on Microsoft Designer : "Images couldn't be generated. Something may have triggered Microsoft Responsible AI guidelines" suggests that there might be an issue related to Microsoft's Responsible AI guidelines while attempting to generate images using a Microsoft tool or service. Review Documentation: Check the official documentation or user guides related to the specific Microsoft tool or service you are using. Look for any guidelines or restrictions related to image generation and Responsible AI practices. Check AI Guidelines Compliance: Ensure that your use of the tool aligns with Microsoft's Responsible AI guidelines. Microsoft may have specific requirements or restrictions in place to promote ethical and responsible AI usage. Contact Support: If you cannot find a solution in the documentation or online forums, consider reaching out to Microsoft support for assistance. They may provide insights into the specific issue and guide you on how to proceed. Update Software: Ensure that you are using the latest version of the Microsoft tool or service. Software updates often include bug fixes and improvements that may address issues related to AI guidelines. Check for Service Status: Sometimes, issues may be related to temporary service disruptions or maintenance. Check the status of the Microsoft service you are using to see if there are any reported issues. Community Forums: Look for discussions on Microsoft's community forums. Other users may have experienced similar issues, and there might be community-driven solutions or insights. Provide Feedback: If you are using a preview or beta version of a tool, consider providing feedback to Microsoft. They may appreciate insights into user experiences and potential issues.4.3KViews0likes1CommentAUTHENTICAION ERROR IN RUNNING prompt IN UHRS
got this error in uhrs while running a prompt: Model run error Microsoft.Search.UHRS.Services.BusinessLogic.LlmAsJudge.ModelLabelingMediaDownloadingException Download Failed: Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. let me know if anyone can help or deirecting me.172Views0likes0CommentsUhrs blocked
Hello, My uhrs account was blocked after using the application on my phone. Yes my wife already used uhrs on my phone and I didn't know it couldn't be done. Please unblock my account I will be careful next time. My account blocked is email address removed for privacy reasons.219Views0likes0CommentsHome decor platform development
My customer is developing a home decor platform where users can upload images of their rooms, apply different decor items like furniture or wall colors, and visualize how they would look. The platform relies on AI tools and APIs for object recognition and placement but is facing issues with accurately identifying the floor and objects. The AI is currently rejecting the floor or placing items incorrectly. They are also working on improving search results based on uploaded images, which show similar but not exact matches, leading to inconsistencies in user experience. They are facing challenges in achieving accuracy and reducing processing time.363Views1like0Comments