Change8

v2.3.0

Breaking Changes
📦 mistral-clientView on GitHub →
19 breaking🐛 1 fixes🔧 56 symbols

Summary

This release introduces significant breaking changes across many API endpoints, primarily affecting request/response structures for models, chat, agents, workflows, and observability features. Additionally, many observability endpoints now consistently report error codes.

⚠️ Breaking Changes

  • `mistral.models.list()`: The structure of `response.data[].union(fine-tuned).job` has changed. Review response handling.
  • `mistral.models.retrieve()`: The structure of `response.union(fine-tuned).job` has changed. Review response handling.
  • `mistral.chat.complete()`: The structure of the `request` object has changed. Update request payload construction.
  • `mistral.chat.complete()`: The structure of `response.choices[].message.tool_calls[].type` has changed. Update tool call type handling.
  • `mistral.chat.stream()`: The structure of the `request` object has changed. Update request payload construction.
  • `mistral.chat.stream()`: The structure of `response.[].data.choices[].delta.tool_calls[].type` has changed. Update streamed tool call type handling.
  • `mistral.fim.complete()`: The structure of `response.choices[].message.tool_calls[].type` has changed. Update tool call type handling.
  • `mistral.fim.stream()`: The structure of `response.[].data.choices[].delta.tool_calls[].type` has changed. Update streamed tool call type handling.
  • `mistral.workflows.get_workflow_registration()`: The structure of `response.workflow_registration` has changed. Review response handling.
  • `mistral.workflows.execute_workflow_registration()`: The structure of `request.input` has changed. Update input payload construction.
  • `mistral.workflows.execute_workflow()`: The structure of `request.input` has changed. Update input payload construction.
  • `mistral.workflows.get_workflow_registrations()`: The structure of `response.workflow_registrations[]` has changed. Review response handling.
  • `mistral.classifiers.classify_chat()`: The structure of `request.input.union(InstructRequest).messages[].union(assistant).tool_calls[].type` has changed. Update request payload construction.
  • `mistral.classifiers.moderate_chat()`: The structure of `request.inputs.union(Array<>)[].union(assistant).tool_calls[].type` has changed. Update request payload construction.
  • `mistral.agents.stream()`: The structure of the `request` object has changed. Update request payload construction.
  • `mistral.agents.stream()`: The structure of `response.[].data.choices[].delta.tool_calls[].type` has changed. Update streamed tool call type handling.
  • `mistral.agents.complete()`: The structure of the `request` object has changed. Update request payload construction.
  • `mistral.agents.complete()`: The structure of `response.choices[].message.tool_calls[].type` has changed. Update tool call type handling.
  • `mistral.workflows.workers.whoami()`: This endpoint has been removed.

Migration Steps

  1. Review and update logic consuming responses from `mistral.models.list()` and `mistral.models.retrieve()` due to changes in the job structure.
  2. Review and update request payloads for `mistral.chat.complete()`, `mistral.chat.stream()`, `mistral.agents.complete()`, and `mistral.agents.stream()`.
  3. Update logic handling tool calls in chat, FIM, and agent completions/streams, as the structure of `tool_calls[].type` has changed.
  4. Review and update input payloads for workflow execution methods (`mistral.workflows.execute_workflow_registration()` and `mistral.workflows.execute_workflow()`).
  5. Update logic consuming responses from workflow registration methods (`mistral.workflows.get_workflow_registration()` and `mistral.workflows.get_workflow_registrations()`).
  6. Update request payloads for classification methods (`mistral.classifiers.classify_chat()` and `mistral.classifiers.moderate_chat()`) concerning tool call structures.
  7. Remove calls to the removed endpoint `mistral.workflows.workers.whoami()`.

🐛 Bug Fixes

  • Various endpoints across `mistral.beta.observability` now return a standardized `error.detail.error_code` field upon failure, improving error handling consistency.

Affected Symbols

mistral.models.listmistral.models.retrievemistral.chat.completemistral.chat.streammistral.fim.completemistral.fim.streammistral.workflows.get_workflow_registrationmistral.workflows.execute_workflow_registrationmistral.workflows.execute_workflowmistral.workflows.get_workflow_registrationsmistral.classifiers.classify_chatmistral.classifiers.moderate_chatmistral.agents.streammistral.agents.completemistral.beta.observability.datasets.listmistral.beta.observability.datasets.import_from_explorermistral.beta.observability.judges.listmistral.beta.observability.judges.fetchmistral.beta.observability.judges.deletemistral.beta.observability.judges.updatemistral.beta.observability.judges.judge_conversationmistral.beta.observability.campaigns.createmistral.beta.observability.campaigns.listmistral.beta.observability.campaigns.fetchmistral.beta.observability.campaigns.deletemistral.beta.observability.campaigns.fetch_statusmistral.beta.observability.campaigns.list_eventsmistral.beta.observability.datasets.createmistral.beta.observability.chat_completion_events.fields.fetch_option_countsmistral.beta.observability.datasets.fetchmistral.beta.observability.datasets.deletemistral.beta.observability.datasets.updatemistral.beta.observability.datasets.list_recordsmistral.beta.observability.datasets.create_recordmistral.beta.observability.datasets.import_from_campaignmistral.beta.observability.judges.createmistral.beta.observability.datasets.import_from_filemistral.beta.observability.datasets.import_from_playgroundmistral.beta.observability.datasets.import_from_dataset_recordsmistral.beta.observability.datasets.export_to_jsonlmistral.beta.observability.datasets.fetch_taskmistral.beta.observability.datasets.list_tasksmistral.beta.observability.datasets.records.fetchmistral.beta.observability.datasets.records.deletemistral.beta.observability.chat_completion_events.fields.fetch_optionsmistral.beta.observability.chat_completion_events.fields.listmistral.beta.observability.chat_completion_events.judgemistral.beta.observability.chat_completion_events.fetch_similar_eventsmistral.beta.observability.chat_completion_events.fetchmistral.beta.observability.chat_completion_events.search_idsmistral.beta.observability.chat_completion_events.searchmistral.workflows.workers.whoamimistral.beta.observability.datasets.records.bulk_deletemistral.beta.observability.datasets.records.judgemistral.beta.observability.datasets.records.update_payloadmistral.beta.observability.datasets.records.update_properties