Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/custom token rates for endpoints #6086

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

rubentalstra
Copy link
Collaborator

Summary

Closes: #1633

This pull request introduces custom token and cache override functionality for different models, updates the configuration loading process, and adds type definitions for token rates in the api and packages/data-provider directories. The most important changes include adding new functions to set custom overrides, modifying the cache multiplier retrieval logic, and updating the configuration schema.

Custom override functionality:

  • api/models/tx.js: Added setCustomTokenOverrides and setCustomCacheOverrides functions to allow overriding default token and cache multipliers for specific models. [1] [2]

Cache multiplier retrieval logic:

  • api/models/tx.js: Updated the getCacheMultiplier function to check for custom cache overrides before falling back to default values.

Configuration loading:

Type definitions:

Change Type

Please delete any irrelevant options.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Translation update

Testing

Please describe your test process and include instructions so that we can reproduce your test. If there are any important variables for your testing configuration, list them here.

Test Configuration:

Checklist

Please delete any irrelevant options.

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • I have made pertinent documentation changes
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes are effective or that my feature works
  • Local unit tests pass with my changes
  • Any changes dependent on mine have been merged and published in downstream modules.
  • A pull request for updating the documentation has been submitted.

@rubentalstra rubentalstra added the ✨ enhancement New feature or request label Feb 27, 2025
@rubentalstra rubentalstra self-assigned this Feb 27, 2025
@rubentalstra rubentalstra linked an issue Feb 27, 2025 that may be closed by this pull request
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement: Custom Token Rates for Endpoints (including Custom)
1 participant