This repository is mostly generated code.
Before editing or approving a PR, check the top of the file:
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""If that marker is present, do not hand-edit the file. Changes should be made in the upstream source or generator inputs, then regenerated.
The main hand-maintained surface is listed in .genignore.
At the repo root, that currently includes files such as:
pyproject.tomlexamples/*utils/*src/mistralai/extra/*scripts/prepare_readme.py
There are also package-specific ownership files:
packages/gcp/.genignorepackages/azure/.genignore
If a file is not listed in the relevant .genignore and it has the generated header, assume it should not be edited directly.
Custom SDK hooks are hand-written too, though the root .genignore does not list them: in src/mistralai/client/_hooks/
(and packages/*/src/mistralai/*/client/_hooks/), every file without the generated header, such as registration.py
and custom_user_agent.py. Speakeasy writes registration.py once and never overwrites it (the package .genignore
files also list it); sdkhooks.py, types.py and __init__.py carry the header and are regenerated.
- Prefer PRs that change hand-owned files listed in
.genignore. - Be skeptical of direct edits to generated SDK files under
src/,docs/, orpackages/*/src/. - If a generated file changed, look for the corresponding source/config change that explains the regeneration.
This directory is the source of truth; the public mistralai/client-python repository is a copy of it. Releasing
runs in the Buildkite pipeline eng-sdk-codegen in the dashboard monorepo, not in GitHub Actions:
- Regenerate: a weekly cron (its day and time are in the pipeline's
Buildkite schedule), or a manual build with
Action = regenerate, runs Speakeasy onopenapi/specs/v2/and opens the rolling dashboard pull request fromsdk/regen-client-python. Review and merge it. - Publish: a person starts a build with
Action = publish, from the Buildkite UI or through the Buildkite API or MCP withaction=publish,dry_run=false,clients=pythonas build meta-data. It copies this directory into a pull request on thesdk-syncbranch ofmistralai/client-python. Publishing never regenerates, so merge step 1 first. - Merging that public pull request is the release. Its
Publish MISTRALAI-SDKworkflow waits for an approval from@mistralai/engineering-sdkon thepublishenvironment (Actions run, Review deployments), then uploads to PyPI. Its GitHub release step currently fails on the org IP allow list, so thevX.Y.Zrelease is created by hand; the skill below has the command.
The full procedure, its options and its safety checks are in the dashboard skill
openapi/.agents/skills/deploy-public-sdk/SKILL.md.