Commit f0bdef04

Stainless Bot <107565488+stainless-bot@users.noreply.github.com>
2024-04-02 23:11:51
release: 1.16.1 (#1292) tag: v1.16.1
* chore(internal): defer model build for import latency (#1291) * release: 1.16.1
1 parent 632cd6f
src/openai/_models.py
@@ -1,5 +1,6 @@
 from __future__ import annotations
 
+import os
 import inspect
 from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, cast
 from datetime import date, datetime
@@ -38,6 +39,7 @@ from ._utils import (
     is_given,
     is_mapping,
     parse_date,
+    coerce_boolean,
     parse_datetime,
     strip_not_given,
     extract_type_arg,
@@ -74,7 +76,9 @@ class _ConfigProtocol(Protocol):
 
 class BaseModel(pydantic.BaseModel):
     if PYDANTIC_V2:
-        model_config: ClassVar[ConfigDict] = ConfigDict(extra="allow")
+        model_config: ClassVar[ConfigDict] = ConfigDict(
+            extra="allow", defer_build=coerce_boolean(os.environ.get("DEFER_PYDANTIC_BUILD", "true"))
+        )
     else:
 
         @property
src/openai/_version.py
@@ -1,4 +1,4 @@
 # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
 
 __title__ = "openai"
-__version__ = "1.16.0"  # x-release-please-version
+__version__ = "1.16.1"  # x-release-please-version
.release-please-manifest.json
@@ -1,3 +1,3 @@
 {
-  ".": "1.16.0"
+  ".": "1.16.1"
 }
\ No newline at end of file
CHANGELOG.md
@@ -1,5 +1,13 @@
 # Changelog
 
+## 1.16.1 (2024-04-02)
+
+Full Changelog: [v1.16.0...v1.16.1](https://github.com/openai/openai-python/compare/v1.16.0...v1.16.1)
+
+### Chores
+
+* **internal:** defer model build for import latency ([#1291](https://github.com/openai/openai-python/issues/1291)) ([bc6866e](https://github.com/openai/openai-python/commit/bc6866eb2335d01532190d0906cad7bf9af28621))
+
 ## 1.16.0 (2024-04-01)
 
 Full Changelog: [v1.15.0...v1.16.0](https://github.com/openai/openai-python/compare/v1.15.0...v1.16.0)
pyproject.toml
@@ -1,6 +1,6 @@
 [project]
 name = "openai"
-version = "1.16.0"
+version = "1.16.1"
 description = "The official Python library for the openai API"
 dynamic = ["readme"]
 license = "Apache-2.0"