fix: resolve model alias naming conflict in SDK generation #109
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.
Problem
The SDK failed to compile with error:
This was caused by a naming collision between:
modelspackage (for data types/models)ModelsSDK class (for model alias management)Root Cause
When the new model alias endpoints (
/models/aliases/*) were added to the API, they were missing thex-speakeasy-group: language_modelsoverride in the Speakeasy overlay configuration. This caused Speakeasy to generate a separateModelsSDK class inmodels_.py, creating a conflict with the existingfrom opperai import modelspackage import.Solution
Added
x-speakeasy-group: language_modelsto all 6 model alias endpoints in.speakeasy/speakeasy-modifications-overlay.yaml:create_aliaslist_aliasesget_aliasupdate_aliasdelete_aliasget_alias_by_nameThis unifies all model operations under the
LanguageModelsSDK class, eliminating the naming conflict.Changes
.speakeasy/speakeasy-modifications-overlay.yamlwith missing group overridessrc/opperai/models_.py(conflicting Models SDK)language_models.pyTesting
python -m py_compile)Release Notes
This fix resolves a critical compilation error and should be released ASAP. After merge, the automated release workflow will publish v1.6.3 to PyPI.