diff --git a/README.md b/README.md index 1018b08..a7218ad 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,10 @@ Pytest plugin for automatically mocking OpenAI requests. Powered by [RESPX](https://github.com/lundberg/respx). -[![sdk support](https://img.shields.io/badge/SDK_Support-v1.25+-white?logo=openai&logoColor=black&labelColor=white)](https://github.com/openai/openai-python) +[![sdk support](https://img.shields.io/badge/SDK_Support-v1.32+-white?logo=openai&logoColor=black&labelColor=white)](https://github.com/openai/openai-python) + +> [!NOTE] +> For working with OpenAI Python SDK versions `>=1.25,<1.32` please use version `0.6` or earlier for this library ## Supported Endpoints diff --git a/pyproject.toml b/pyproject.toml index 5ecd67d..6180a2a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ openai_responses = "openai_responses.plugin" python = ">=3.9,<4.0" faker = ">=24.2.0,<25.0.0" faker-openai-api-provider = "0.2.0" -openai = ">=1.25,<1.32" +openai = ">=1.32,<1.35" requests-toolbelt = "^1.0.0" respx = "^0.20.2" diff --git a/src/openai_responses/_routes/runs.py b/src/openai_responses/_routes/runs.py index 4a879fb..9bf95e6 100644 --- a/src/openai_responses/_routes/runs.py +++ b/src/openai_responses/_routes/runs.py @@ -90,6 +90,7 @@ def _build(partial: PartialRun, request: httpx.Request) -> Run: "created_at": utcnow_unix_timestamp_s(), "instructions": "", "object": "thread.run", + "parallel_tool_calls": True, "status": "queued", } return model_parse(Run, defaults | partial | content) diff --git a/src/openai_responses/_types/partials/runs.py b/src/openai_responses/_types/partials/runs.py index 2709195..2af6d26 100644 --- a/src/openai_responses/_types/partials/runs.py +++ b/src/openai_responses/_types/partials/runs.py @@ -94,6 +94,7 @@ class PartialRun(TypedDict): metadata: NotRequired[Dict[str, str]] model: NotRequired[str] object: NotRequired[Literal["thread.run"]] + parallel_tool_calls: NotRequired[bool] required_action: NotRequired[PartialRequiredAction] response_format: NotRequired[ Union[Literal["none", "auto"], PartialAssistantResponseFormat] diff --git a/tests/unit/test_state_store.py b/tests/unit/test_state_store.py index ca94b27..4ee1a77 100644 --- a/tests/unit/test_state_store.py +++ b/tests/unit/test_state_store.py @@ -169,6 +169,7 @@ def test_run_store(state_store: StateStore): instructions="", model="", object="thread.run", + parallel_tool_calls=True, status="in_progress", thread_id="thread_abc123", tools=[], @@ -193,6 +194,7 @@ def test_run_store(state_store: StateStore): instructions="", model="", object="thread.run", + parallel_tool_calls=True, status="in_progress", thread_id="thread_abc123", tools=[],