Skip to content

context_management=[{"type": "type"}] in tests, not 'compaction' #2868

Description

@qubez

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

src/openai/types/responses/response_create_params.py gives us the supported string:

"""The context management entry type. Currently only 'compaction' is supported."""

It is sufficent to say that tests/api_resources/test_responses.py would fail without the right value for that key, or that the API actually able to run that test is not validating the one enum that would make something happen.

To Reproduce

  1. look at the code
  2. be astonished.

Code snippets

response = client.responses.create(
            background=True,
            context_management=[
                {
                    "type": "type",  # wot?
                    "compact_threshold": 1000,
                }
            ],

OS

AnyOS

Python version

Python 3.12

Library version

v2.20.0

Activity

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

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