Skip to content

Commit e182e81

Browse files
jfrench9claude
andauthored
Remove deprecated storage APIs and introduce instance usage model (#80)
## Summary Refactors the storage and usage tracking layer of the `robosystems_client` by removing deprecated storage limit/usage API endpoints and models, replacing them with a streamlined instance usage model and updated graph limits response structure. ## Key Accomplishments - **Removed deprecated API endpoints:** Deleted `check_storage_limits` and `get_storage_usage` endpoints under the `credits_` API module, eliminating ~470 lines of obsolete code. - **Introduced `InstanceUsage` model:** Added a new comprehensive model (`instance_usage.py`, 162 lines) to consolidate usage tracking into a single, well-structured representation. - **Added `DatabaseStorageEntry` model:** New model (`database_storage_entry.py`, 93 lines) for representing individual database storage records, enabling more granular storage reporting. - **Updated `GraphLimitsResponse`:** Enriched the graph limits response to incorporate usage data directly, reducing the need for separate API calls to retrieve storage information. - **Simplified `ContentLimits` model:** Stripped down the content limits model significantly (~75 lines removed), removing fields that are now covered by the new instance usage model. - **Removed obsolete models:** Deleted `StorageLimitResponse`, `GetStorageUsageResponseGetstorageusage`, and trimmed `GraphSubscriptionTier` to remove unused fields. - **Enhanced `SearchRequest` model:** Added new fields to the search request model to support storage search optimizations. - **Updated model registry:** `models/__init__.py` updated to reflect all added and removed model classes. ## Breaking Changes ⚠️ **This is a breaking change for consumers of the following APIs and models:** - `robosystems_client.api.credits_.check_storage_limits` — **removed entirely** - `robosystems_client.api.credits_.get_storage_usage` — **removed entirely** - `StorageLimitResponse` model — **removed** - `GetStorageUsageResponseGetstorageusage` model — **removed** - `ContentLimits` model — **fields removed/restructured** - `GraphSubscriptionTier` model — **fields removed** - `GraphLimitsResponse` model — **structure changed** (new fields added, response shape differs) Consumers relying on the deprecated storage limit or usage endpoints must migrate to the updated `get_graph_limits` endpoint, which now includes usage information via the new `InstanceUsage` model. ## Testing Notes - Verify that all downstream services consuming `GraphLimitsResponse` can correctly deserialize the updated response shape. - Confirm that the new `InstanceUsage` and `DatabaseStorageEntry` models serialize/deserialize correctly across all supported formats. - Validate that search requests with the newly added fields in `SearchRequest` function as expected end-to-end. - Ensure no remaining references to the deleted API endpoints or models exist in dependent codebases. ## Infrastructure Considerations - Any API gateway configurations, documentation generators, or SDK auto-generation pipelines referencing the removed endpoints will need to be updated. - Clients pinned to older versions of this package should be identified and coordinated for migration before this change is released. - Monitoring and alerting tied to the deprecated storage endpoints should be decommissioned or redirected to the updated graph limits endpoint. --- 🤖 Generated with [Claude Code](https://claude.ai/code) **Branch Info:** - Source: `feature/storage-search-optimizations` - Target: `main` - Type: feature Co-Authored-By: Claude <noreply@anthropic.com>
2 parents abdc41e + 2e07e46 commit e182e81

13 files changed

Lines changed: 314 additions & 782 deletions

‎robosystems_client/api/credits_/check_storage_limits.py‎

Lines changed: 0 additions & 220 deletions
This file was deleted.

0 commit comments

Comments
 (0)