-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Description
Describe the bug
We have an agent flow where plugin tools return CSV data as a string, then a plugin filter intercepts that CSV, uploads it to Azure OpenAI Files, and updates the thread with the returned file_id under tool_resources so the Code Interpreter tool can access it.
This worked reliably when the agent used GPT-4.1, but after upgrading that agent model to GPT-5, the Code Interpreter session can no longer see/find the uploaded file in the sandbox.
From an enterprise orchestration perspective, an LLM upgrade should not break a stable and correctly wired agent workflow.
To Reproduce
- Create an
AzureAssistantAgentwith Code Interpreter enabled using GPT-5 deployment - Register a Semantic Kernel AutoFunctionInvocationContext filter
- In the filter, upload a CSV file to Azure OpenAI Files then update thread tool_resources.code_interpreter.file_ids with the file ID
updated_thread = openai.beta.threads.update(
thread_id=thread_id, tool_resources=tool_resources
)
print(f"Updated thread: {updated_thread}") # Updated thread successfully registered the new tool_resources- Terminate the run with context.terminate = True
- Start a conversation asking something that will trigger the filter + plugin execution
- Observe: Agent cannot access the file in Code Interpreter
# Code Interpreter:
import os
# List files in the sandbox directory
files = os.listdir('/mnt/data')
filesimport os
paths_to_check = ['/mnt/data', '.']
listing = {}
for p in paths_to_check:
try:
listing[p] = os.listdir(p)
except Exception as e:
listing[p] = [f'Error: {e}']
listingAgent response: "I checked the sandbox and it is currently empty (/mnt/data has no files)..."
Expected behavior
To work as of now, as it is already working with GPT-4.1. The agent uses Code Interpreter to load uploaded by as CSV and process it as requested.
Platform
- Language: Python
- AI model: GPT-4.1 | GPT-5
- Environment
semantic-kernel = 1.29.0
openai = 1.109.1
Metadata
Metadata
Assignees
Labels
Type
Projects
Status