Skip to content

release: 1.90.0 #2420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.89.0"
".": "1.90.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 111
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-9e41d2d5471d2c28bff0d616f4476f5b0e6c541ef4cb51bdaaef5fdf5e13c8b2.yml
openapi_spec_hash: 86f765e18d00e32cf2ce9db7ab84d946
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-f411a68f272b8be0ab0c266043da33228687b9b2d76896724e3cef797de9563d.yml
openapi_spec_hash: 89bf866ea95ecfb3d76c8833237047d6
config_hash: dc5515e257676a27cb1ace1784aa92b3
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.90.0 (2025-06-20)

Full Changelog: [v1.89.0...v1.90.0](https://github.com/openai/openai-python/compare/v1.89.0...v1.90.0)

### Features

* **api:** make model and inputs not required to create response ([11bd62e](https://github.com/openai/openai-python/commit/11bd62eb7e46eec748edaf2e0cecf253ffc1202c))

## 1.89.0 (2025-06-20)

Full Changelog: [v1.88.0...v1.89.0](https://github.com/openai/openai-python/compare/v1.88.0...v1.89.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "openai"
version = "1.89.0"
version = "1.90.0"
description = "The official Python library for the openai API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/openai/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "openai"
__version__ = "1.89.0" # x-release-please-version
__version__ = "1.90.0" # x-release-please-version
236 changes: 117 additions & 119 deletions src/openai/resources/responses/responses.py

Large diffs are not rendered by default.

42 changes: 21 additions & 21 deletions src/openai/types/responses/response_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,6 @@


class ResponseCreateParamsBase(TypedDict, total=False):
input: Required[Union[str, ResponseInputParam]]
"""Text, image, or file inputs to the model, used to generate a response.

Learn more:

- [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
- [Image inputs](https://platform.openai.com/docs/guides/images)
- [File inputs](https://platform.openai.com/docs/guides/pdf-files)
- [Conversation state](https://platform.openai.com/docs/guides/conversation-state)
- [Function calling](https://platform.openai.com/docs/guides/function-calling)
"""

model: Required[ResponsesModel]
"""Model ID used to generate the response, like `gpt-4o` or `o3`.

OpenAI offers a wide range of models with different capabilities, performance
characteristics, and price points. Refer to the
[model guide](https://platform.openai.com/docs/models) to browse and compare
available models.
"""

background: Optional[bool]
"""Whether to run the model response in the background.

Expand All @@ -72,6 +51,18 @@ class ResponseCreateParamsBase(TypedDict, total=False):
in code interpreter tool call items.
"""

input: Union[str, ResponseInputParam]
"""Text, image, or file inputs to the model, used to generate a response.

Learn more:

- [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
- [Image inputs](https://platform.openai.com/docs/guides/images)
- [File inputs](https://platform.openai.com/docs/guides/pdf-files)
- [Conversation state](https://platform.openai.com/docs/guides/conversation-state)
- [Function calling](https://platform.openai.com/docs/guides/function-calling)
"""

instructions: Optional[str]
"""A system (or developer) message inserted into the model's context.

Expand All @@ -97,6 +88,15 @@ class ResponseCreateParamsBase(TypedDict, total=False):
a maximum length of 512 characters.
"""

model: ResponsesModel
"""Model ID used to generate the response, like `gpt-4o` or `o3`.

OpenAI offers a wide range of models with different capabilities, performance
characteristics, and price points. Refer to the
[model guide](https://platform.openai.com/docs/models) to browse and compare
available models.
"""

parallel_tool_calls: Optional[bool]
"""Whether to allow the model to run tool calls in parallel."""

Expand Down
58 changes: 14 additions & 44 deletions tests/api_resources/test_responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,19 @@ class TestResponses:

@parametrize
def test_method_create_overload_1(self, client: OpenAI) -> None:
response = client.responses.create(
input="string",
model="gpt-4o",
)
response = client.responses.create()
assert_matches_type(Response, response, path=["response"])

@parametrize
def test_method_create_with_all_params_overload_1(self, client: OpenAI) -> None:
response = client.responses.create(
input="string",
model="gpt-4o",
background=True,
include=["file_search_call.results"],
input="string",
instructions="instructions",
max_output_tokens=0,
metadata={"foo": "string"},
model="gpt-4o",
parallel_tool_calls=True,
previous_response_id="previous_response_id",
prompt={
Expand Down Expand Up @@ -72,10 +69,7 @@ def test_method_create_with_all_params_overload_1(self, client: OpenAI) -> None:

@parametrize
def test_raw_response_create_overload_1(self, client: OpenAI) -> None:
http_response = client.responses.with_raw_response.create(
input="string",
model="gpt-4o",
)
http_response = client.responses.with_raw_response.create()

assert http_response.is_closed is True
assert http_response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand All @@ -84,10 +78,7 @@ def test_raw_response_create_overload_1(self, client: OpenAI) -> None:

@parametrize
def test_streaming_response_create_overload_1(self, client: OpenAI) -> None:
with client.responses.with_streaming_response.create(
input="string",
model="gpt-4o",
) as http_response:
with client.responses.with_streaming_response.create() as http_response:
assert not http_response.is_closed
assert http_response.http_request.headers.get("X-Stainless-Lang") == "python"

Expand All @@ -99,23 +90,21 @@ def test_streaming_response_create_overload_1(self, client: OpenAI) -> None:
@parametrize
def test_method_create_overload_2(self, client: OpenAI) -> None:
response_stream = client.responses.create(
input="string",
model="gpt-4o",
stream=True,
)
response_stream.response.close()

@parametrize
def test_method_create_with_all_params_overload_2(self, client: OpenAI) -> None:
response_stream = client.responses.create(
input="string",
model="gpt-4o",
stream=True,
background=True,
include=["file_search_call.results"],
input="string",
instructions="instructions",
max_output_tokens=0,
metadata={"foo": "string"},
model="gpt-4o",
parallel_tool_calls=True,
previous_response_id="previous_response_id",
prompt={
Expand Down Expand Up @@ -151,8 +140,6 @@ def test_method_create_with_all_params_overload_2(self, client: OpenAI) -> None:
@parametrize
def test_raw_response_create_overload_2(self, client: OpenAI) -> None:
response = client.responses.with_raw_response.create(
input="string",
model="gpt-4o",
stream=True,
)

Expand All @@ -163,8 +150,6 @@ def test_raw_response_create_overload_2(self, client: OpenAI) -> None:
@parametrize
def test_streaming_response_create_overload_2(self, client: OpenAI) -> None:
with client.responses.with_streaming_response.create(
input="string",
model="gpt-4o",
stream=True,
) as response:
assert not response.is_closed
Expand Down Expand Up @@ -358,22 +343,19 @@ class TestAsyncResponses:

@parametrize
async def test_method_create_overload_1(self, async_client: AsyncOpenAI) -> None:
response = await async_client.responses.create(
input="string",
model="gpt-4o",
)
response = await async_client.responses.create()
assert_matches_type(Response, response, path=["response"])

@parametrize
async def test_method_create_with_all_params_overload_1(self, async_client: AsyncOpenAI) -> None:
response = await async_client.responses.create(
input="string",
model="gpt-4o",
background=True,
include=["file_search_call.results"],
input="string",
instructions="instructions",
max_output_tokens=0,
metadata={"foo": "string"},
model="gpt-4o",
parallel_tool_calls=True,
previous_response_id="previous_response_id",
prompt={
Expand Down Expand Up @@ -409,10 +391,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn

@parametrize
async def test_raw_response_create_overload_1(self, async_client: AsyncOpenAI) -> None:
http_response = await async_client.responses.with_raw_response.create(
input="string",
model="gpt-4o",
)
http_response = await async_client.responses.with_raw_response.create()

assert http_response.is_closed is True
assert http_response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand All @@ -421,10 +400,7 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncOpenAI) -

@parametrize
async def test_streaming_response_create_overload_1(self, async_client: AsyncOpenAI) -> None:
async with async_client.responses.with_streaming_response.create(
input="string",
model="gpt-4o",
) as http_response:
async with async_client.responses.with_streaming_response.create() as http_response:
assert not http_response.is_closed
assert http_response.http_request.headers.get("X-Stainless-Lang") == "python"

Expand All @@ -436,23 +412,21 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncOpe
@parametrize
async def test_method_create_overload_2(self, async_client: AsyncOpenAI) -> None:
response_stream = await async_client.responses.create(
input="string",
model="gpt-4o",
stream=True,
)
await response_stream.response.aclose()

@parametrize
async def test_method_create_with_all_params_overload_2(self, async_client: AsyncOpenAI) -> None:
response_stream = await async_client.responses.create(
input="string",
model="gpt-4o",
stream=True,
background=True,
include=["file_search_call.results"],
input="string",
instructions="instructions",
max_output_tokens=0,
metadata={"foo": "string"},
model="gpt-4o",
parallel_tool_calls=True,
previous_response_id="previous_response_id",
prompt={
Expand Down Expand Up @@ -488,8 +462,6 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn
@parametrize
async def test_raw_response_create_overload_2(self, async_client: AsyncOpenAI) -> None:
response = await async_client.responses.with_raw_response.create(
input="string",
model="gpt-4o",
stream=True,
)

Expand All @@ -500,8 +472,6 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncOpenAI) -
@parametrize
async def test_streaming_response_create_overload_2(self, async_client: AsyncOpenAI) -> None:
async with async_client.responses.with_streaming_response.create(
input="string",
model="gpt-4o",
stream=True,
) as response:
assert not response.is_closed
Expand Down