File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
pydantic_ai_slim/pydantic_ai/models Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,13 @@ class OpenAIModelSettings(ModelSettings, total=False):
116
116
See [OpenAI's safety best practices](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids) for more details.
117
117
"""
118
118
119
+ openai_service_tier : Literal ['auto' , 'default' , 'flex' ]
120
+ """The service tier to use for the model request.
121
+
122
+ Currently supported values are `auto`, `default`, and `flex`.
123
+ For more information, see [OpenAI's service tiers documentation](https://platform.openai.com/docs/api-reference/chat/object#chat/object-service_tier).
124
+ """
125
+
119
126
120
127
class OpenAIResponsesModelSettings (OpenAIModelSettings , total = False ):
121
128
"""Settings used for an OpenAI Responses model request.
@@ -298,6 +305,7 @@ async def _completions_create(
298
305
logprobs = model_settings .get ('openai_logprobs' , NOT_GIVEN ),
299
306
top_logprobs = model_settings .get ('openai_top_logprobs' , NOT_GIVEN ),
300
307
user = model_settings .get ('openai_user' , NOT_GIVEN ),
308
+ service_tier = model_settings .get ('openai_service_tier' , NOT_GIVEN ),
301
309
extra_headers = extra_headers ,
302
310
extra_body = model_settings .get ('extra_body' ),
303
311
)
You can’t perform that action at this time.
0 commit comments