Commit d4a998e8

stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
2024-08-05 19:02:33
chore(internal): use `TypeAlias` marker for type assignments (#1597)
1 parent da48e4c
src/openai/types/audio/speech_model.py
@@ -1,7 +1,7 @@
 # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
 
-from typing_extensions import Literal
+from typing_extensions import Literal, TypeAlias
 
 __all__ = ["SpeechModel"]
 
-SpeechModel = Literal["tts-1", "tts-1-hd"]
+SpeechModel: TypeAlias = Literal["tts-1", "tts-1-hd"]
src/openai/types/beta/threads/runs/code_interpreter_tool_call.py
@@ -1,7 +1,7 @@
 # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
 
 from typing import List, Union
-from typing_extensions import Literal, Annotated
+from typing_extensions import Literal, Annotated, TypeAlias
 
 from ....._utils import PropertyInfo
 from ....._models import BaseModel
@@ -39,7 +39,7 @@ class CodeInterpreterOutputImage(BaseModel):
     """Always `image`."""
 
 
-CodeInterpreterOutput = Annotated[
+CodeInterpreterOutput: TypeAlias = Annotated[
     Union[CodeInterpreterOutputLogs, CodeInterpreterOutputImage], PropertyInfo(discriminator="type")
 ]
 
src/openai/types/beta/threads/runs/code_interpreter_tool_call_delta.py
@@ -1,7 +1,7 @@
 # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
 
 from typing import List, Union, Optional
-from typing_extensions import Literal, Annotated
+from typing_extensions import Literal, Annotated, TypeAlias
 
 from ....._utils import PropertyInfo
 from ....._models import BaseModel
@@ -10,7 +10,7 @@ from .code_interpreter_output_image import CodeInterpreterOutputImage
 
 __all__ = ["CodeInterpreterToolCallDelta", "CodeInterpreter", "CodeInterpreterOutput"]
 
-CodeInterpreterOutput = Annotated[
+CodeInterpreterOutput: TypeAlias = Annotated[
     Union[CodeInterpreterLogs, CodeInterpreterOutputImage], PropertyInfo(discriminator="type")
 ]
 
src/openai/types/beta/threads/runs/run_step.py
@@ -1,7 +1,7 @@
 # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
 
 from typing import Union, Optional
-from typing_extensions import Literal, Annotated
+from typing_extensions import Literal, Annotated, TypeAlias
 
 from ....._utils import PropertyInfo
 from ....._models import BaseModel
@@ -19,7 +19,9 @@ class LastError(BaseModel):
     """A human-readable description of the error."""
 
 
-StepDetails = Annotated[Union[MessageCreationStepDetails, ToolCallsStepDetails], PropertyInfo(discriminator="type")]
+StepDetails: TypeAlias = Annotated[
+    Union[MessageCreationStepDetails, ToolCallsStepDetails], PropertyInfo(discriminator="type")
+]
 
 
 class Usage(BaseModel):
src/openai/types/beta/threads/runs/run_step_delta.py
@@ -1,7 +1,7 @@
 # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
 
 from typing import Union, Optional
-from typing_extensions import Annotated
+from typing_extensions import Annotated, TypeAlias
 
 from ....._utils import PropertyInfo
 from ....._models import BaseModel
@@ -10,7 +10,9 @@ from .run_step_delta_message_delta import RunStepDeltaMessageDelta
 
 __all__ = ["RunStepDelta", "StepDetails"]
 
-StepDetails = Annotated[Union[RunStepDeltaMessageDelta, ToolCallDeltaObject], PropertyInfo(discriminator="type")]
+StepDetails: TypeAlias = Annotated[
+    Union[RunStepDeltaMessageDelta, ToolCallDeltaObject], PropertyInfo(discriminator="type")
+]
 
 
 class RunStepDelta(BaseModel):
src/openai/types/beta/threads/runs/tool_call.py
@@ -1,7 +1,7 @@
 # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
 
 from typing import Union
-from typing_extensions import Annotated
+from typing_extensions import Annotated, TypeAlias
 
 from ....._utils import PropertyInfo
 from .function_tool_call import FunctionToolCall
@@ -10,6 +10,6 @@ from .code_interpreter_tool_call import CodeInterpreterToolCall
 
 __all__ = ["ToolCall"]
 
-ToolCall = Annotated[
+ToolCall: TypeAlias = Annotated[
     Union[CodeInterpreterToolCall, FileSearchToolCall, FunctionToolCall], PropertyInfo(discriminator="type")
 ]
src/openai/types/beta/threads/runs/tool_call_delta.py
@@ -1,7 +1,7 @@
 # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
 
 from typing import Union
-from typing_extensions import Annotated
+from typing_extensions import Annotated, TypeAlias
 
 from ....._utils import PropertyInfo
 from .function_tool_call_delta import FunctionToolCallDelta
@@ -10,7 +10,7 @@ from .code_interpreter_tool_call_delta import CodeInterpreterToolCallDelta
 
 __all__ = ["ToolCallDelta"]
 
-ToolCallDelta = Annotated[
+ToolCallDelta: TypeAlias = Annotated[
     Union[CodeInterpreterToolCallDelta, FileSearchToolCallDelta, FunctionToolCallDelta],
     PropertyInfo(discriminator="type"),
 ]
src/openai/types/beta/threads/annotation.py
@@ -1,7 +1,7 @@
 # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
 
 from typing import Union
-from typing_extensions import Annotated
+from typing_extensions import Annotated, TypeAlias
 
 from ...._utils import PropertyInfo
 from .file_path_annotation import FilePathAnnotation
@@ -9,4 +9,4 @@ from .file_citation_annotation import FileCitationAnnotation
 
 __all__ = ["Annotation"]
 
-Annotation = Annotated[Union[FileCitationAnnotation, FilePathAnnotation], PropertyInfo(discriminator="type")]
+Annotation: TypeAlias = Annotated[Union[FileCitationAnnotation, FilePathAnnotation], PropertyInfo(discriminator="type")]
src/openai/types/beta/threads/annotation_delta.py
@@ -1,7 +1,7 @@
 # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
 
 from typing import Union
-from typing_extensions import Annotated
+from typing_extensions import Annotated, TypeAlias
 
 from ...._utils import PropertyInfo
 from .file_path_delta_annotation import FilePathDeltaAnnotation
@@ -9,6 +9,6 @@ from .file_citation_delta_annotation import FileCitationDeltaAnnotation
 
 __all__ = ["AnnotationDelta"]
 
-AnnotationDelta = Annotated[
+AnnotationDelta: TypeAlias = Annotated[
     Union[FileCitationDeltaAnnotation, FilePathDeltaAnnotation], PropertyInfo(discriminator="type")
 ]
src/openai/types/beta/threads/message.py
@@ -1,7 +1,7 @@
 # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
 
 from typing import List, Union, Optional
-from typing_extensions import Literal
+from typing_extensions import Literal, TypeAlias
 
 from ...._models import BaseModel
 from .message_content import MessageContent
@@ -21,7 +21,7 @@ class AttachmentToolAssistantToolsFileSearchTypeOnly(BaseModel):
     """The type of tool being defined: `file_search`"""
 
 
-AttachmentTool = Union[CodeInterpreterTool, AttachmentToolAssistantToolsFileSearchTypeOnly]
+AttachmentTool: TypeAlias = Union[CodeInterpreterTool, AttachmentToolAssistantToolsFileSearchTypeOnly]
 
 
 class Attachment(BaseModel):
src/openai/types/beta/threads/message_content.py
@@ -1,7 +1,7 @@
 # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
 
 from typing import Union
-from typing_extensions import Annotated
+from typing_extensions import Annotated, TypeAlias
 
 from ...._utils import PropertyInfo
 from .text_content_block import TextContentBlock
@@ -10,6 +10,6 @@ from .image_file_content_block import ImageFileContentBlock
 
 __all__ = ["MessageContent"]
 
-MessageContent = Annotated[
+MessageContent: TypeAlias = Annotated[
     Union[ImageFileContentBlock, ImageURLContentBlock, TextContentBlock], PropertyInfo(discriminator="type")
 ]
src/openai/types/beta/threads/message_content_delta.py
@@ -1,7 +1,7 @@
 # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
 
 from typing import Union
-from typing_extensions import Annotated
+from typing_extensions import Annotated, TypeAlias
 
 from ...._utils import PropertyInfo
 from .text_delta_block import TextDeltaBlock
@@ -10,6 +10,6 @@ from .image_file_delta_block import ImageFileDeltaBlock
 
 __all__ = ["MessageContentDelta"]
 
-MessageContentDelta = Annotated[
+MessageContentDelta: TypeAlias = Annotated[
     Union[ImageFileDeltaBlock, TextDeltaBlock, ImageURLDeltaBlock], PropertyInfo(discriminator="type")
 ]
src/openai/types/beta/threads/message_content_part_param.py
@@ -3,6 +3,7 @@
 from __future__ import annotations
 
 from typing import Union
+from typing_extensions import TypeAlias
 
 from .text_content_block_param import TextContentBlockParam
 from .image_url_content_block_param import ImageURLContentBlockParam
@@ -10,4 +11,4 @@ from .image_file_content_block_param import ImageFileContentBlockParam
 
 __all__ = ["MessageContentPartParam"]
 
-MessageContentPartParam = Union[ImageFileContentBlockParam, ImageURLContentBlockParam, TextContentBlockParam]
+MessageContentPartParam: TypeAlias = Union[ImageFileContentBlockParam, ImageURLContentBlockParam, TextContentBlockParam]
src/openai/types/beta/threads/message_create_params.py
@@ -3,7 +3,7 @@
 from __future__ import annotations
 
 from typing import Union, Iterable, Optional
-from typing_extensions import Literal, Required, TypedDict
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
 
 from .message_content_part_param import MessageContentPartParam
 from ..code_interpreter_tool_param import CodeInterpreterToolParam
@@ -41,7 +41,7 @@ class AttachmentToolFileSearch(TypedDict, total=False):
     """The type of tool being defined: `file_search`"""
 
 
-AttachmentTool = Union[CodeInterpreterToolParam, AttachmentToolFileSearch]
+AttachmentTool: TypeAlias = Union[CodeInterpreterToolParam, AttachmentToolFileSearch]
 
 
 class Attachment(TypedDict, total=False):
src/openai/types/beta/threads/run_create_params.py
@@ -3,7 +3,7 @@
 from __future__ import annotations
 
 from typing import Union, Iterable, Optional
-from typing_extensions import Literal, Required, TypedDict
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
 
 from ...chat_model import ChatModel
 from ..assistant_tool_param import AssistantToolParam
@@ -154,7 +154,7 @@ class AdditionalMessageAttachmentToolFileSearch(TypedDict, total=False):
     """The type of tool being defined: `file_search`"""
 
 
-AdditionalMessageAttachmentTool = Union[CodeInterpreterToolParam, AdditionalMessageAttachmentToolFileSearch]
+AdditionalMessageAttachmentTool: TypeAlias = Union[CodeInterpreterToolParam, AdditionalMessageAttachmentToolFileSearch]
 
 
 class AdditionalMessageAttachment(TypedDict, total=False):
src/openai/types/beta/threads/run_status.py
@@ -1,10 +1,10 @@
 # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
 
-from typing_extensions import Literal
+from typing_extensions import Literal, TypeAlias
 
 __all__ = ["RunStatus"]
 
-RunStatus = Literal[
+RunStatus: TypeAlias = Literal[
     "queued",
     "in_progress",
     "requires_action",
src/openai/types/beta/vector_stores/file_batch_create_params.py
@@ -3,7 +3,7 @@
 from __future__ import annotations
 
 from typing import List, Union
-from typing_extensions import Literal, Required, TypedDict
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
 
 __all__ = [
     "FileBatchCreateParams",
@@ -56,6 +56,6 @@ class ChunkingStrategyStaticChunkingStrategyRequestParam(TypedDict, total=False)
     """Always `static`."""
 
 
-ChunkingStrategy = Union[
+ChunkingStrategy: TypeAlias = Union[
     ChunkingStrategyAutoChunkingStrategyRequestParam, ChunkingStrategyStaticChunkingStrategyRequestParam
 ]
src/openai/types/beta/vector_stores/file_create_params.py
@@ -3,7 +3,7 @@
 from __future__ import annotations
 
 from typing import Union
-from typing_extensions import Literal, Required, TypedDict
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
 
 __all__ = [
     "FileCreateParams",
@@ -56,6 +56,6 @@ class ChunkingStrategyStaticChunkingStrategyRequestParam(TypedDict, total=False)
     """Always `static`."""
 
 
-ChunkingStrategy = Union[
+ChunkingStrategy: TypeAlias = Union[
     ChunkingStrategyAutoChunkingStrategyRequestParam, ChunkingStrategyStaticChunkingStrategyRequestParam
 ]
src/openai/types/beta/vector_stores/vector_store_file.py
@@ -1,7 +1,7 @@
 # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
 
 from typing import Union, Optional
-from typing_extensions import Literal, Annotated
+from typing_extensions import Literal, Annotated, TypeAlias
 
 from ...._utils import PropertyInfo
 from ...._models import BaseModel
@@ -51,7 +51,9 @@ class ChunkingStrategyOther(BaseModel):
     """Always `other`."""
 
 
-ChunkingStrategy = Annotated[Union[ChunkingStrategyStatic, ChunkingStrategyOther], PropertyInfo(discriminator="type")]
+ChunkingStrategy: TypeAlias = Annotated[
+    Union[ChunkingStrategyStatic, ChunkingStrategyOther], PropertyInfo(discriminator="type")
+]
 
 
 class VectorStoreFile(BaseModel):
src/openai/types/beta/assistant_create_params.py
@@ -3,7 +3,7 @@
 from __future__ import annotations
 
 from typing import List, Union, Iterable, Optional
-from typing_extensions import Literal, Required, TypedDict
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
 
 from ..chat_model import ChatModel
 from .assistant_tool_param import AssistantToolParam
@@ -140,7 +140,7 @@ class ToolResourcesFileSearchVectorStoreChunkingStrategyStatic(TypedDict, total=
     """Always `static`."""
 
 
-ToolResourcesFileSearchVectorStoreChunkingStrategy = Union[
+ToolResourcesFileSearchVectorStoreChunkingStrategy: TypeAlias = Union[
     ToolResourcesFileSearchVectorStoreChunkingStrategyAuto, ToolResourcesFileSearchVectorStoreChunkingStrategyStatic
 ]
 
src/openai/types/beta/assistant_response_format_option.py
@@ -1,10 +1,10 @@
 # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
 
 from typing import Union
-from typing_extensions import Literal
+from typing_extensions import Literal, TypeAlias
 
 from .assistant_response_format import AssistantResponseFormat
 
 __all__ = ["AssistantResponseFormatOption"]
 
-AssistantResponseFormatOption = Union[Literal["none", "auto"], AssistantResponseFormat]
+AssistantResponseFormatOption: TypeAlias = Union[Literal["none", "auto"], AssistantResponseFormat]
src/openai/types/beta/assistant_response_format_option_param.py
@@ -3,10 +3,10 @@
 from __future__ import annotations
 
 from typing import Union
-from typing_extensions import Literal
+from typing_extensions import Literal, TypeAlias
 
 from .assistant_response_format_param import AssistantResponseFormatParam
 
 __all__ = ["AssistantResponseFormatOptionParam"]
 
-AssistantResponseFormatOptionParam = Union[Literal["none", "auto"], AssistantResponseFormatParam]
+AssistantResponseFormatOptionParam: TypeAlias = Union[Literal["none", "auto"], AssistantResponseFormatParam]
src/openai/types/beta/assistant_stream_event.py
@@ -1,7 +1,7 @@
 # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
 
 from typing import Union
-from typing_extensions import Literal, Annotated
+from typing_extensions import Literal, Annotated, TypeAlias
 
 from .thread import Thread
 from ..._utils import PropertyInfo
@@ -260,7 +260,7 @@ class ErrorEvent(BaseModel):
     event: Literal["error"]
 
 
-AssistantStreamEvent = Annotated[
+AssistantStreamEvent: TypeAlias = Annotated[
     Union[
         ThreadCreated,
         ThreadRunCreated,
src/openai/types/beta/assistant_tool.py
@@ -1,7 +1,7 @@
 # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
 
 from typing import Union
-from typing_extensions import Annotated
+from typing_extensions import Annotated, TypeAlias
 
 from ..._utils import PropertyInfo
 from .function_tool import FunctionTool
@@ -10,4 +10,6 @@ from .code_interpreter_tool import CodeInterpreterTool
 
 __all__ = ["AssistantTool"]
 
-AssistantTool = Annotated[Union[CodeInterpreterTool, FileSearchTool, FunctionTool], PropertyInfo(discriminator="type")]
+AssistantTool: TypeAlias = Annotated[
+    Union[CodeInterpreterTool, FileSearchTool, FunctionTool], PropertyInfo(discriminator="type")
+]
src/openai/types/beta/assistant_tool_choice_option.py
@@ -1,10 +1,10 @@
 # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
 
 from typing import Union
-from typing_extensions import Literal
+from typing_extensions import Literal, TypeAlias
 
 from .assistant_tool_choice import AssistantToolChoice
 
 __all__ = ["AssistantToolChoiceOption"]
 
-AssistantToolChoiceOption = Union[Literal["none", "auto", "required"], AssistantToolChoice]
+AssistantToolChoiceOption: TypeAlias = Union[Literal["none", "auto", "required"], AssistantToolChoice]
src/openai/types/beta/assistant_tool_choice_option_param.py
@@ -3,10 +3,10 @@
 from __future__ import annotations
 
 from typing import Union
-from typing_extensions import Literal
+from typing_extensions import Literal, TypeAlias
 
 from .assistant_tool_choice_param import AssistantToolChoiceParam
 
 __all__ = ["AssistantToolChoiceOptionParam"]
 
-AssistantToolChoiceOptionParam = Union[Literal["none", "auto", "required"], AssistantToolChoiceParam]
+AssistantToolChoiceOptionParam: TypeAlias = Union[Literal["none", "auto", "required"], AssistantToolChoiceParam]
src/openai/types/beta/assistant_tool_param.py
@@ -3,6 +3,7 @@
 from __future__ import annotations
 
 from typing import Union
+from typing_extensions import TypeAlias
 
 from .function_tool_param import FunctionToolParam
 from .file_search_tool_param import FileSearchToolParam
@@ -10,4 +11,4 @@ from .code_interpreter_tool_param import CodeInterpreterToolParam
 
 __all__ = ["AssistantToolParam"]
 
-AssistantToolParam = Union[CodeInterpreterToolParam, FileSearchToolParam, FunctionToolParam]
+AssistantToolParam: TypeAlias = Union[CodeInterpreterToolParam, FileSearchToolParam, FunctionToolParam]
src/openai/types/beta/thread_create_and_run_params.py
@@ -3,7 +3,7 @@
 from __future__ import annotations
 
 from typing import List, Union, Iterable, Optional
-from typing_extensions import Literal, Required, TypedDict
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
 
 from ..chat_model import ChatModel
 from .function_tool_param import FunctionToolParam
@@ -168,7 +168,7 @@ class ThreadMessageAttachmentToolFileSearch(TypedDict, total=False):
     """The type of tool being defined: `file_search`"""
 
 
-ThreadMessageAttachmentTool = Union[CodeInterpreterToolParam, ThreadMessageAttachmentToolFileSearch]
+ThreadMessageAttachmentTool: TypeAlias = Union[CodeInterpreterToolParam, ThreadMessageAttachmentToolFileSearch]
 
 
 class ThreadMessageAttachment(TypedDict, total=False):
@@ -240,7 +240,7 @@ class ThreadToolResourcesFileSearchVectorStoreChunkingStrategyStatic(TypedDict,
     """Always `static`."""
 
 
-ThreadToolResourcesFileSearchVectorStoreChunkingStrategy = Union[
+ThreadToolResourcesFileSearchVectorStoreChunkingStrategy: TypeAlias = Union[
     ThreadToolResourcesFileSearchVectorStoreChunkingStrategyAuto,
     ThreadToolResourcesFileSearchVectorStoreChunkingStrategyStatic,
 ]
@@ -342,7 +342,7 @@ class ToolResources(TypedDict, total=False):
     file_search: ToolResourcesFileSearch
 
 
-Tool = Union[CodeInterpreterToolParam, FileSearchToolParam, FunctionToolParam]
+Tool: TypeAlias = Union[CodeInterpreterToolParam, FileSearchToolParam, FunctionToolParam]
 
 
 class TruncationStrategy(TypedDict, total=False):
src/openai/types/beta/thread_create_params.py
@@ -3,7 +3,7 @@
 from __future__ import annotations
 
 from typing import List, Union, Iterable, Optional
-from typing_extensions import Literal, Required, TypedDict
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
 
 from .code_interpreter_tool_param import CodeInterpreterToolParam
 from .threads.message_content_part_param import MessageContentPartParam
@@ -54,7 +54,7 @@ class MessageAttachmentToolFileSearch(TypedDict, total=False):
     """The type of tool being defined: `file_search`"""
 
 
-MessageAttachmentTool = Union[CodeInterpreterToolParam, MessageAttachmentToolFileSearch]
+MessageAttachmentTool: TypeAlias = Union[CodeInterpreterToolParam, MessageAttachmentToolFileSearch]
 
 
 class MessageAttachment(TypedDict, total=False):
@@ -126,7 +126,7 @@ class ToolResourcesFileSearchVectorStoreChunkingStrategyStatic(TypedDict, total=
     """Always `static`."""
 
 
-ToolResourcesFileSearchVectorStoreChunkingStrategy = Union[
+ToolResourcesFileSearchVectorStoreChunkingStrategy: TypeAlias = Union[
     ToolResourcesFileSearchVectorStoreChunkingStrategyAuto, ToolResourcesFileSearchVectorStoreChunkingStrategyStatic
 ]
 
src/openai/types/beta/vector_store_create_params.py
@@ -3,7 +3,7 @@
 from __future__ import annotations
 
 from typing import List, Union, Optional
-from typing_extensions import Literal, Required, TypedDict
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
 
 __all__ = [
     "VectorStoreCreateParams",
@@ -72,7 +72,7 @@ class ChunkingStrategyStatic(TypedDict, total=False):
     """Always `static`."""
 
 
-ChunkingStrategy = Union[ChunkingStrategyAuto, ChunkingStrategyStatic]
+ChunkingStrategy: TypeAlias = Union[ChunkingStrategyAuto, ChunkingStrategyStatic]
 
 
 class ExpiresAfter(TypedDict, total=False):
src/openai/types/chat/chat_completion_content_part_param.py
@@ -3,10 +3,13 @@
 from __future__ import annotations
 
 from typing import Union
+from typing_extensions import TypeAlias
 
 from .chat_completion_content_part_text_param import ChatCompletionContentPartTextParam
 from .chat_completion_content_part_image_param import ChatCompletionContentPartImageParam
 
 __all__ = ["ChatCompletionContentPartParam"]
 
-ChatCompletionContentPartParam = Union[ChatCompletionContentPartTextParam, ChatCompletionContentPartImageParam]
+ChatCompletionContentPartParam: TypeAlias = Union[
+    ChatCompletionContentPartTextParam, ChatCompletionContentPartImageParam
+]
src/openai/types/chat/chat_completion_message_param.py
@@ -3,6 +3,7 @@
 from __future__ import annotations
 
 from typing import Union
+from typing_extensions import TypeAlias
 
 from .chat_completion_tool_message_param import ChatCompletionToolMessageParam
 from .chat_completion_user_message_param import ChatCompletionUserMessageParam
@@ -12,7 +13,7 @@ from .chat_completion_assistant_message_param import ChatCompletionAssistantMess
 
 __all__ = ["ChatCompletionMessageParam"]
 
-ChatCompletionMessageParam = Union[
+ChatCompletionMessageParam: TypeAlias = Union[
     ChatCompletionSystemMessageParam,
     ChatCompletionUserMessageParam,
     ChatCompletionAssistantMessageParam,
src/openai/types/chat/chat_completion_role.py
@@ -1,7 +1,7 @@
 # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
 
-from typing_extensions import Literal
+from typing_extensions import Literal, TypeAlias
 
 __all__ = ["ChatCompletionRole"]
 
-ChatCompletionRole = Literal["system", "user", "assistant", "tool", "function"]
+ChatCompletionRole: TypeAlias = Literal["system", "user", "assistant", "tool", "function"]
src/openai/types/chat/chat_completion_tool_choice_option_param.py
@@ -3,10 +3,12 @@
 from __future__ import annotations
 
 from typing import Union
-from typing_extensions import Literal
+from typing_extensions import Literal, TypeAlias
 
 from .chat_completion_named_tool_choice_param import ChatCompletionNamedToolChoiceParam
 
 __all__ = ["ChatCompletionToolChoiceOptionParam"]
 
-ChatCompletionToolChoiceOptionParam = Union[Literal["none", "auto", "required"], ChatCompletionNamedToolChoiceParam]
+ChatCompletionToolChoiceOptionParam: TypeAlias = Union[
+    Literal["none", "auto", "required"], ChatCompletionNamedToolChoiceParam
+]
src/openai/types/chat/completion_create_params.py
@@ -3,7 +3,7 @@
 from __future__ import annotations
 
 from typing import Dict, List, Union, Iterable, Optional
-from typing_extensions import Literal, Required, TypedDict
+from typing_extensions import Literal, Required, TypeAlias, TypedDict
 
 from ...types import shared_params
 from ..chat_model import ChatModel
@@ -221,7 +221,7 @@ class CompletionCreateParamsBase(TypedDict, total=False):
     """
 
 
-FunctionCall = Union[Literal["none", "auto"], ChatCompletionFunctionCallOptionParam]
+FunctionCall: TypeAlias = Union[Literal["none", "auto"], ChatCompletionFunctionCallOptionParam]
 
 
 class Function(TypedDict, total=False):
src/openai/types/shared/function_parameters.py
@@ -1,7 +1,8 @@
 # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
 
 from typing import Dict
+from typing_extensions import TypeAlias
 
 __all__ = ["FunctionParameters"]
 
-FunctionParameters = Dict[str, object]
+FunctionParameters: TypeAlias = Dict[str, object]
src/openai/types/shared_params/function_parameters.py
@@ -3,7 +3,8 @@
 from __future__ import annotations
 
 from typing import Dict
+from typing_extensions import TypeAlias
 
 __all__ = ["FunctionParameters"]
 
-FunctionParameters = Dict[str, object]
+FunctionParameters: TypeAlias = Dict[str, object]
src/openai/types/audio_model.py
@@ -1,7 +1,7 @@
 # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
 
-from typing_extensions import Literal
+from typing_extensions import Literal, TypeAlias
 
 __all__ = ["AudioModel"]
 
-AudioModel = Literal["whisper-1"]
+AudioModel: TypeAlias = Literal["whisper-1"]
src/openai/types/chat_model.py
@@ -1,10 +1,10 @@
 # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
 
-from typing_extensions import Literal
+from typing_extensions import Literal, TypeAlias
 
 __all__ = ["ChatModel"]
 
-ChatModel = Literal[
+ChatModel: TypeAlias = Literal[
     "gpt-4o",
     "gpt-4o-2024-05-13",
     "gpt-4o-mini",
src/openai/types/file_content.py
@@ -1,6 +1,7 @@
 # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
 
+from typing_extensions import TypeAlias
 
 __all__ = ["FileContent"]
 
-FileContent = str
+FileContent: TypeAlias = str
src/openai/types/image_model.py
@@ -1,7 +1,7 @@
 # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
 
-from typing_extensions import Literal
+from typing_extensions import Literal, TypeAlias
 
 __all__ = ["ImageModel"]
 
-ImageModel = Literal["dall-e-2", "dall-e-3"]
+ImageModel: TypeAlias = Literal["dall-e-2", "dall-e-3"]
src/openai/types/moderation_model.py
@@ -1,7 +1,7 @@
 # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
 
-from typing_extensions import Literal
+from typing_extensions import Literal, TypeAlias
 
 __all__ = ["ModerationModel"]
 
-ModerationModel = Literal["text-moderation-latest", "text-moderation-stable"]
+ModerationModel: TypeAlias = Literal["text-moderation-latest", "text-moderation-stable"]