Conversation
Greptile SummaryThis release promotes the dedicated-database APIs to 24.0.0, adds Cloudflare and Resend OAuth support, updates generated models and response-format metadata, restores transaction IDs for document creation, and changes credential rotation to return asynchronous operations.
Confidence Score: 2/5The PR should not merge until positional model compatibility, nullable credential-generation responses, and OAuth provider-list typing are corrected. Existing positional document-creation calls can fail before transport, valid dedicated-database responses can fail model validation, and newly supported OAuth providers can decode into the wrong generated model. Files Needing Attention: appwrite/services/documents_db.py, appwrite/services/vectors_db.py, appwrite/models/dedicated_database.py, appwrite/models/o_auth2_provider_list.py Important Files Changed
Prompt To Fix All With AI### Issue 1
appwrite/services/documents_db.py:952-953
**Positional model type is misbound**
When an existing caller passes `model_type` positionally, the new parameter order binds that class to `transaction_id`; the class is then placed in the JSON payload, causing serialization to raise `TypeError` before the request is sent. The same incompatible ordering was added to both creation methods in DocumentsDB and VectorsDB.
### Issue 2
appwrite/models/dedicated_database.py:127
**Nullable generation rejects valid responses**
When the API returns `credentialGeneration` as null before the rotation contract is initialized, this required `float` fails Pydantic validation, causing the SDK to raise `AppwriteException` for an otherwise successful database response.
```suggestion
credentialgeneration: Optional[float] = Field(default=None, alias='credentialGeneration')
```
### Issue 3
appwrite/models/o_auth2_provider_list.py:108-109
**Provider union loses nominal type**
When `list_o_auth2_providers` parses a Resend or Cloudflare response with the common provider fields, an earlier structurally identical member of this untagged union wins validation, causing callers to receive the wrong provider model and breaking `isinstance`-based dispatch.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "chore: update Python SDK to 24.0.0" | Re-trigger Greptile |
| transaction_id: Optional[str] = None, | ||
| model_type: Type[T] = dict, |
There was a problem hiding this comment.
Positional model type is misbound
When an existing caller passes model_type positionally, the new parameter order binds that class to transaction_id; the class is then placed in the JSON payload, causing serialization to raise TypeError before the request is sent. The same incompatible ordering was added to both creation methods in DocumentsDB and VectorsDB.
Knowledge Base Used:
Prompt To Fix With AI
This is a comment left during a code review.
Path: appwrite/services/documents_db.py
Line: 952-953
Comment:
**Positional model type is misbound**
When an existing caller passes `model_type` positionally, the new parameter order binds that class to `transaction_id`; the class is then placed in the JSON payload, causing serialization to raise `TypeError` before the request is sent. The same incompatible ordering was added to both creation methods in DocumentsDB and VectorsDB.
**Knowledge Base Used:**
- [Document and vector database services](https://app.greptile.com/appwrite/-/custom-context/knowledge-base/appwrite/sdk-for-python/-/docs/document-and-vector-database-services.md)
- [API data contracts](https://app.greptile.com/appwrite/-/custom-context/knowledge-base/appwrite/sdk-for-python/-/docs/api-data-contracts.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| connectionport: float = Field(..., alias='connectionPort') | ||
| connectionuser: str = Field(..., alias='connectionUser') | ||
| connectionpassword: str = Field(..., alias='connectionPassword') | ||
| credentialgeneration: float = Field(..., alias='credentialGeneration') |
There was a problem hiding this comment.
Nullable generation rejects valid responses
When the API returns credentialGeneration as null before the rotation contract is initialized, this required float fails Pydantic validation, causing the SDK to raise AppwriteException for an otherwise successful database response.
| credentialgeneration: float = Field(..., alias='credentialGeneration') | |
| credentialgeneration: Optional[float] = Field(default=None, alias='credentialGeneration') |
Knowledge Base Used:
Prompt To Fix With AI
This is a comment left during a code review.
Path: appwrite/models/dedicated_database.py
Line: 127
Comment:
**Nullable generation rejects valid responses**
When the API returns `credentialGeneration` as null before the rotation contract is initialized, this required `float` fails Pydantic validation, causing the SDK to raise `AppwriteException` for an otherwise successful database response.
```suggestion
credentialgeneration: Optional[float] = Field(default=None, alias='credentialGeneration')
```
**Knowledge Base Used:**
- [API data contracts](https://app.greptile.com/appwrite/-/custom-context/knowledge-base/appwrite/sdk-for-python/-/docs/api-data-contracts.md)
- [Request transport and error handling](https://app.greptile.com/appwrite/-/custom-context/knowledge-base/appwrite/sdk-for-python/-/docs/request-transport-and-errors.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| OAuth2Resend, | ||
| OAuth2Cloudflare, |
There was a problem hiding this comment.
Provider union loses nominal type
When list_o_auth2_providers parses a Resend or Cloudflare response with the common provider fields, an earlier structurally identical member of this untagged union wins validation, causing callers to receive the wrong provider model and breaking isinstance-based dispatch.
Knowledge Base Used:
Prompt To Fix With AI
This is a comment left during a code review.
Path: appwrite/models/o_auth2_provider_list.py
Line: 108-109
Comment:
**Provider union loses nominal type**
When `list_o_auth2_providers` parses a Resend or Cloudflare response with the common provider fields, an earlier structurally identical member of this untagged union wins validation, causing callers to receive the wrong provider model and breaking `isinstance`-based dispatch.
**Knowledge Base Used:**
- [API data contracts](https://app.greptile.com/appwrite/-/custom-context/knowledge-base/appwrite/sdk-for-python/-/docs/api-data-contracts.md)
- [Project and platform services](https://app.greptile.com/appwrite/-/custom-context/knowledge-base/appwrite/sdk-for-python/-/docs/project-and-platform-services.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
This PR contains updates to the SDK for version 24.0.0.
What's Changed
mysql,postgresql,mongo,documentsDB, andvectorsDBservices, previously released as release candidatestablesDB.cutoverMigrationis renamed totablesDB.createCutoverExecution.functionIdis replaced byresourceIdandresourceType, covering function and site executionsusageAggregateOnlyMetricson theBillingPlanmodeltransactionIdis accepted again bydocumentsDBandvectorsDBcreateDocumentandcreateDocumentsX-Appwrite-Response-Formatis now2.0.0FrameworkAdapter.fallbackFileis now optional