feat: align Azure/GCP SDKs with namespace vision (API-1988)#351
Open
Nelson-PROIA wants to merge 2 commits intomainfrom
Open
feat: align Azure/GCP SDKs with namespace vision (API-1988)#351Nelson-PROIA wants to merge 2 commits intomainfrom
Nelson-PROIA wants to merge 2 commits intomainfrom
Conversation
d1fa5de to
379b180
Compare
louis-sanna-dev
approved these changes
Feb 17, 2026
Contributor
There was a problem hiding this comment.
@Nelson-PROIA I think it looks good, not an expert in python packaging to be fair.
Let's also check how to QA with actual Azure/GCP endpoints.
Two nitpicks proposed by Claude:
- README import path inconsistency
- README shows: from mistralai.azure import MistralAzure
- Examples use: from mistralai.azure.client import MistralAzure[4:38 PM]
- Duplicate example files
- examples/azure/az_chat_no_streaming.py and examples/azure/chat_no_streaming.py are identical
- examples/gcp/async_chat_no_streaming.py and examples/gcp/gcp_async_chat_no_streaming.py are identical
3879e7f to
a424d32
Compare
- Rename packages/mistralai_azure -> packages/azure, packages/mistralai_gcp -> packages/gcp - Regenerate SDK code with v2 OpenAPI specs under PEP 420 namespace layout (mistralai.azure.client, mistralai.gcp.client) - Update build system: root pyproject.toml with dev-mode-dirs, wheel sources, bump to v2.0.0a4 - Update .speakeasy/workflow.yaml for new directory structure - Cross-package consistency fixes: pydantic >=2.11.2, mypy ==1.15.0, package name hyphen, MistralGCPError, .genignore - Update examples, migration guide - Update lint script paths Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- test_azure_v2_parity.py: parametrized tests covering constructor, context manager, all chat/ocr params, sync/async parity - test_gcp_v2_parity.py: parametrized tests covering constructor, context manager, all chat/fim params, sync/async parity - test_azure_integration.py: credential-gated integration tests for Azure chat (sync/async/streaming/tools/JSON) - test_gcp_integration.py: credential-gated integration tests for GCP chat + FIM (sync/async/streaming/tools) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
a424d32 to
075db71
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Migrate Azure/GCP from standalone flat packages (
mistralai_azure,mistralai_gcp) into PEP 420 namespace sub-packages within the mainmistralaitree, aligned with the existingmistralai.clientpattern.What changed
packages/mistralai_azure/→packages/azure/,packages/mistralai_gcp/→packages/gcp/moduleNametomistralai.azure.client/mistralai.gcp.client, bumped version to2.0.0a4, enabled v2 config flags (seedocs/gen-yaml-diff.mdfor full comparison)speakeasy runmistralai/trees into one wheel — the generated code now lives atpackages/azure/src/mistralai/azure/client/andpackages/gcp/src/mistralai/gcp/client/dev-mode-dirs: required for editable installs (uv sync) — the Azure/GCP code lives in separate source directories (packages/azure/src/,packages/gcp/src/), and hatch needs to be told to put all three dirs onsys.pathso thatimport mistralai.azure.clientworks at runtimepydantic >=2.11.2,mypy ==1.15.0, package names with hyphens (mistralai-azure,mistralai-gcp),MistralGCPErrorclass naming,.genignorealignmentaz_chat_no_streaming.py,gcp_async_chat_no_streaming.py)scripts/lint_custom_code.shpaths for new directory structurerun_examples.sh: excluded fine-tuning job examples — they fail due toopen-mistral-7bno longer being available for fine-tuning (pre-existing issue onmain)Test plan