33from __future__ import annotations
44
55from typing import Dict , Union , Optional
6- from typing_extensions import Literal , Required , Annotated , TypedDict
6+ from typing_extensions import Literal , Required , Annotated , TypeAlias , TypedDict
77
88from .._utils import PropertyInfo
99from .model_config_param import ModelConfigParam
1010
11- __all__ = ["SessionExtractParamsBase" , "Options" , "SessionExtractParamsNonStreaming" , "SessionExtractParamsStreaming" ]
11+ __all__ = [
12+ "SessionExtractParamsBase" ,
13+ "Options" ,
14+ "OptionsModel" ,
15+ "SessionExtractParamsNonStreaming" ,
16+ "SessionExtractParamsStreaming" ,
17+ ]
1218
1319
1420class SessionExtractParamsBase (TypedDict , total = False ):
@@ -27,12 +33,12 @@ class SessionExtractParamsBase(TypedDict, total=False):
2733 """Whether to stream the response via SSE"""
2834
2935
36+ OptionsModel : TypeAlias = Union [ModelConfigParam , str ]
37+
38+
3039class Options (TypedDict , total = False ):
31- model : ModelConfigParam
32- """
33- Model name string with provider prefix (e.g., 'openai/gpt-5-nano',
34- 'anthropic/claude-4.5-opus')
35- """
40+ model : OptionsModel
41+ """Model configuration object or model name string (e.g., 'openai/gpt-5-nano')"""
3642
3743 selector : str
3844 """CSS selector to scope extraction to a specific element"""
0 commit comments