Skip to content

Commit 14d8cd8

Browse files
xcpkyzhaobin
andauthored
Support json object output for Deepseek provider (#3601)
Co-authored-by: zhaobin <zhaobin@icbench.com>
1 parent 1a35af5 commit 14d8cd8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pydantic_ai_slim/pydantic_ai/providers/deepseek.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ def model_profile(self, model_name: str) -> ModelProfile | None:
4444
# we need to maintain that behavior unless json_schema_transformer is set explicitly.
4545
# This was not the case when using a DeepSeek model with another model class (e.g. BedrockConverseModel or GroqModel),
4646
# so we won't do this in `deepseek_model_profile` unless we learn it's always needed.
47-
return OpenAIModelProfile(json_schema_transformer=OpenAIJsonSchemaTransformer).update(profile)
47+
return OpenAIModelProfile(
48+
json_schema_transformer=OpenAIJsonSchemaTransformer, supports_json_object_output=True
49+
).update(profile)
4850

4951
@overload
5052
def __init__(self) -> None: ...

0 commit comments

Comments
 (0)