Skip to content
Merged
  •  
  •  
  •  
2,892 changes: 1,785 additions & 1,107 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ generation:
schemas:
allOfMergeStrategy: shallowMerge
requestBodyFieldName: ""
persistentEdits: {}
persistentEdits:
enabled: "true"
tests:
generateTests: true
generateNewTests: false
skipResponseBodyAssertions: false
python:
version: 2.0.0a2
version: 2.0.0a3
additionalDependencies:
dev:
pytest: ^8.2.2
Expand Down
799 changes: 0 additions & 799 deletions .speakeasy/generated-files-2d045ec7-2ebb-4f4d-ad25-40953b132161.lock

This file was deleted.

36 changes: 18 additions & 18 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,57 @@ speakeasyVersion: 1.685.0
sources:
mistral-azure-source:
sourceNamespace: mistral-openapi-azure
sourceRevisionDigest: sha256:544a7fd4d099e72a9a12681b326d44201f1b163e4df2f5fd643d831167255d84
sourceBlobDigest: sha256:41c72401329a30983907c32a60063da8ccd82137cf79d7f452089b5b83bb9d92
sourceRevisionDigest: sha256:d303e640ad565cc8a9801519b20dc7eab226efdfdab951c11256962d9e479f74
sourceBlobDigest: sha256:6e4c789de61b2c9c604bf581e0abbadae90e360491d95ec4247678f4f70cee87
tags:
- latest
mistral-google-cloud-source:
sourceNamespace: mistral-openapi-google-cloud
sourceRevisionDigest: sha256:e3dd3079347edf744151936aaee4ec0ce3eeeb8f46b5c7f31f8e224221e879d4
sourceBlobDigest: sha256:7a525230930debff23fec4e92e3ad2a57889ea46de86cc96d519615709ae8a16
sourceRevisionDigest: sha256:351c4d392b8b2220c337a207e98ed5665ed27fd85de854871a70c4bc2b9c0784
sourceBlobDigest: sha256:d79b21f70efb93b0cd261d2044939a288beaf8707a7caae86aca5c4d5de3821b
tags:
- latest
mistral-openapi:
sourceNamespace: mistral-openapi
sourceRevisionDigest: sha256:4e49849eba5334a3fe4a3d081baa9afdecd8f41dfc4c2a5115bc19ead4d92d13
sourceBlobDigest: sha256:3ab3c61ac6a4e9fab37d924d516838ca27dd7e57a1b5e9059d4db2ef29efec56
sourceRevisionDigest: sha256:74d0de7750f6a1878b68c9da683eba7a447d7c367131d0cb8f5c3b1e05829624
sourceBlobDigest: sha256:41e8354c48993fc29be68959d835ea4f8e0cc1d4b4fbd527afcd970bc02c62a2
tags:
- latest
targets:
mistralai-azure-sdk:
source: mistral-azure-source
sourceNamespace: mistral-openapi-azure
sourceRevisionDigest: sha256:544a7fd4d099e72a9a12681b326d44201f1b163e4df2f5fd643d831167255d84
sourceBlobDigest: sha256:41c72401329a30983907c32a60063da8ccd82137cf79d7f452089b5b83bb9d92
sourceRevisionDigest: sha256:d303e640ad565cc8a9801519b20dc7eab226efdfdab951c11256962d9e479f74
sourceBlobDigest: sha256:6e4c789de61b2c9c604bf581e0abbadae90e360491d95ec4247678f4f70cee87
codeSamplesNamespace: mistral-openapi-azure-code-samples
codeSamplesRevisionDigest: sha256:57821a9bf6cfe7001dfcbcaa2f17b233b98c2f79e2d7588540c41750f10b9c05
codeSamplesRevisionDigest: sha256:0109302b87fa17b0103ef1e372fae76356811b3c552103e659bd5373d537d759
mistralai-gcp-sdk:
source: mistral-google-cloud-source
sourceNamespace: mistral-openapi-google-cloud
sourceRevisionDigest: sha256:e3dd3079347edf744151936aaee4ec0ce3eeeb8f46b5c7f31f8e224221e879d4
sourceBlobDigest: sha256:7a525230930debff23fec4e92e3ad2a57889ea46de86cc96d519615709ae8a16
sourceRevisionDigest: sha256:351c4d392b8b2220c337a207e98ed5665ed27fd85de854871a70c4bc2b9c0784
sourceBlobDigest: sha256:d79b21f70efb93b0cd261d2044939a288beaf8707a7caae86aca5c4d5de3821b
codeSamplesNamespace: mistral-openapi-google-cloud-code-samples
codeSamplesRevisionDigest: sha256:404d5964361b3ced085b11e4b8408c36a4a92efe12a97f7497919efdf7594f6f
codeSamplesRevisionDigest: sha256:09bb7cbf291076170d228116db05d1c9606af541b301b6564609c4d76633258a
mistralai-sdk:
source: mistral-openapi
sourceNamespace: mistral-openapi
sourceRevisionDigest: sha256:4e49849eba5334a3fe4a3d081baa9afdecd8f41dfc4c2a5115bc19ead4d92d13
sourceBlobDigest: sha256:3ab3c61ac6a4e9fab37d924d516838ca27dd7e57a1b5e9059d4db2ef29efec56
sourceRevisionDigest: sha256:74d0de7750f6a1878b68c9da683eba7a447d7c367131d0cb8f5c3b1e05829624
sourceBlobDigest: sha256:41e8354c48993fc29be68959d835ea4f8e0cc1d4b4fbd527afcd970bc02c62a2
codeSamplesNamespace: mistral-openapi-code-samples
codeSamplesRevisionDigest: sha256:debd698577e8da014e900a57194128d867ad76fd0d2e2b361e9d0c298700fc67
codeSamplesRevisionDigest: sha256:f37fb6188ad25957bef4cadaa03f454a4f9ab0c045db633a46d9cc89af145ba2
workflow:
workflowVersion: 1.0.0
speakeasyVersion: 1.685.0
sources:
mistral-azure-source:
inputs:
- location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-openapi-azure:main
- location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-openapi-azure:v2
mistral-google-cloud-source:
inputs:
- location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-openapi-google-cloud:main
- location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-openapi-google-cloud:v2
mistral-openapi:
inputs:
- location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-openapi:main
- location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-openapi:v2
targets:
mistralai-azure-sdk:
target: python
Expand Down
6 changes: 3 additions & 3 deletions .speakeasy/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ speakeasyVersion: 1.685.0
sources:
mistral-azure-source:
inputs:
- location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-openapi-azure:main
- location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-openapi-azure:v2
mistral-google-cloud-source:
inputs:
- location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-openapi-google-cloud:main
- location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-openapi-google-cloud:v2
mistral-openapi:
inputs:
- location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-openapi:main
- location: registry.speakeasyapi.dev/mistral-dev/mistral-dev/mistral-openapi:v2
targets:
mistralai-azure-sdk:
target: python
Expand Down
13 changes: 13 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,19 @@ Some type names have been updated for clarity and consistency:
| `HandoffExecution` | `ConversationRequestHandoffExecution` |
| `AgentVersion` | `ConversationRequestAgentVersion` |

