feat!: add workflows namespace sub-package extras #346
+40
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
workflowsandworkflows-mistralaioptional dependencies topyproject.tomlChanges
pyproject.toml:This enables the install matrix from the PEP 420 integration plan:
pip install mistralaipip install mistralai[workflows]pip install mistralai[workflows-mistralai]Plugin extras use flat naming to chain dependencies (
mistralai[workflows-X]→mistralai-workflows[X]), since nested pip extras are not valid syntax.README.md: Added "Namespace Sub-packages" section documenting the pattern.TODO: Rename
mistralaipluginThe current workflows plugin is named
mistralai(mistralai-workflows[mistralai]), which means the full install path ismistralai[workflows-mistralai]. This is confusing — a plugin calledmistralaiinside themistralainamespace. It should be renamed to something descriptive (e.g.platform,api,core). Once renamed, the extra here needs to be updated accordingly. Waiting on workflows team decision.Validation
Built wheels from both repos and verified the PEP 420 namespace merge in a clean venv:
Both packages install under
site-packages/mistralai/with no__init__.pyat the namespace level — Python mergesclient/andworkflows/automatically.Known issue
mistralaipinsopentelemetry-semantic-conventions>=0.59b0,<0.60.mistralai-workflowstransitively pulls inopentelemetry-semantic-conventions==0.60b1, which violates the client's<0.60upper bound. Fix: widen the client's upper bound to<0.61. This dependency is generated by Speakeasy, so it needs to be updated in the next SDK generation or overridden manually (the file is in.genignore).