fix: nest model_id/provider_id under model key in SessionChatParams

This commit is contained in:
Wang ChengMeng 2026-06-06 12:38:57 +00:00
parent 817f1a0816
commit 736c9e5ac4

View file

@ -9,16 +9,22 @@ from .._utils import PropertyInfo
from .file_part_input_param import FilePartInputParam
from .text_part_input_param import TextPartInputParam
__all__ = ["SessionChatParams", "Part"]
__all__ = ["ModelParam", "SessionChatParams", "Part"]
class ModelParam(TypedDict, total=False):
"""Model selection parameters nested under the ``model`` key."""
model_id: Required[Annotated[str, PropertyInfo(alias="modelID")]]
provider_id: Required[Annotated[str, PropertyInfo(alias="providerID")]]
class SessionChatParams(TypedDict, total=False):
model_id: Required[Annotated[str, PropertyInfo(alias="modelID")]]
model: Required[ModelParam]
parts: Required[Iterable[Part]]
provider_id: Required[Annotated[str, PropertyInfo(alias="providerID")]]
message_id: Annotated[str, PropertyInfo(alias="messageID")]
mode: str