Skip to content

NET-1329 feat(models): add opt-in TTL caching for get_model_pricing#328

Open
AkhileshNair2201 wants to merge 10 commits into
developfrom
feat/sdk-caching
Open

NET-1329 feat(models): add opt-in TTL caching for get_model_pricing#328
AkhileshNair2201 wants to merge 10 commits into
developfrom
feat/sdk-caching

Conversation

@AkhileshNair2201

@AkhileshNair2201 AkhileshNair2201 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

TICKET (https://getnetra.atlassian.net/browse/NET-1329)

What

Add opt-in in-memory TTL caching to Netra.models.get_model_pricing() (use_cache / cache_ttl, default 300s), plus clear_cache() and best-effort clear on Netra.shutdown().

Why

Match Phase 1 prompts caching and the JS Phase 2 contract so repeated model-pricing reads can skip HTTP when callers opt in, without changing default (always-fetch) behavior.

AkhileshNair2201 and others added 8 commits July 10, 2026 13:01
Co-authored-by: Cursor <cursoragent@cursor.com>
Restore the 0.1.95 changelog entry, bump to 0.1.96, skip cache writes
for non-positive TTL, and add shutdown and edge-case tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
…FastAPI gaps

Co-authored-by: Cursor <cursoragent@cursor.com>
@AkhileshNair2201 AkhileshNair2201 changed the title feat(models): add opt-in TTL caching for get_model_pricing NET-1329 feat(models): add opt-in TTL caching for get_model_pricing Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants