diff --git a/.castiron.stats.yml b/.castiron.stats.yml index 9320ad8d4a..a72c5c1efb 100644 --- a/.castiron.stats.yml +++ b/.castiron.stats.yml @@ -1,8 +1,8 @@ schema_version: 1 -generation_id: 894a0870-fe44-47b8-ae0e-d852e0a642a9 -openapi_spec_hash: b2c62b342b04685226037c980f2b5a7a -openapi_transformed_spec_hash: ba44bf31326f01a1d886b7510dd9da8a -config_hash: 4fbbbcf377bcc17646cccb9fcfbac14a -codegen_sha: 29ea2f9fd4247a24ce57aec59ee2b9240745fcdf -codegen_hash: dcd47732b7809ce7566ec5162d689b5320158e41aebcce2b31eaa9cd97fc4da2 -public_codegen_sha: eb1e776d29014be85225038a072a679387bda999 +generation_id: b67f6675-ad30-42fd-90ec-33d09485b9a0 +openapi_spec_hash: 32e9f9c8096eae027754def9afb89dc0 +openapi_transformed_spec_hash: a5861d7f7b67f6845c9499fdec7324a5 +config_hash: 5c00fe18ea913ed0186f9894adc02a70 +codegen_sha: 9177ce998eec68cf1d241f1efd84f8786eba92cd +codegen_hash: 9271ebabb8723d763a7a728f3a455fb1ee4ea678e20885f891b50222f68d4def +public_codegen_sha: 2951af18b699be3114ff5e6a3c7f7a669e7d5a76 diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 0befe35d6d..bf0d036177 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.3.1" + ".": "3.5.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 85872e148d..c5ff44a138 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,63 @@ # Changelog +## [3.5.0](https://github.com/openai/openai-python/compare/v3.4.0...v3.5.0) (2026-08-27) + + +### Features + +* **api:** make function call output call IDs optional ([#3738](https://github.com/openai/openai-python/issues/3738)) ([c74501d](https://github.com/openai/openai-python/commit/c74501d7dc6946633fead7883ad02d8a188cf605)) + +## [3.4.0](https://github.com/openai/openai-python/compare/v3.3.1...v3.4.0) (2026-08-25) + + +### Features + +* **api:** Add obfuscation field to ChatCompletionChunk ([#3690](https://github.com/openai/openai-python/issues/3690)) ([c7d8e1d](https://github.com/openai/openai-python/commit/c7d8e1d26be1f958e55c80f26b648f768afabdf2)) +* **api:** add project residency configuration and cost quantity units ([#3726](https://github.com/openai/openai-python/issues/3726)) ([bc4f8ef](https://github.com/openai/openai-python/commit/bc4f8efdbc1f8fa6b78935e205780e259d83576d)) + + +### Bug Fixes + +* **api:** encode Realtime call offers and session configuration ([#3736](https://github.com/openai/openai-python/issues/3736)) ([555ac48](https://github.com/openai/openai-python/commit/555ac487f450f24928d859478ea2f41b58906206)) +* apply consistent origin checks to WebSocket redirects ([#3693](https://github.com/openai/openai-python/issues/3693)) ([1b324d0](https://github.com/openai/openai-python/commit/1b324d044dcedc377e688c405416f928b0aedfb6)) +* **azure:** encode deployment names consistently ([#3683](https://github.com/openai/openai-python/issues/3683)) ([689538d](https://github.com/openai/openai-python/commit/689538d531692e30ac1928779e6f1b97cc95db45)) +* **azure:** keep provider validation errors value-free ([#3691](https://github.com/openai/openai-python/issues/3691)) ([72529c0](https://github.com/openai/openai-python/commit/72529c013707e7b5ed99edbc836603618a1e4be6)) +* **azure:** resolve one authentication mode ([#3689](https://github.com/openai/openai-python/issues/3689)) ([e3d0681](https://github.com/openai/openai-python/commit/e3d06812535d7f2fe1bc6e57c12bd0ac0dd4acd1)) +* compute custom-code summaries from trusted workflow code ([#3692](https://github.com/openai/openai-python/issues/3692)) ([2b5868d](https://github.com/openai/openai-python/commit/2b5868da23cb61876ec27d76591ea5fdb2b8c14d)) +* create upload example fixtures in private directories ([#3686](https://github.com/openai/openai-python/issues/3686)) ([f36e6f7](https://github.com/openai/openai-python/commit/f36e6f79662b22e9d8f1660d4576b4b15cd8ac76)) +* decode SSE incrementally without limiting event size ([#3687](https://github.com/openai/openai-python/issues/3687)) ([2598d53](https://github.com/openai/openai-python/commit/2598d530cf682784465e9f82558a830ac5f94486)) +* keep Python SDK diagnostics metadata-only ([#3685](https://github.com/openai/openai-python/issues/3685)) ([600aa8d](https://github.com/openai/openai-python/commit/600aa8daade4c9df87deb76f6b8442ee828a7cbc)) +* Preserve Azure authentication boundaries across transports ([#3684](https://github.com/openai/openai-python/issues/3684)) ([06ef57c](https://github.com/openai/openai-python/commit/06ef57caafe73d625ad4458ab5d29241e30c44bc)) +* preserve the configured TLS hostname ([#3694](https://github.com/openai/openai-python/issues/3694)) ([aa5fbc4](https://github.com/openai/openai-python/commit/aa5fbc401f179fc515905d84623718c2b66ec653)) +* preserve WebSocket send queue byte accounting during flush ([#3688](https://github.com/openai/openai-python/issues/3688)) ([96f966d](https://github.com/openai/openai-python/commit/96f966d77bddc7449ae23fda5b29ef44c3f98cc2)) + + +### Chores + +* **api:** Clarify image background docs and preview support ([#3703](https://github.com/openai/openai-python/issues/3703)) ([bedb9a7](https://github.com/openai/openai-python/commit/bedb9a7b8839e193107e88b92f7cc166f08ac83d)) +* **api:** document supported image generation models ([#3695](https://github.com/openai/openai-python/issues/3695)) ([8edd9ae](https://github.com/openai/openai-python/commit/8edd9ae411f9d0a5385447a4697c9f7042868213)) +* **api:** move chat validation tests out of generated code ([#3698](https://github.com/openai/openai-python/issues/3698)) ([9d3ba20](https://github.com/openai/openai-python/commit/9d3ba20f9567a62b2ebb3542661a60dc4ed2fd67)) +* **api:** move webhook tests out of generated code ([#3700](https://github.com/openai/openai-python/issues/3700)) ([04ecb3c](https://github.com/openai/openai-python/commit/04ecb3c21712e1236e7aa2eb9d715d57acb26c35)) +* **api:** remove redundant generated formatting ([#3696](https://github.com/openai/openai-python/issues/3696)) ([5ac1e03](https://github.com/openai/openai-python/commit/5ac1e03e1ae8f08acf6213b3e44772734dbb8e59)) +* **api:** remove redundant generated test edits ([#3697](https://github.com/openai/openai-python/issues/3697)) ([351ef84](https://github.com/openai/openai-python/commit/351ef84dc25211ea871f60eb16a469a89d20e133)) +* **api:** Update SDK generation metadata only ([#3716](https://github.com/openai/openai-python/issues/3716)) ([e43b422](https://github.com/openai/openai-python/commit/e43b422412a9e96c9cc5192c61fffbe2d7e04836)) +* set a ceiling for Python SDK customization ([#3714](https://github.com/openai/openai-python/issues/3714)) ([04d5d79](https://github.com/openai/openai-python/commit/04d5d79fc71e883a3114b80ed8408bef76e72cd3)) + + +### Documentation + +* **api:** restore generated ChatKit API index ([#3705](https://github.com/openai/openai-python/issues/3705)) ([4534106](https://github.com/openai/openai-python/commit/45341061b382473ee8a8e8c796ef8819089abbb6)) +* standardize Python SDK vulnerability disclosure policy ([#3642](https://github.com/openai/openai-python/issues/3642)) ([1fc0a21](https://github.com/openai/openai-python/commit/1fc0a217047cf7f767db10479b5d741b870bc74f)) + + +### Refactors + +* **api:** isolate audio response format selection ([#3701](https://github.com/openai/openai-python/issues/3701)) ([ece4324](https://github.com/openai/openai-python/commit/ece4324da0b96f848b48bdef090a372ff0a1db26)) +* **api:** isolate vector-store polling helpers ([#3713](https://github.com/openai/openai-python/issues/3713)) ([a002ef3](https://github.com/openai/openai-python/commit/a002ef3c7d2276fb63deeea58d920d87da61b1e5)) +* **api:** move file processing polling into SDK-owned helpers ([#3712](https://github.com/openai/openai-python/issues/3712)) ([5f20c51](https://github.com/openai/openai-python/commit/5f20c51c694801cb0a4d0fed413bedc1bac2dda0)) +* **api:** share embedding response decoding ([#3699](https://github.com/openai/openai-python/issues/3699)) ([50de9af](https://github.com/openai/openai-python/commit/50de9af45900fa2c88ac11efbb7f9a7ff0057c42)) +* **api:** share webhook signature verification ([#3704](https://github.com/openai/openai-python/issues/3704)) ([e14ac34](https://github.com/openai/openai-python/commit/e14ac34376efa5260ef9ef82b939f451f6f9a66a)) + ## [3.3.1](https://github.com/openai/openai-python/compare/v3.3.0...v3.3.1) (2026-08-19) diff --git a/api_reference/openapi.transformed.yml b/api_reference/openapi.transformed.yml index 164fe8c284..556cdd2d9d 100644 --- a/api_reference/openapi.transformed.yml +++ b/api_reference/openapi.transformed.yml @@ -37968,7 +37968,6 @@ components: - incomplete required: - type - - call_id - output FunctionToolCallOutputResource: allOf: @@ -63939,10 +63938,12 @@ components: example: fc_123 - type: 'null' call_id: - type: string - maxLength: 64 - minLength: 1 - description: The unique ID of the function tool call generated by the model. + anyOf: + - type: string + maxLength: 64 + minLength: 1 + description: The unique ID of the function tool call generated by the model. + - type: 'null' type: type: string enum: @@ -63994,7 +63995,6 @@ components: type: object required: - type - - call_id - output title: Function tool call output description: The output of a function tool call. @@ -71251,10 +71251,12 @@ components: example: fc_123 - type: 'null' call_id: - type: string - maxLength: 64 - minLength: 1 - description: The unique ID of the function tool call generated by the model. + anyOf: + - type: string + maxLength: 64 + minLength: 1 + description: The unique ID of the function tool call generated by the model. + - type: 'null' type: type: string enum: @@ -71306,7 +71308,6 @@ components: type: object required: - type - - call_id - output title: Function tool call output description: The output of a function tool call. @@ -73658,7 +73659,6 @@ components: - incomplete required: - type - - call_id - output BetaFunctionToolCallResource: allOf: diff --git a/pyproject.toml b/pyproject.toml index acacf8fcbe..bf804359d6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openai" -version = "3.3.1" +version = "3.5.0" description = "The official Python library for the openai API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/openai/_version.py b/src/openai/_version.py index 186c987465..5f5fbb0639 100644 --- a/src/openai/_version.py +++ b/src/openai/_version.py @@ -1,2 +1,2 @@ __title__ = "openai" -__version__ = "3.3.1" # x-release-please-version +__version__ = "3.5.0" # x-release-please-version diff --git a/src/openai/types/beta/beta_response_function_tool_call_output_item.py b/src/openai/types/beta/beta_response_function_tool_call_output_item.py index 61b947048f..cfe223de26 100644 --- a/src/openai/types/beta/beta_response_function_tool_call_output_item.py +++ b/src/openai/types/beta/beta_response_function_tool_call_output_item.py @@ -50,9 +50,6 @@ class BetaResponseFunctionToolCallOutputItem(BaseModel): id: str """The unique ID of the function call tool output.""" - call_id: str - """The unique ID of the function tool call generated by the model.""" - output: Union[str, List[OutputOutputContentList]] """ The output from the function call generated by your code. Can be a string or an @@ -72,6 +69,9 @@ class BetaResponseFunctionToolCallOutputItem(BaseModel): agent: Optional[Agent] = None """The agent that produced this item.""" + call_id: Optional[str] = None + """The unique ID of the function tool call generated by the model.""" + caller: Optional[Caller] = None """The execution context that produced this tool call.""" diff --git a/src/openai/types/beta/beta_response_input_item.py b/src/openai/types/beta/beta_response_input_item.py index a481f80c9e..c9d6e0a73b 100644 --- a/src/openai/types/beta/beta_response_input_item.py +++ b/src/openai/types/beta/beta_response_input_item.py @@ -227,9 +227,6 @@ class FunctionCallOutputCallerProgram(BaseModel): class FunctionCallOutput(BaseModel): """The output of a function tool call.""" - call_id: str - """The unique ID of the function tool call generated by the model.""" - output: Union[str, BetaResponseFunctionCallOutputItemList] """Text, image, or file output of the function tool call.""" @@ -245,6 +242,9 @@ class FunctionCallOutput(BaseModel): agent: Optional[FunctionCallOutputAgent] = None """The agent that produced this item.""" + call_id: Optional[str] = None + """The unique ID of the function tool call generated by the model.""" + caller: Optional[FunctionCallOutputCaller] = None """The execution context that produced this tool call.""" diff --git a/src/openai/types/beta/beta_response_input_item_param.py b/src/openai/types/beta/beta_response_input_item_param.py index eb27040f11..89e48c0dfe 100644 --- a/src/openai/types/beta/beta_response_input_item_param.py +++ b/src/openai/types/beta/beta_response_input_item_param.py @@ -226,9 +226,6 @@ class FunctionCallOutputCallerProgram(TypedDict, total=False): class FunctionCallOutput(TypedDict, total=False): """The output of a function tool call.""" - call_id: Required[str] - """The unique ID of the function tool call generated by the model.""" - output: Required[Union[str, BetaResponseFunctionCallOutputItemListParam]] """Text, image, or file output of the function tool call.""" @@ -244,6 +241,9 @@ class FunctionCallOutput(TypedDict, total=False): agent: Optional[FunctionCallOutputAgent] """The agent that produced this item.""" + call_id: Optional[str] + """The unique ID of the function tool call generated by the model.""" + caller: Optional[FunctionCallOutputCaller] """The execution context that produced this tool call.""" diff --git a/src/openai/types/beta/beta_response_input_param.py b/src/openai/types/beta/beta_response_input_param.py index 4f81e3505f..b6bb0fe17c 100644 --- a/src/openai/types/beta/beta_response_input_param.py +++ b/src/openai/types/beta/beta_response_input_param.py @@ -227,9 +227,6 @@ class FunctionCallOutputCallerProgram(TypedDict, total=False): class FunctionCallOutput(TypedDict, total=False): """The output of a function tool call.""" - call_id: Required[str] - """The unique ID of the function tool call generated by the model.""" - output: Required[Union[str, BetaResponseFunctionCallOutputItemListParam]] """Text, image, or file output of the function tool call.""" @@ -245,6 +242,9 @@ class FunctionCallOutput(TypedDict, total=False): agent: Optional[FunctionCallOutputAgent] """The agent that produced this item.""" + call_id: Optional[str] + """The unique ID of the function tool call generated by the model.""" + caller: Optional[FunctionCallOutputCaller] """The execution context that produced this tool call.""" diff --git a/src/openai/types/responses/response_function_tool_call_output_item.py b/src/openai/types/responses/response_function_tool_call_output_item.py index 3b19d3ec9b..0c1c78553a 100644 --- a/src/openai/types/responses/response_function_tool_call_output_item.py +++ b/src/openai/types/responses/response_function_tool_call_output_item.py @@ -36,9 +36,6 @@ class ResponseFunctionToolCallOutputItem(BaseModel): id: str """The unique ID of the function call tool output.""" - call_id: str - """The unique ID of the function tool call generated by the model.""" - output: Union[str, List[OutputOutputContentList]] """ The output from the function call generated by your code. Can be a string or an @@ -55,6 +52,9 @@ class ResponseFunctionToolCallOutputItem(BaseModel): type: Literal["function_call_output"] """The type of the function tool call output. Always `function_call_output`.""" + call_id: Optional[str] = None + """The unique ID of the function tool call generated by the model.""" + caller: Optional[Caller] = None """The execution context that produced this tool call.""" diff --git a/src/openai/types/responses/response_input_item.py b/src/openai/types/responses/response_input_item.py index e37ea507af..1d1e06b95c 100644 --- a/src/openai/types/responses/response_input_item.py +++ b/src/openai/types/responses/response_input_item.py @@ -165,9 +165,6 @@ class FunctionCallOutputCallerProgram(BaseModel): class FunctionCallOutput(BaseModel): """The output of a function tool call.""" - call_id: str - """The unique ID of the function tool call generated by the model.""" - output: Union[str, ResponseFunctionCallOutputItemList] """Text, image, or file output of the function tool call.""" @@ -180,6 +177,9 @@ class FunctionCallOutput(BaseModel): Populated when this item is returned via API. """ + call_id: Optional[str] = None + """The unique ID of the function tool call generated by the model.""" + caller: Optional[FunctionCallOutputCaller] = None """The execution context that produced this tool call.""" diff --git a/src/openai/types/responses/response_input_item_param.py b/src/openai/types/responses/response_input_item_param.py index d6192ae496..9a97f86eda 100644 --- a/src/openai/types/responses/response_input_item_param.py +++ b/src/openai/types/responses/response_input_item_param.py @@ -164,9 +164,6 @@ class FunctionCallOutputCallerProgram(TypedDict, total=False): class FunctionCallOutput(TypedDict, total=False): """The output of a function tool call.""" - call_id: Required[str] - """The unique ID of the function tool call generated by the model.""" - output: Required[Union[str, ResponseFunctionCallOutputItemListParam]] """Text, image, or file output of the function tool call.""" @@ -179,6 +176,9 @@ class FunctionCallOutput(TypedDict, total=False): Populated when this item is returned via API. """ + call_id: Optional[str] + """The unique ID of the function tool call generated by the model.""" + caller: Optional[FunctionCallOutputCaller] """The execution context that produced this tool call.""" diff --git a/src/openai/types/responses/response_input_param.py b/src/openai/types/responses/response_input_param.py index c303eb9f6a..90704ed0ce 100644 --- a/src/openai/types/responses/response_input_param.py +++ b/src/openai/types/responses/response_input_param.py @@ -165,9 +165,6 @@ class FunctionCallOutputCallerProgram(TypedDict, total=False): class FunctionCallOutput(TypedDict, total=False): """The output of a function tool call.""" - call_id: Required[str] - """The unique ID of the function tool call generated by the model.""" - output: Required[Union[str, ResponseFunctionCallOutputItemListParam]] """Text, image, or file output of the function tool call.""" @@ -180,6 +177,9 @@ class FunctionCallOutput(TypedDict, total=False): Populated when this item is returned via API. """ + call_id: Optional[str] + """The unique ID of the function tool call generated by the model.""" + caller: Optional[FunctionCallOutputCaller] """The execution context that produced this tool call.""" diff --git a/uv.lock b/uv.lock index fbfb24e3b7..c508f413ab 100644 --- a/uv.lock +++ b/uv.lock @@ -1296,7 +1296,7 @@ wheels = [ [[package]] name = "openai" -version = "3.3.1" # x-release-please-version +version = "3.5.0" # x-release-please-version source = { editable = "." } dependencies = [ { name = "anyio" },