### Shorter Request/Response Class Names

Internal request and response wrapper classes now use concise names:

| Old Name | New Name |
|---|---|
| `JobsAPIRoutesFineTuningArchiveFineTunedModelRequest` | `ArchiveModelRequest` |
| `JobsAPIRoutesFineTuningCreateFineTuningJobResponse` | `CreateFineTuningJobResponse` |
| `FilesAPIRoutesUploadFileRequest` | `UploadFileRequest` |
| `AgentsAPIV1ConversationsAppendRequest` | `AppendConversationRequest` |

This affects all operation-specific request/response types. Core models like `UserMessage`, `ChatCompletionRequest`, etc. are unchanged.

Enums now accept unknown values for forward compatibility with API changes.

---
Expand Down
24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.PHONY: help test-generate update-speakeasy-version

help:
@echo "Available targets:"
@echo " make test-generate Test SDK generation locally"
@echo " make update-speakeasy-version VERSION=x.y.z Update Speakeasy CLI version"
@echo ""
@echo "Note: Production SDK generation is done via GitHub Actions:"
@echo " .github/workflows/sdk_generation_mistralai_sdk.yaml"

# Test SDK generation locally.
# For production, use GitHub Actions: .github/workflows/sdk_generation_mistralai_sdk.yaml
# This uses the Speakeasy CLI version defined in .speakeasy/workflow.yaml
test-generate:
speakeasy run --skip-versioning

