Skip to content

chore: switch to v2 specs for shorter SDK class names#352

Merged
louis-sanna-dev merged 9 commits intomainfrom
test/sdk-v2-short-names
Feb 17, 2026
Merged

chore: switch to v2 specs for shorter SDK class names#352
louis-sanna-dev merged 9 commits intomainfrom
test/sdk-v2-short-names

Conversation

@louis-sanna-dev
Copy link
Contributor

@louis-sanna-dev louis-sanna-dev commented Feb 16, 2026

Summary

  • Switch Speakeasy workflow to use :v2 registry tags for all sources (main, azure, gcp)
  • Regenerate SDK with shorter class names
  • Bump version to 2.0.0a3

This enables shorter SDK class names via x-mistral-sdk-operation-id in the OpenAPI spec.

Before: JobsAPIRoutesFineTuningArchiveFineTunedModelRequest
After: ArchiveModelRequest

Related

Local Testing

# Build
uv build

# Test in isolated environment
uv run --isolated --with ./dist/mistralai-2.0.0a3-py3-none-any.whl python -c "
from mistralai.client import Mistral
from mistralai.client.models import UserMessage
print('OK')"

# Test completion API
uv run --isolated --with ./dist/mistralai-2.0.0a3-py3-none-any.whl python -c "import os; from mistralai.client import Mistral; client = Mistral(api_key=os.environ['MISTRAL_API_KEY']); res = client.chat.complete(model='mistral-small-latest', messages=[{'role': 'user', 'content': 'Say OK'}]); print(res.choices[0].message.content)"

Test in test.pypi

Published and verified: https://test.pypi.org/project/mistralai/#history

uv run --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ --with mistralai==2.0.0a3 python -c "import os; from mistralai.client import Mistral; client = Mistral(api_key=os.environ['MISTRAL_API_KEY']); res = client.chat.complete(model='mistral-small-latest', messages=[{'role': 'user', 'content': 'Say OK'}]); print(res.choices[0].message.content)"

Test plan

  • Verify main SDK has short class names
  • Verify Azure/GCP packages are unaffected (still use standard names like ChatCompletionRequest)
  • Local build and import test
  • API call test
  • test.pypi deployment and verification

- test-generate: Test SDK generation locally
- update-speakeasy-version: Update Speakeasy CLI version

Production generation is done via GitHub Actions.
Update Speakeasy workflow to pull from :v2 registry tags instead of :main.
This enables shorter SDK class names via x-mistral-sdk-operation-id.
Auto-generated by Speakeasy using v2 spec with short operation IDs.
Class names now use concise names like ArchiveModelRequest instead of
JobsAPIRoutesFineTuningArchiveFineTunedModelRequest.
@louis-sanna-dev louis-sanna-dev merged commit fc41a07 into main Feb 17, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants