Skip to content

Commit 60de21d

Browse files
feat(api): Add detail to InputFileContent
1 parent e7c98b6 commit 60de21d

File tree

6 files changed

+34
-6
lines changed

6 files changed

+34
-6
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 152
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-a6eca1bd01e0c434af356fe5275c206057216a4e626d1051d294c27016cd6d05.yml
3-
openapi_spec_hash: 68abda9122013a9ae3f084cfdbe8e8c1
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-7c540cce6eb30401259f4831ea9803b6d88501605d13734f98212cbb3b199e10.yml
3+
openapi_spec_hash: 06e656be22bbb92689954253668b42fc
44
config_hash: 3e44aa7890aa780e431ab5b767200d3b

src/openai/types/responses/response_input_file.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ class ResponseInputFile(BaseModel):
1414
type: Literal["input_file"]
1515
"""The type of the input item. Always `input_file`."""
1616

17+
detail: Optional[Literal["low", "high"]] = None
18+
"""The detail level of the file to be sent to the model.
19+
20+
Use `low` for the default rendering behavior, or `high` to render the file at
21+
higher quality. Defaults to `low`.
22+
"""
23+
1724
file_data: Optional[str] = None
1825
"""The content of the file to be sent to the model."""
1926

src/openai/types/responses/response_input_file_content.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ class ResponseInputFileContent(BaseModel):
1414
type: Literal["input_file"]
1515
"""The type of the input item. Always `input_file`."""
1616

17+
detail: Optional[Literal["low", "high"]] = None
18+
"""The detail level of the file to be sent to the model.
19+
20+
Use `low` for the default rendering behavior, or `high` to render the file at
21+
higher quality. Defaults to `low`.
22+
"""
23+
1724
file_data: Optional[str] = None
1825
"""The base64-encoded data of the file to be sent to the model."""
1926

src/openai/types/responses/response_input_file_content_param.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ class ResponseInputFileContentParam(TypedDict, total=False):
1414
type: Required[Literal["input_file"]]
1515
"""The type of the input item. Always `input_file`."""
1616

17+
detail: Literal["low", "high"]
18+
"""The detail level of the file to be sent to the model.
19+
20+
Use `low` for the default rendering behavior, or `high` to render the file at
21+
higher quality. Defaults to `low`.
22+
"""
23+
1724
file_data: Optional[str]
1825
"""The base64-encoded data of the file to be sent to the model."""
1926

src/openai/types/responses/response_input_file_param.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ class ResponseInputFileParam(TypedDict, total=False):
1414
type: Required[Literal["input_file"]]
1515
"""The type of the input item. Always `input_file`."""
1616

17+
detail: Literal["low", "high"]
18+
"""The detail level of the file to be sent to the model.
19+
20+
Use `low` for the default rendering behavior, or `high` to render the file at
21+
higher quality. Defaults to `low`.
22+
"""
23+
1724
file_data: str
1825
"""The content of the file to be sent to the model."""
1926

tests/api_resources/test_responses.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def test_method_create_with_all_params_overload_1(self, client: OpenAI) -> None:
4040
include=["file_search_call.results"],
4141
input="string",
4242
instructions="instructions",
43-
max_output_tokens=0,
43+
max_output_tokens=16,
4444
max_tool_calls=0,
4545
metadata={"foo": "string"},
4646
model="gpt-5.1",
@@ -128,7 +128,7 @@ def test_method_create_with_all_params_overload_2(self, client: OpenAI) -> None:
128128
include=["file_search_call.results"],
129129
input="string",
130130
instructions="instructions",
131-
max_output_tokens=0,
131+
max_output_tokens=16,
132132
max_tool_calls=0,
133133
metadata={"foo": "string"},
134134
model="gpt-5.1",
@@ -451,7 +451,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn
451451
include=["file_search_call.results"],
452452
input="string",
453453
instructions="instructions",
454-
max_output_tokens=0,
454+
max_output_tokens=16,
455455
max_tool_calls=0,
456456
metadata={"foo": "string"},
457457
model="gpt-5.1",
@@ -539,7 +539,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn
539539
include=["file_search_call.results"],
540540
input="string",
541541
instructions="instructions",
542-
max_output_tokens=0,
542+
max_output_tokens=16,
543543
max_tool_calls=0,
544544
metadata={"foo": "string"},
545545
model="gpt-5.1",

0 commit comments

Comments
 (0)