# Update the Speakeasy CLI version (the code generator tool).
# This modifies speakeasyVersion in .speakeasy/workflow.yaml and regenerates the SDK.
# Usage: make update-speakeasy-version VERSION=1.685.0
update-speakeasy-version:
ifndef VERSION
$(error VERSION is required. This is the Speakeasy CLI version (e.g., 1.685.0))
endif
uv run inv update-speakeasy --version "$(VERSION)" --targets "all"
18 changes: 7 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ $ source ~/.zshenv
<!-- Start Summary [summary] -->
## Summary

Mistral AI API: Our Chat Completion and Embeddings APIs specification. Create your account on [La Plateforme](https://console.mistral.ai) to get access and read the [docs](https://docs.mistral.ai) to learn how to use it.
Mistral AI API: Dora OpenAPI schema

Our Chat Completion and Embeddings APIs specification. Create your account on [La Plateforme](https://console.mistral.ai) to get access and read the [docs](https://docs.mistral.ai) to learn how to use it.
<!-- End Summary [summary] -->

<!-- Start Table of Contents [toc] -->
Expand Down Expand Up @@ -485,6 +487,7 @@ The documentation for the GCP SDK is available [here](packages/mistralai_gcp/REA
* [get_version](docs/sdks/betaagents/README.md#get_version) - Retrieve a specific version of an agent.
* [create_version_alias](docs/sdks/betaagents/README.md#create_version_alias) - Create or update an agent version alias.
* [list_version_aliases](docs/sdks/betaagents/README.md#list_version_aliases) - List all aliases for an agent.
* [delete_version_alias](docs/sdks/betaagents/README.md#delete_version_alias) - Delete an agent version alias.

### [Beta.Conversations](docs/sdks/conversations/README.md)

Expand Down Expand Up @@ -602,14 +605,7 @@ with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

res = mistral.beta.conversations.start_stream(inputs=[
{
"object": "entry",
"type": "function.result",
"tool_call_id": "<id>",
"result": "<value>",
},
], stream=True, completion_args={
res = mistral.beta.conversations.start_stream(inputs="<value>", stream=True, completion_args={
"response_format": {
"type": "text",
},
Expand Down Expand Up @@ -646,7 +642,7 @@ with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

res = mistral.beta.libraries.documents.upload(library_id="a02150d9-5ee0-4877-b62c-28b1fcdf3b76", file={
res = mistral.beta.libraries.documents.upload(library_id="f973c54e-979a-4464-9d36-8cc31beb21fe", file={
"file_name": "example.file",
"content": open("example.file", "rb"),
})
Expand Down Expand Up @@ -762,7 +758,7 @@ with Mistral(


**Inherit from [`MistralError`](./src/mistralai/client/models/mistralerror.py)**:
* [`HTTPValidationError`](./src/mistralai/client/models/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 52 of 74 methods.*
* [`HTTPValidationError`](./src/mistralai/client/models/httpvalidationerror.py): Validation Error. Status code `422`. Applicable to 53 of 75 methods.*
* [`ResponseValidationError`](./src/mistralai/client/models/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute.

</details>
Expand Down
3 changes: 2 additions & 1 deletion docs/models/agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@
| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A |
| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A |
| `deployment_chat` | *bool* | :heavy_check_mark: | N/A |
| `source` | *str* | :heavy_check_mark: | N/A |
| `source` | *str* | :heavy_check_mark: | N/A |
| `version_message` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
3 changes: 2 additions & 1 deletion docs/models/agentcreationrequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@
| `name` | *str* | :heavy_check_mark: | N/A |
| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `handoffs` | List[*str*] | :heavy_minus_sign: | N/A |
| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A |
| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A |
| `version_message` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
9 changes: 0 additions & 9 deletions docs/models/agentsapiv1agentsgetrequest.md

This file was deleted.

3 changes: 2 additions & 1 deletion docs/models/agentupdaterequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@
| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `handoffs` | List[*str*] | :heavy_minus_sign: | N/A |
| `deployment_chat` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A |
| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A |
| `metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A |
| `version_message` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# AgentsAPIV1ConversationsAppendRequest
# AppendConversationRequest


## Fields
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# AgentsAPIV1ConversationsAppendStreamRequest
# AppendConversationStreamRequest


## Fields
Expand Down
Loading
Loading