Skip to content

Conversation

@rayysidd
Copy link

@rayysidd rayysidd commented Jan 31, 2026

What does this PR do?

Updates the Editor.create_file method to accept an optional content argument.

Why is this change necessary?

Fixes #1920

When LLMs (like Gemini or GPT-4) use the Editor.create_file tool, they frequently attempt to pass a content or text argument to write data immediately upon creation. The current implementation rejects these arguments with a TypeError, causing agents to crash or fail to save generated work.

How to verify

  1. Run a Data Interpreter agent with a task that requires saving a file.
  2. Observe that the agent attempts to call create_file(filename="...", content="...").
  3. Verify the file is created successfully with the content, instead of throwing a TypeError.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Editor.create_file file create error

1 participant