|
1 | | -# gen.yaml Diff: Main vs Azure vs GCP |
| 1 | +# gen.yaml Config: Main vs Azure vs GCP |
2 | 2 |
|
3 | | -## `generation` section |
| 3 | +All three SDKs share the same `generation` and `python` config, with only per-target identity fields differing. |
4 | 4 |
|
5 | | -| Setting | Main | Azure | GCP | |
6 | | -|---------|------|-------|-----| |
7 | | -| `sdkClassName` | `Mistral` | `MistralAzure` | `MistralGCP` | |
8 | | -| `nameResolutionDec2023` | `true` | `true` | `true` | |
9 | | -| `nameResolutionFeb2025` | `true` | `true` | `true` | |
10 | | -| `parameterOrderingFeb2024` | `true` | `true` | `true` | |
11 | | -| `requestResponseComponentNamesFeb2024` | `true` | `true` | `true` | |
12 | | -| `securityFeb2025` | `true` | `true` | `true` | |
13 | | -| `sharedErrorComponentsApr2025` | `true` | `true` | `true` | |
14 | | -| `methodSignaturesApr2024` | `true` | `true` | `true` | |
15 | | -| `sharedNestedComponentsJan2026` | `true` | `true` | `true` | |
| 5 | +## Identical across all three |
16 | 6 |
|
17 | | -## `python` section |
| 7 | +```yaml |
| 8 | +# generation |
| 9 | +configVersion: 2.0.0 |
| 10 | +maintainOpenAPIOrder: true |
| 11 | +usageSnippets: |
| 12 | + optionalPropertyRendering: withExample |
| 13 | + sdkInitStyle: constructor |
| 14 | +useClassNamesForArrayFields: true |
| 15 | +fixes: |
| 16 | + nameResolutionDec2023: true |
| 17 | + nameResolutionFeb2025: true |
| 18 | + parameterOrderingFeb2024: true |
| 19 | + requestResponseComponentNamesFeb2024: true |
| 20 | + securityFeb2025: true |
| 21 | + sharedErrorComponentsApr2025: true |
| 22 | + methodSignaturesApr2024: true |
| 23 | + sharedNestedComponentsJan2026: true |
| 24 | +auth: |
| 25 | + oAuth2ClientCredentialsEnabled: true |
| 26 | + oAuth2PasswordEnabled: false |
| 27 | + hoistGlobalSecurity: true |
| 28 | +schemas: |
| 29 | + allOfMergeStrategy: shallowMerge |
| 30 | +tests: |
| 31 | + generateTests: true |
| 32 | + generateNewTests: false |
| 33 | + |
| 34 | +# python |
| 35 | +asyncMode: both |
| 36 | +clientServerStatusCodesAsErrors: true |
| 37 | +constFieldCasing: upper |
| 38 | +defaultErrorName: SDKError |
| 39 | +enumFormat: union |
| 40 | +fixFlags: |
| 41 | + responseRequiredSep2024: true |
| 42 | +flatAdditionalProperties: true |
| 43 | +flattenGlobalSecurity: true |
| 44 | +flattenRequests: true |
| 45 | +flatteningOrder: parameters-first |
| 46 | +forwardCompatibleEnumsByDefault: true |
| 47 | +forwardCompatibleUnionsByDefault: tagged-only |
| 48 | +inferUnionDiscriminators: true |
| 49 | +maxMethodParams: 15 |
| 50 | +methodArguments: infer-optional-args |
| 51 | +preApplyUnionDiscriminators: true |
| 52 | +responseFormat: flat |
| 53 | +sseFlatResponse: false |
| 54 | +templateVersion: v2 |
| 55 | +packageManager: uv |
| 56 | +``` |
| 57 | +
|
| 58 | +## Per-target differences |
18 | 59 |
|
19 | 60 | | Setting | Main | Azure | GCP | |
20 | 61 | |---------|------|-------|-----| |
| 62 | +| `sdkClassName` | `Mistral` | `MistralAzure` | `MistralGCP` | |
21 | 63 | | `version` | `2.0.0a2` | `2.0.0a1` | `2.0.0a1` | |
22 | | -| `additionalDependencies.main` | *none* | *none* | *none* | |
| 64 | +| `moduleName` | `mistralai.client` | `mistralai.azure.client` | `mistralai.gcp.client` | |
| 65 | +| `packageName` | `mistralai` | `mistralai-azure` | `mistralai-gcp` | |
23 | 66 | | `baseErrorName` | `MistralError` | `MistralAzureError` | `MistralGcpError` | |
24 | 67 | | `description` | `...Mistral AI API.` | `...in Azure.` | `...in GCP.` | |
25 | 68 | | `enableCustomCodeRegions` | `true` | `false` | `false` | |
26 | | -| `envVarPrefix` | `MISTRAL` | *missing* | *missing* | |
27 | | -| `responseRequiredSep2024` | `true` | `true` | `true` | |
28 | | -| `flatAdditionalProperties` | `true` | `true` | `true` | |
29 | | -| `forwardCompatibleEnumsByDefault` | `true` | `true` | `true` | |
30 | | -| `forwardCompatibleUnionsByDefault` | `tagged-only` | `tagged-only` | `tagged-only` | |
31 | | -| `preApplyUnionDiscriminators` | `true` | `true` | `true` | |
32 | | -| `moduleName` | `mistralai.client` | `mistralai.azure.client` | `mistralai.gcp.client` | |
33 | | -| `packageName` | `mistralai` | `mistralai-azure` | `mistralai-gcp` | |
34 | | - |
35 | | -## Remaining intentional differences |
| 69 | +| `envVarPrefix` | `MISTRAL` | *(absent)* | *(absent)* | |
36 | 70 |
|
37 | | -All fix flags and feature flags are now aligned. The only remaining differences are expected per-target values: |
| 71 | +### Why these differ |
38 | 72 |
|
39 | | -- **`version`** -- Azure/GCP at 2.0.0a1 |
40 | | -- **`baseErrorName`** / `description` -- per-target identity |
41 | | -- **`enableCustomCodeRegions`** -- `false` in Azure/GCP (they have no custom code regions) |
42 | | -- **`envVarPrefix`** -- absent in Azure/GCP (only the main SDK reads `MISTRAL_*` env vars) |
43 | | -- **`moduleName`** / `packageName` -- per-target namespace |
| 73 | +- **`version`**: Azure/GCP at `2.0.0a1` (first v2 release), main at `2.0.0a2` |
| 74 | +- **`moduleName`** / **`packageName`**: each target generates into its own namespace |
| 75 | +- **`baseErrorName`** / **`description`**: per-target identity |
| 76 | +- **`enableCustomCodeRegions`**: only the main SDK has custom code hooks (`src/mistralai/client/_hooks/`) |
| 77 | +- **`envVarPrefix`**: only the main SDK reads `MISTRAL_*` env vars (API key, etc.) |
0 commit comments