From 07ba6026ace1b93fac922c247937faa7a9668a5d Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Thu, 2 Apr 2026 11:22:57 +0000 Subject: [PATCH 1/3] =?UTF-8?q?##=20Python=20SDK=20Changes:=20*=20`mistral?= =?UTF-8?q?.models.list()`:=20=20`response.data[].union(fine-tuned).job`?= =?UTF-8?q?=20**Changed**=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20*=20`mistral?= =?UTF-8?q?.models.retrieve()`:=20=20`response.union(fine-tuned).job`=20**?= =?UTF-8?q?Changed**=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20*=20`mistral.work?= =?UTF-8?q?flows.execute=5Fworkflow()`:=20=20`request.input`=20**Changed**?= =?UTF-8?q?=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20*=20`mistral.workflows.exe?= =?UTF-8?q?cute=5Fworkflow=5Fregistration()`:=20=20`request.input`=20**Cha?= =?UTF-8?q?nged**=20(Breaking=20=E2=9A=A0=EF=B8=8F)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .speakeasy/gen.lock | 62 ++++++++++--------- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 10 +-- RELEASES.md | 12 +++- .../filesapiroutesgetsignedurlrequest.md | 8 +-- docs/models/ftmodelcard.md | 2 +- docs/models/workflowexecutionrequest.md | 2 +- docs/sdks/files/README.md | 10 +-- docs/sdks/workflows/README.md | 4 +- src/mistralai/client/_version.py | 4 +- src/mistralai/client/files.py | 4 +- .../files_api_routes_get_signed_urlop.py | 4 +- src/mistralai/client/models/ftmodelcard.py | 8 +-- .../client/models/workflowexecutionrequest.py | 8 +-- src/mistralai/client/workflows.py | 16 ++--- 15 files changed, 85 insertions(+), 71 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index cd97e129..69cd445a 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: 2d045ec7-2ebb-4f4d-ad25-40953b132161 management: - docChecksum: 42ee0bdf8fcf0fa3ee261db644fe8154 + docChecksum: ca92565d67c579eda596d4768aa274ee docVersion: 1.0.0 speakeasyVersion: 1.754.0 generationVersion: 2.862.0 - releaseVersion: 2.2.0 - configChecksum: ed5cc4cf5a87eaacbf1b77366abd2467 + releaseVersion: 2.2.1 + configChecksum: d39c00303cffb2a9684327475a8b6933 repoURL: https://github.com/mistralai/client-python.git installationURL: https://github.com/mistralai/client-python.git published: true persistentEdits: - generation_id: 6b0c3b1d-b7b3-4318-b2a1-5d44dd7fa3ac - pristine_commit_hash: 2e766581e0b9c6c42cbd61b500b0b6469a27a175 - pristine_tree_hash: ded10775e62be5fb057ebf7819d56da121f02829 + generation_id: 44c0fd0f-6361-4dd9-b0f3-9855618afb6c + pristine_commit_hash: c890bb8f577639d77cf541bea1d42425e8cd7893 + pristine_tree_hash: e541213934a48fc3aacc79a9d10f9d1c000670c3 features: python: acceptHeaders: 3.0.0 @@ -1147,8 +1147,8 @@ trackedFiles: pristine_git_object: 8b28cb0e5c60ac9676656624eb3c2c6fdc8a3e88 docs/models/filesapiroutesgetsignedurlrequest.md: id: 08f3772db370 - last_write_checksum: sha1:26aa0140444ccef7307ef6f236932032e4784e8f - pristine_git_object: dbe3c801003c7bb8616f0c5be2dac2ab1e7e9fb1 + last_write_checksum: sha1:7d1577169ca1d22b3088ab1157cb49192515e6f3 + pristine_git_object: 794f25f78338baae371ebd7c653ceba2d280fdfe docs/models/filesapirouteslistfilesrequest.md: id: 04bdf7c654bd last_write_checksum: sha1:0a99755150c2ded8e5d59a96527021d29326b980 @@ -1223,8 +1223,8 @@ trackedFiles: pristine_git_object: 36d3db18679569d21e6bacfe13bcd22715372297 docs/models/ftmodelcard.md: id: 15ed6f94deea - last_write_checksum: sha1:8e1383e26d86fd247fa1762dbb0508ceed932a49 - pristine_git_object: 0381dd81d0460af3aacdf81a495c304ed9b78451 + last_write_checksum: sha1:5873780bc2a828f1164818eb9c64c3f69c6618cc + pristine_git_object: f65ff6e888a460ac5f3ad3a4556ccdd8366960c0 docs/models/function.md: id: 416a80fba031 last_write_checksum: sha1:a9485076d430a7753558461ce87bf42d09e34511 @@ -2911,8 +2911,8 @@ trackedFiles: pristine_git_object: ac50a894e5290f07d8531e25663baae090cf533e docs/models/workflowexecutionrequest.md: id: 44a6d9ef046a - last_write_checksum: sha1:78e3aeb9a9b13ab01906e9c2d423ac4925332dc4 - pristine_git_object: 553119b16dbc695eff102eae11e80c4426612e01 + last_write_checksum: sha1:fafbe0ccef730faa8a1689ff7525fb439e77dc48 + pristine_git_object: 54f61ea35422b37fa529e0602a338e0248c05f39 docs/models/workflowexecutionresponse.md: id: 73595cfc443f last_write_checksum: sha1:3861cb1972cca17c595d1eb23518bfa54c382e89 @@ -3115,8 +3115,8 @@ trackedFiles: pristine_git_object: 3c8424419bae5c7e6e47b4cb23e35064531a8345 docs/sdks/files/README.md: id: e576d7a117f0 - last_write_checksum: sha1:7022f6e63afea7c7988b251351d18361fd1b5e4a - pristine_git_object: 7db76611c5788e2a0440f7c95d07928851e37d6a + last_write_checksum: sha1:45265e774720742cde1c76c8be294983bf4fc77a + pristine_git_object: 246707073e9dee115d30b20a01bf728dcb43efd7 docs/sdks/fim/README.md: id: 499b227bf6ca last_write_checksum: sha1:5b2ce811df8d867d14fe0126f2c9619cca779f56 @@ -3175,8 +3175,8 @@ trackedFiles: pristine_git_object: 5e2380d1d15afd204e20d0a16adc84f30e91e041 docs/sdks/workflows/README.md: id: 80c76ce944c0 - last_write_checksum: sha1:572ef0ec9cadcd850e3966dad909a3d2e901280a - pristine_git_object: e65383ca453849b3bab58f921f80f5b8e7df7839 + last_write_checksum: sha1:af6d1ec6698a8d58a743d67e897910038bed299a + pristine_git_object: 324c46b14e6d1bebbfe9dda2458201cb799d67d1 docs/sdks/workflowsevents/README.md: id: 514b42269280 last_write_checksum: sha1:34971ab6eef89b115d78375a85142f3d2612f431 @@ -3207,8 +3207,8 @@ trackedFiles: pristine_git_object: 036d44b8cfc51599873bd5c401a6aed30450536c src/mistralai/client/_version.py: id: cc807b30de19 - last_write_checksum: sha1:e0d4cdfdf25c401429c0e9beb40be8846cb2a235 - pristine_git_object: 0473419e2e46dbf2e975a7fdcc5355d056752cdf + last_write_checksum: sha1:9933fec60d6cb6e1a41cbea658b9220b7a550b03 + pristine_git_object: 0028cefab4f4c1f7642d94aac383cb729b3bb037 src/mistralai/client/accesses.py: id: 76fc53bfcf59 last_write_checksum: sha1:4b1cf5d760f690d35582f9037df44c97c11e7e14 @@ -3323,8 +3323,8 @@ trackedFiles: pristine_git_object: a5b8003ca5fc766a7db89d6c95b9d0e42952af86 src/mistralai/client/files.py: id: f12df4b2ce43 - last_write_checksum: sha1:e60cfc2841ef8888a6a52479adf76ec32ecae6ac - pristine_git_object: a843cb7b2b1b55ba20093c4d43faddb972d8f645 + last_write_checksum: sha1:5599644b2c6b489365aa648fb2fb75630d2cd3e7 + pristine_git_object: 453c97c7ca5a0a02648b7848062a71a9176b7289 src/mistralai/client/fim.py: id: 217bea5d701d last_write_checksum: sha1:dc427c9e954dfb9a7fe2df8b5c544877a28cdc73 @@ -4159,8 +4159,8 @@ trackedFiles: pristine_git_object: 83de8e73a3d50917e4a41bb92a828a10e646a632 src/mistralai/client/models/files_api_routes_get_signed_urlop.py: id: 0a1a18c6431e - last_write_checksum: sha1:4cf67e8cafa1f448caf9b251dd9db3e9c87d062e - pristine_git_object: 326dd1d305261acc1407e6f70100b3b59dfcee5c + last_write_checksum: sha1:46c5a0babdc6df693c03355f22131ff8d847389c + pristine_git_object: c381244b5d819e48ca7d1ad5064726fd6627cfd1 src/mistralai/client/models/files_api_routes_list_filesop.py: id: b2e92f2a29b4 last_write_checksum: sha1:18f318488f01a9a919c8650ee1f5eb825c39c91d @@ -4219,8 +4219,8 @@ trackedFiles: pristine_git_object: ccb0f21b5a69f91119bec9db6e9f3d876e4c35af src/mistralai/client/models/ftmodelcard.py: id: c4f15eed2ca2 - last_write_checksum: sha1:4382bdc5744ed2199c0aefcf32d8d9e0d02c42f4 - pristine_git_object: 922667b0f7726824d0de4b18eac2ff86b271bccb + last_write_checksum: sha1:1c3ab1bda3fa9e2df33b47a49d5e9b9e2d82a701 + pristine_git_object: bb7c52c881ceadccdeb3590104e774f3d2ad94d7 src/mistralai/client/models/function.py: id: 32275a9d8fee last_write_checksum: sha1:c01c1ed54b3086859cde0dd3c3c466c78d8323ae @@ -5607,8 +5607,8 @@ trackedFiles: pristine_git_object: ffebdb82a1a80d1d086b919da9b33e2f090388c4 src/mistralai/client/models/workflowexecutionrequest.py: id: 806340497ed4 - last_write_checksum: sha1:43851e98d4c14ebdda88c5ab4412ae3a7a1d0002 - pristine_git_object: bf6a5fa0cddf979efb8ad32df77affac7f7156e8 + last_write_checksum: sha1:5270ee18d5eef0a52762ade3d207a8bbaa154f72 + pristine_git_object: 615276d30bf6131df5415a9d1d0476a0a3e16521 src/mistralai/client/models/workflowexecutionresponse.py: id: 758786637be5 last_write_checksum: sha1:2544bf94e8d64a9bd33f37ff4737f320fcd84733 @@ -5875,8 +5875,8 @@ trackedFiles: pristine_git_object: e2d41c70ecaeec1439ff9398b79de2af7eca54f1 src/mistralai/client/workflows.py: id: e2a0381191f6 - last_write_checksum: sha1:df0555b350409d103ca9715c69fab2e061d7ea41 - pristine_git_object: aae12f774608d18baf1bf5ccedd1a39363c0c29d + last_write_checksum: sha1:f56be67463a25534614bca548cf61f650102b96d + pristine_git_object: a7620575e1c4fe0348b978a0479db1128f3eb5e4 src/mistralai/client/workflows_events.py: id: 6d4f674ce8ef last_write_checksum: sha1:ee029cad739604429d7cff743f2a469cd3cd4076 @@ -8295,6 +8295,12 @@ examples: application/json: {"scheduler_url": "https://closed-passport.info/", "namespace": "", "tls": false} examplesVersion: 1.0.2 generatedTests: {} +releaseNotes: | + ## Python SDK Changes: + * `mistral.models.list()`: `response.data[].union(fine-tuned).job` **Changed** (Breaking ⚠️) + * `mistral.models.retrieve()`: `response.union(fine-tuned).job` **Changed** (Breaking ⚠️) + * `mistral.workflows.execute_workflow()`: `request.input` **Changed** (Breaking ⚠️) + * `mistral.workflows.execute_workflow_registration()`: `request.input` **Changed** (Breaking ⚠️) generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 0c50d415..a408c9c4 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -32,7 +32,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 2.2.0 + version: 2.2.1 additionalDependencies: dev: pytest: ^8.2.2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index fff0c8c6..74b46a9b 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -16,8 +16,8 @@ sources: - speakeasy-sdk-regen-1773084660 mistral-openapi: sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:8a9e51d8532d887897d3335b416422973f6d1adb687a88dc288bfb51e1fdacdf - sourceBlobDigest: sha256:ad19d950e5564f613ce71b9b0b98eadf76609f0ff96db0e083b20c8190c718e3 + sourceRevisionDigest: sha256:33b0a88a4ed60c13f13450859d491eb6ee8ff97224d70b89ec8b372cf06243f8 + sourceBlobDigest: sha256:67f2d1c77cbace813cfd1134b6b1f07d09b0dca9bed9a1802b70a497bab79dab tags: - latest targets: @@ -38,10 +38,10 @@ targets: mistralai-sdk: source: mistral-openapi sourceNamespace: mistral-openapi - sourceRevisionDigest: sha256:8a9e51d8532d887897d3335b416422973f6d1adb687a88dc288bfb51e1fdacdf - sourceBlobDigest: sha256:ad19d950e5564f613ce71b9b0b98eadf76609f0ff96db0e083b20c8190c718e3 + sourceRevisionDigest: sha256:33b0a88a4ed60c13f13450859d491eb6ee8ff97224d70b89ec8b372cf06243f8 + sourceBlobDigest: sha256:67f2d1c77cbace813cfd1134b6b1f07d09b0dca9bed9a1802b70a497bab79dab codeSamplesNamespace: mistral-openapi-code-samples - codeSamplesRevisionDigest: sha256:87ec31b36ce736c3f60cce2c11b8192bb5617b5ce9d881aadc0cf4a86563173c + codeSamplesRevisionDigest: sha256:0819d7de77108ec62624497a6454867ddbb9cf0dbdee9e46759ba73611cbaec4 workflow: workflowVersion: 1.0.0 speakeasyVersion: 1.754.0 diff --git a/RELEASES.md b/RELEASES.md index 852ddced..25ce3faa 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -528,4 +528,14 @@ Based on: ### Generated - [python v2.2.0] . ### Releases -- [PyPI v2.2.0] https://pypi.org/project/mistralai/2.2.0 - . \ No newline at end of file +- [PyPI v2.2.0] https://pypi.org/project/mistralai/2.2.0 - . + +## 2026-04-02 11:20:15 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.754.0 (2.862.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v2.2.1] . +### Releases +- [PyPI v2.2.1] https://pypi.org/project/mistralai/2.2.1 - . \ No newline at end of file diff --git a/docs/models/filesapiroutesgetsignedurlrequest.md b/docs/models/filesapiroutesgetsignedurlrequest.md index dbe3c801..794f25f7 100644 --- a/docs/models/filesapiroutesgetsignedurlrequest.md +++ b/docs/models/filesapiroutesgetsignedurlrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| `file_id` | *str* | :heavy_check_mark: | N/A | -| `expiry` | *Optional[int]* | :heavy_minus_sign: | Number of hours before the url becomes invalid. Defaults to 24h | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `file_id` | *str* | :heavy_check_mark: | N/A | +| `expiry` | *Optional[int]* | :heavy_minus_sign: | Number of hours before the URL becomes invalid. Defaults to 24h. Must be between 1h and 168h. | \ No newline at end of file diff --git a/docs/models/ftmodelcard.md b/docs/models/ftmodelcard.md index 0381dd81..f65ff6e8 100644 --- a/docs/models/ftmodelcard.md +++ b/docs/models/ftmodelcard.md @@ -20,6 +20,6 @@ Extra fields for fine-tuned models. | `deprecation_replacement_model` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | | `default_model_temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | | `type` | *Literal["fine-tuned"]* | :heavy_check_mark: | N/A | -| `job` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `job` | *str* | :heavy_check_mark: | N/A | | `root` | *str* | :heavy_check_mark: | N/A | | `archived` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/workflowexecutionrequest.md b/docs/models/workflowexecutionrequest.md index 553119b1..54f61ea3 100644 --- a/docs/models/workflowexecutionrequest.md +++ b/docs/models/workflowexecutionrequest.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `execution_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Allows you to specify a custom execution ID. If not provided, a random ID will be generated. | -| `input` | Dict[str, *Any*] | :heavy_minus_sign: | The input to the workflow. This should be a dictionary that matches the workflow's input schema. | +| `input` | *OptionalNullable[Any]* | :heavy_minus_sign: | The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. | | `encoded_input` | [OptionalNullable[models.NetworkEncodedInput]](../models/networkencodedinput.md) | :heavy_minus_sign: | Encoded input to the workflow, used when payload encoding is enabled. | | `wait_for_result` | *Optional[bool]* | :heavy_minus_sign: | If true, wait for the workflow to complete and return the result directly. | | `timeout_seconds` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum time to wait for completion when wait_for_result is true. | diff --git a/docs/sdks/files/README.md b/docs/sdks/files/README.md index bceebdf8..d0e88f2e 100644 --- a/docs/sdks/files/README.md +++ b/docs/sdks/files/README.md @@ -255,11 +255,11 @@ with Mistral( ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `file_id` | *str* | :heavy_check_mark: | N/A | -| `expiry` | *Optional[int]* | :heavy_minus_sign: | Number of hours before the url becomes invalid. Defaults to 24h | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `file_id` | *str* | :heavy_check_mark: | N/A | +| `expiry` | *Optional[int]* | :heavy_minus_sign: | Number of hours before the URL becomes invalid. Defaults to 24h. Must be between 1h and 168h. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/docs/sdks/workflows/README.md b/docs/sdks/workflows/README.md index e65383ca..324c46b1 100644 --- a/docs/sdks/workflows/README.md +++ b/docs/sdks/workflows/README.md @@ -141,7 +141,7 @@ with Mistral( | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `workflow_identifier` | *str* | :heavy_check_mark: | N/A | | `execution_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Allows you to specify a custom execution ID. If not provided, a random ID will be generated. | -| `input` | Dict[str, *Any*] | :heavy_minus_sign: | The input to the workflow. This should be a dictionary that matches the workflow's input schema. | +| `input` | *OptionalNullable[Any]* | :heavy_minus_sign: | The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. | | `encoded_input` | [OptionalNullable[models.NetworkEncodedInput]](../../models/networkencodedinput.md) | :heavy_minus_sign: | Encoded input to the workflow, used when payload encoding is enabled. | | `wait_for_result` | *Optional[bool]* | :heavy_minus_sign: | If true, wait for the workflow to complete and return the result directly. | | `timeout_seconds` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum time to wait for completion when wait_for_result is true. | @@ -192,7 +192,7 @@ with Mistral( | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `workflow_registration_id` | *str* | :heavy_check_mark: | N/A | | `execution_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Allows you to specify a custom execution ID. If not provided, a random ID will be generated. | -| `input` | Dict[str, *Any*] | :heavy_minus_sign: | The input to the workflow. This should be a dictionary that matches the workflow's input schema. | +| `input` | *OptionalNullable[Any]* | :heavy_minus_sign: | The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. | | `encoded_input` | [OptionalNullable[models.NetworkEncodedInput]](../../models/networkencodedinput.md) | :heavy_minus_sign: | Encoded input to the workflow, used when payload encoding is enabled. | | `wait_for_result` | *Optional[bool]* | :heavy_minus_sign: | If true, wait for the workflow to complete and return the result directly. | | `timeout_seconds` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum time to wait for completion when wait_for_result is true. | diff --git a/src/mistralai/client/_version.py b/src/mistralai/client/_version.py index 0473419e..0028cefa 100644 --- a/src/mistralai/client/_version.py +++ b/src/mistralai/client/_version.py @@ -4,10 +4,10 @@ import importlib.metadata __title__: str = "mistralai" -__version__: str = "2.2.0" +__version__: str = "2.2.1" __openapi_doc_version__: str = "1.0.0" __gen_version__: str = "2.862.0" -__user_agent__: str = "speakeasy-sdk/python 2.2.0 2.862.0 1.0.0 mistralai" +__user_agent__: str = "speakeasy-sdk/python 2.2.1 2.862.0 1.0.0 mistralai" try: if __package__ is not None: diff --git a/src/mistralai/client/files.py b/src/mistralai/client/files.py index a843cb7b..453c97c7 100644 --- a/src/mistralai/client/files.py +++ b/src/mistralai/client/files.py @@ -965,7 +965,7 @@ def get_signed_url( r"""Get Signed Url :param file_id: - :param expiry: Number of hours before the url becomes invalid. Defaults to 24h + :param expiry: Number of hours before the URL becomes invalid. Defaults to 24h. Must be between 1h and 168h. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds @@ -1050,7 +1050,7 @@ async def get_signed_url_async( r"""Get Signed Url :param file_id: - :param expiry: Number of hours before the url becomes invalid. Defaults to 24h + :param expiry: Number of hours before the URL becomes invalid. Defaults to 24h. Must be between 1h and 168h. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds diff --git a/src/mistralai/client/models/files_api_routes_get_signed_urlop.py b/src/mistralai/client/models/files_api_routes_get_signed_urlop.py index 326dd1d3..c381244b 100644 --- a/src/mistralai/client/models/files_api_routes_get_signed_urlop.py +++ b/src/mistralai/client/models/files_api_routes_get_signed_urlop.py @@ -12,7 +12,7 @@ class FilesAPIRoutesGetSignedURLRequestTypedDict(TypedDict): file_id: str expiry: NotRequired[int] - r"""Number of hours before the url becomes invalid. Defaults to 24h""" + r"""Number of hours before the URL becomes invalid. Defaults to 24h. Must be between 1h and 168h.""" class FilesAPIRoutesGetSignedURLRequest(BaseModel): @@ -24,7 +24,7 @@ class FilesAPIRoutesGetSignedURLRequest(BaseModel): Optional[int], FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), ] = 24 - r"""Number of hours before the url becomes invalid. Defaults to 24h""" + r"""Number of hours before the URL becomes invalid. Defaults to 24h. Must be between 1h and 168h.""" @model_serializer(mode="wrap") def serialize_model(self, handler): diff --git a/src/mistralai/client/models/ftmodelcard.py b/src/mistralai/client/models/ftmodelcard.py index 922667b0..bb7c52c8 100644 --- a/src/mistralai/client/models/ftmodelcard.py +++ b/src/mistralai/client/models/ftmodelcard.py @@ -27,6 +27,7 @@ class FTModelCardTypedDict(TypedDict): r"""This is populated by Harmattan, but some fields have a name that we don't want to expose in the API. """ + job: str root: str object: NotRequired[str] created: NotRequired[int] @@ -39,7 +40,6 @@ class FTModelCardTypedDict(TypedDict): deprecation_replacement_model: NotRequired[Nullable[str]] default_model_temperature: NotRequired[Nullable[float]] type: Literal["fine-tuned"] - job: NotRequired[Nullable[str]] archived: NotRequired[bool] @@ -53,6 +53,8 @@ class FTModelCard(BaseModel): that we don't want to expose in the API. """ + job: str + root: str object: Optional[str] = "model" @@ -80,8 +82,6 @@ class FTModelCard(BaseModel): pydantic.Field(alias="type"), ] = "fine-tuned" - job: OptionalNullable[str] = UNSET - archived: Optional[bool] = False @model_serializer(mode="wrap") @@ -98,7 +98,6 @@ def serialize_model(self, handler): "deprecation", "deprecation_replacement_model", "default_model_temperature", - "job", "archived", ] ) @@ -109,7 +108,6 @@ def serialize_model(self, handler): "deprecation", "deprecation_replacement_model", "default_model_temperature", - "job", ] ) serialized = handler(self) diff --git a/src/mistralai/client/models/workflowexecutionrequest.py b/src/mistralai/client/models/workflowexecutionrequest.py index bf6a5fa0..615276d3 100644 --- a/src/mistralai/client/models/workflowexecutionrequest.py +++ b/src/mistralai/client/models/workflowexecutionrequest.py @@ -19,8 +19,8 @@ class WorkflowExecutionRequestTypedDict(TypedDict): execution_id: NotRequired[Nullable[str]] r"""Allows you to specify a custom execution ID. If not provided, a random ID will be generated.""" - input: NotRequired[Nullable[Dict[str, Any]]] - r"""The input to the workflow. This should be a dictionary that matches the workflow's input schema.""" + input: NotRequired[Nullable[Any]] + r"""The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema.""" encoded_input: NotRequired[Nullable[NetworkEncodedInputTypedDict]] r"""Encoded input to the workflow, used when payload encoding is enabled.""" wait_for_result: NotRequired[bool] @@ -38,8 +38,8 @@ class WorkflowExecutionRequest(BaseModel): execution_id: OptionalNullable[str] = UNSET r"""Allows you to specify a custom execution ID. If not provided, a random ID will be generated.""" - input: OptionalNullable[Dict[str, Any]] = UNSET - r"""The input to the workflow. This should be a dictionary that matches the workflow's input schema.""" + input: OptionalNullable[Any] = UNSET + r"""The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema.""" encoded_input: OptionalNullable[NetworkEncodedInput] = UNSET r"""Encoded input to the workflow, used when payload encoding is enabled.""" diff --git a/src/mistralai/client/workflows.py b/src/mistralai/client/workflows.py index aae12f77..a7620575 100644 --- a/src/mistralai/client/workflows.py +++ b/src/mistralai/client/workflows.py @@ -766,7 +766,7 @@ def execute_workflow( *, workflow_identifier: str, execution_id: OptionalNullable[str] = UNSET, - input: OptionalNullable[Dict[str, Any]] = UNSET, + input: OptionalNullable[Any] = UNSET, encoded_input: OptionalNullable[ Union[models.NetworkEncodedInput, models.NetworkEncodedInputTypedDict] ] = UNSET, @@ -784,7 +784,7 @@ def execute_workflow( :param workflow_identifier: :param execution_id: Allows you to specify a custom execution ID. If not provided, a random ID will be generated. - :param input: The input to the workflow. This should be a dictionary that matches the workflow's input schema. + :param input: The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. :param encoded_input: Encoded input to the workflow, used when payload encoding is enabled. :param wait_for_result: If true, wait for the workflow to complete and return the result directly. :param timeout_seconds: Maximum time to wait for completion when wait_for_result is true. @@ -894,7 +894,7 @@ async def execute_workflow_async( *, workflow_identifier: str, execution_id: OptionalNullable[str] = UNSET, - input: OptionalNullable[Dict[str, Any]] = UNSET, + input: OptionalNullable[Any] = UNSET, encoded_input: OptionalNullable[ Union[models.NetworkEncodedInput, models.NetworkEncodedInputTypedDict] ] = UNSET, @@ -912,7 +912,7 @@ async def execute_workflow_async( :param workflow_identifier: :param execution_id: Allows you to specify a custom execution ID. If not provided, a random ID will be generated. - :param input: The input to the workflow. This should be a dictionary that matches the workflow's input schema. + :param input: The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. :param encoded_input: Encoded input to the workflow, used when payload encoding is enabled. :param wait_for_result: If true, wait for the workflow to complete and return the result directly. :param timeout_seconds: Maximum time to wait for completion when wait_for_result is true. @@ -1025,7 +1025,7 @@ def execute_workflow_registration( *, workflow_registration_id: str, execution_id: OptionalNullable[str] = UNSET, - input: OptionalNullable[Dict[str, Any]] = UNSET, + input: OptionalNullable[Any] = UNSET, encoded_input: OptionalNullable[ Union[models.NetworkEncodedInput, models.NetworkEncodedInputTypedDict] ] = UNSET, @@ -1043,7 +1043,7 @@ def execute_workflow_registration( :param workflow_registration_id: :param execution_id: Allows you to specify a custom execution ID. If not provided, a random ID will be generated. - :param input: The input to the workflow. This should be a dictionary that matches the workflow's input schema. + :param input: The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. :param encoded_input: Encoded input to the workflow, used when payload encoding is enabled. :param wait_for_result: If true, wait for the workflow to complete and return the result directly. :param timeout_seconds: Maximum time to wait for completion when wait_for_result is true. @@ -1156,7 +1156,7 @@ async def execute_workflow_registration_async( *, workflow_registration_id: str, execution_id: OptionalNullable[str] = UNSET, - input: OptionalNullable[Dict[str, Any]] = UNSET, + input: OptionalNullable[Any] = UNSET, encoded_input: OptionalNullable[ Union[models.NetworkEncodedInput, models.NetworkEncodedInputTypedDict] ] = UNSET, @@ -1174,7 +1174,7 @@ async def execute_workflow_registration_async( :param workflow_registration_id: :param execution_id: Allows you to specify a custom execution ID. If not provided, a random ID will be generated. - :param input: The input to the workflow. This should be a dictionary that matches the workflow's input schema. + :param input: The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. :param encoded_input: Encoded input to the workflow, used when payload encoding is enabled. :param wait_for_result: If true, wait for the workflow to complete and return the result directly. :param timeout_seconds: Maximum time to wait for completion when wait_for_result is true. From 712ca17dff637c308616162f5fc3ba2733d5c02e Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 2 Apr 2026 11:23:31 +0000 Subject: [PATCH 2/3] chore: align pyproject.toml and uv.lock to version 2.2.1 --- pyproject.toml | 2 +- uv.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 54d2b372..83af6e8b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mistralai" -version = "2.2.0" +version = "2.2.1" description = "Python Client SDK for the Mistral AI API." authors = [{ name = "Mistral" }] requires-python = ">=3.10" diff --git a/uv.lock b/uv.lock index ae8cabb5..8b5c0cfe 100644 --- a/uv.lock +++ b/uv.lock @@ -560,7 +560,7 @@ wheels = [ [[package]] name = "mistralai" -version = "2.2.0" +version = "2.2.1" source = { editable = "." } dependencies = [ { name = "eval-type-backport" }, From 46e04d77eb9a8813774e3bb8c6114fcc46cf49a4 Mon Sep 17 00:00:00 2001 From: Antoine Hoorelbeke Date: Thu, 2 Apr 2026 14:02:26 +0200 Subject: [PATCH 3/3] custom code: change type hinting execute_workflow_and_wait to handle pydantic BaseModel --- src/mistralai/client/workflows.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/mistralai/client/workflows.py b/src/mistralai/client/workflows.py index a7620575..27e6c4cd 100644 --- a/src/mistralai/client/workflows.py +++ b/src/mistralai/client/workflows.py @@ -21,6 +21,7 @@ # region imports import asyncio +from pydantic import BaseModel import time # endregion imports @@ -58,7 +59,7 @@ def _init_sdks(self): def execute_workflow_and_wait( self, workflow_identifier: str, - input: OptionalNullable[Dict[str, Any]] = UNSET, + input: OptionalNullable[Dict[str, Any] | BaseModel] = UNSET, execution_id: OptionalNullable[str] = UNSET, deployment_name: OptionalNullable[str] = UNSET, custom_tracing_attributes: OptionalNullable[Dict[str, str]] = UNSET, @@ -71,7 +72,7 @@ def execute_workflow_and_wait( Args: workflow_identifier: The workflow name or ID. - input: Input parameters for the workflow + input: The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. execution_id: Optional custom execution ID deployment_name: Name of the deployment to route this execution to custom_tracing_attributes: Custom tracing attributes @@ -155,7 +156,7 @@ def wait_for_workflow_completion( async def execute_workflow_and_wait_async( self, workflow_identifier: str, - input: OptionalNullable[Dict[str, Any]] = UNSET, + input: OptionalNullable[Dict[str, Any] | BaseModel] = UNSET, execution_id: OptionalNullable[str] = UNSET, deployment_name: OptionalNullable[str] = UNSET, custom_tracing_attributes: OptionalNullable[Dict[str, str]] = UNSET, @@ -168,7 +169,7 @@ async def execute_workflow_and_wait_async( Args: workflow_identifier: The workflow name or ID. - input: Input parameters for the workflow + input: The input to the workflow. This should be a dictionary or a BaseModel that matches the workflow's input schema. execution_id: Optional custom execution ID deployment_name: Name of the deployment to route this execution to custom_tracing_attributes: Custom tracing attributes