feat: align Azure/GCP SDKs with namespace vision (API-1988)#351
Open
Nelson-PROIA wants to merge 4 commits intomainfrom
Open
feat: align Azure/GCP SDKs with namespace vision (API-1988)#351Nelson-PROIA wants to merge 4 commits intomainfrom
Nelson-PROIA wants to merge 4 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
- Rewrite all code examples to use proper auth patterns (httpx.Client with api-version for Azure, gcloud token + Vertex URL for GCP) - Remove hardcoded defaults everywhere; all env vars use os.environ[] - Add .env.example files for Azure and GCP - Fix create → complete heading mismatch in docs/sdks/ - Add missing imports (os, typing, httpx) across all code blocks - Add follow_redirects=True consistently to Azure httpx clients - Add namespace_packages=true to both pyproject.toml - Fix pre-commit paths (example/ → examples/) - Fix tasks.py docstring placement Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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 into PEP 420 namespace sub-packages.
What changed
SDK migration
packages/mistralai_azure/→packages/azure/,packages/mistralai_gcp/→packages/gcp/mistralai.azure.client/mistralai.gcp.clientnamespacesdev-mode-dirs, and.genignorefor new structureDocs & examples
httpx.Clientwithapi-version+follow_redirects; GCP:gcloudtoken + Vertex AI URL)os.environ["VAR"]everywherecreate→completeheading/anchor mismatch in docsos,httpx,typing) in all code blocks.env.examplefiles for Azure and GCPConfig
namespace_packages = trueto both pyproject.toml (mypy)example/→examples/)Tests
Test plan