22
33from __future__ import annotations
44
5- from typing import Iterable
5+ from typing import Union , Iterable
66from typing_extensions import Literal
77
88import httpx
99
10- from ..._types import Body , Omit , Query , Headers , NotGiven , omit , not_given
10+ from ..._types import Body , Omit , Query , Headers , NotGiven , SequenceNotStr , omit , not_given
1111from ..._utils import maybe_transform , async_maybe_transform
1212from ..._compat import cached_property
1313from ..._resource import SyncAPIResource , AsyncAPIResource
@@ -54,6 +54,7 @@ def create(
5454 display_mode : Literal ["email" , "web" , "popup" , "document" ],
5555 input : Iterable [import_create_params .Input ],
5656 project_id : str | Omit = omit ,
57+ fallback_models : Union [bool , SequenceNotStr [str ]] | Omit = omit ,
5758 model : str | Omit = omit ,
5859 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5960 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -74,7 +75,11 @@ def create(
7475
7576 project_id: The project ID (required for PAT auth, auto-resolved for API key auth)
7677
77- model: AI model to use. Accepts a provider/model string (e.g.
78+ fallback_models: Transient-outage fallback controls. Omit to use Unlayer defaults only when no
79+ model is pinned; true always uses Unlayer defaults; false disables the outage
80+ tail; an ordered array replaces the default provider/model strings.
81+
82+ model: Preferred AI model. Accepts a provider/model string (e.g.
7883 "anthropic/claude-opus-4-7", "openai/gpt-5.5"), a bare provider ("anthropic",
7984 "openai") which uses that provider's default model, or a bare model id
8085 ("claude-opus-4-7", "gpt-5.5") with the provider inferred from the name.
@@ -94,6 +99,7 @@ def create(
9499 {
95100 "display_mode" : display_mode ,
96101 "input" : input ,
102+ "fallback_models" : fallback_models ,
97103 "model" : model ,
98104 },
99105 import_create_params .ImportCreateParams ,
@@ -139,6 +145,7 @@ async def create(
139145 display_mode : Literal ["email" , "web" , "popup" , "document" ],
140146 input : Iterable [import_create_params .Input ],
141147 project_id : str | Omit = omit ,
148+ fallback_models : Union [bool , SequenceNotStr [str ]] | Omit = omit ,
142149 model : str | Omit = omit ,
143150 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
144151 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -159,7 +166,11 @@ async def create(
159166
160167 project_id: The project ID (required for PAT auth, auto-resolved for API key auth)
161168
162- model: AI model to use. Accepts a provider/model string (e.g.
169+ fallback_models: Transient-outage fallback controls. Omit to use Unlayer defaults only when no
170+ model is pinned; true always uses Unlayer defaults; false disables the outage
171+ tail; an ordered array replaces the default provider/model strings.
172+
173+ model: Preferred AI model. Accepts a provider/model string (e.g.
163174 "anthropic/claude-opus-4-7", "openai/gpt-5.5"), a bare provider ("anthropic",
164175 "openai") which uses that provider's default model, or a bare model id
165176 ("claude-opus-4-7", "gpt-5.5") with the provider inferred from the name.
@@ -179,6 +190,7 @@ async def create(
179190 {
180191 "display_mode" : display_mode ,
181192 "input" : input ,
193+ "fallback_models" : fallback_models ,
182194 "model" : model ,
183195 },
184196 import_create_params .ImportCreateParams ,
0 commit comments