Skip to content

[BUG CLIENT]: Agent cannot handle JSON output format with web search #414

@MelchiorReihlen

Description

@MelchiorReihlen

Python -VV

Python 3.10.19 (main, Dec 17 2025, 20:54:19) [Clang 21.1.4 ]

Pip Freeze

annotated-types==0.7.0
anyio==4.12.1
attrs==25.4.0
authlib==1.6.9
certifi==2026.2.25
cffi==2.0.0
charset-normalizer==3.4.5
click==8.3.1
colorama==0.4.6
cryptography==46.0.5
eval-type-backport==0.3.1
exceptiongroup==1.3.1
googleapis-common-protos==1.73.0
griffe==1.15.0
h11==0.16.0
httpcore==1.0.9
httpx==0.28.1
httpx-sse==0.4.3
idna==3.11
importlib-metadata==8.7.1
invoke==2.2.1
jsonschema==4.26.0
jsonschema-specifications==2025.9.1
mcp==1.26.0
mistralai==1.12.4
opentelemetry-api==1.40.0
opentelemetry-exporter-otlp-proto-common==1.40.0
opentelemetry-exporter-otlp-proto-http==1.40.0
opentelemetry-proto==1.40.0
opentelemetry-sdk==1.40.0
opentelemetry-semantic-conventions==0.61b0
polars==1.38.1
polars-runtime-32==1.38.1
protobuf==6.33.5
pycparser==3.0
pydantic==2.12.5
pydantic-core==2.41.5
pydantic-settings==2.13.1
pyjwt==2.11.0
python-dateutil==2.9.0.post0
python-dotenv==1.2.2
python-multipart==0.0.22
pyyaml==6.0.3
referencing==0.37.0
requests==2.32.5
rpds-py==0.30.0
six==1.17.0
sse-starlette==3.3.2
starlette==0.52.1
typing-extensions==4.15.0
typing-inspection==0.4.2
urllib3==2.6.3
uvicorn==0.41.0
zipp==3.23.0

Reproduction Steps

Setting the response type to json or json-format in the UI for an agent and then calling it using the API via client.beta.conversations.start() leads to

raise models.SDKError("API error occurred", http_res, http_res_text)
mistralai.models.sdkerror.SDKError: API error occurred: Status 500. Body: {"object":"Error","message":"Failed to persist entries.","type":"invalid_request_error","code":3000}

Expected Behavior

As this works in the UI, I would have expected it to work in the API as well?

Additional Context

No response

Suggested Solutions

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions