chore: Minimize breaking changes on common import paths and alias names #206
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 of Supported Import Paths
This PR adds V1 compatibility shims to allow V1-style imports to continue working in V2. The following import paths are now supported:
Constants (
together.constants)Error Classes (
together.error)Type Aliases (
together.types)Chat Completions Types (
together.types.chat_completions)Endpoints Types (
together.types.endpoints)Files Types (
together.types.files)Fine-tuning Types (
together.types.finetune)Models Types (
together.types.models)These compatibility shims allow existing V1 code to continue working without modification, while new V2 code can use the updated structure.
Note
Introduces V1 compatibility shims to minimize breaking changes by re-exporting V2 symbols under V1-style imports.
together.constantsshim re-exporting existing constants and definingTIMEOUT_SECS,MAX_SESSION_LIFETIME_SECS,MAX_CONNECTION_RETRIES,MAX_RETRIES,BASE_URLtogether.errorshim re-exporting exceptions and legacy aliases (Timeout,InvalidRequestError,TogetherException,ResponseError)together.types.__init__with aliases (ChatCompletion,ChatCompletionChunk,ChatCompletionUsage,UsageData,ChatCompletionResponse,CompletionResponse,ListEndpoint,ImageRequest,ImageResponse)together/types/chat_completions.py,together/types/endpoints.py,together/types/files.py,together/types/finetune.py,together/types/models.pymapping V1 names to V2 typesuv.locktotogetherversion2.0.0a14Written by Cursor Bugbot for commit 46adbeb. This will update automatically on new commits. Configure here.