-
Notifications
You must be signed in to change notification settings - Fork 165
feat!: add workflows namespace sub-package extras #346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
CI fails because |
Add optional dependencies for mistralai-workflows and its plugin extras, enabling `pip install mistralai[workflows]` and `pip install mistralai[workflows-mistralai]`. Document the PEP 420 namespace sub-package pattern in README. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2500f70 to
9a71b31
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice.
I'm blocking the merge since we need before merging:
- to update the workflow package to respect the target structure
mistralai/workflows - to solve those otel issues
| ] | ||
| workflows-mistralai = [ | ||
| "mistralai-workflows[mistralai]>=2.0.0b1", | ||
| ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Nelson-PROIA [remark] ah I finally understand how we solve the nested nested problem. very nice.
The only issue that we will need to update this list every time workflows adds an extra, which is a bit painful.
Maybe we could document the "raw install"
pip install "mistralai-workflows[mistralai,my-provider]" # plugins directly
Also I wonder if we should add uv example, the entire ecosystem is moving to uv.
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).