Skip to content

Undocumented Behavior Assistants v2 #2272

Open
@ztat

Description

@ztat

Confirm this is an issue with the Python library and not an underlying OpenAI API

  • This is an issue with the Python library

Describe the bug

OpenAI Python SDK v1.7.0 with the new Assistants v2 API, specifically for a Slack app that summarizes board meetings using uploaded PDFs.

The docs and SDK behavior around file_ids are confusing and inconsistent:

Using file_ids with messages.create() throws:

css
Copy
Edit
TypeError: Messages.create() got an unexpected keyword argument 'file_ids'
unless I separate it into a dedicated message with no content field.

This isn't documented anywhere.

There’s no clear end-to-end example showing how to correctly use file_search tools with uploaded files and text inputs.

SDK errors (e.g. "unexpected keyword") are misleading — the parameter is supported but context-sensitive.

Clear documentation showing how to:

Upload files

Attach files to threads/messages

Combine file_ids and content correctly (or not)

Better SDK errors (e.g. “file_ids cannot be used with content”)

To Reproduce

Clear documentation showing how to:

Upload files

Attach files to threads/messages

Combine file_ids and content correctly (or not)

Better SDK errors (e.g. “file_ids cannot be used with content”)

Code snippets

OS

macOS

Python version

python3.11

Library version

Version: 1.70.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions