mirror of
https://github.com/Alishahryar1/free-claude-code.git
synced 2026-04-28 03:20:01 +00:00
Refactor rate limiting configuration to use unified provider settings
- Replaced NVIDIA NIM and OpenRouter specific rate limit settings with a generic provider rate limit in settings, tests, and environment files. - Updated README.md to reflect the new provider rate limit configuration. - Adjusted tests to validate the new provider rate limit attributes.
This commit is contained in:
parent
605b69ca1e
commit
054f9869b7
6 changed files with 17 additions and 28 deletions
|
|
@ -29,8 +29,8 @@ def get_provider() -> BaseProvider:
|
|||
config = ProviderConfig(
|
||||
api_key=settings.nvidia_nim_api_key,
|
||||
base_url=NVIDIA_NIM_BASE_URL,
|
||||
rate_limit=settings.nvidia_nim_rate_limit,
|
||||
rate_window=settings.nvidia_nim_rate_window,
|
||||
rate_limit=settings.provider_rate_limit,
|
||||
rate_window=settings.provider_rate_window,
|
||||
nim_settings=settings.nim,
|
||||
)
|
||||
_provider = NvidiaNimProvider(config)
|
||||
|
|
@ -41,8 +41,8 @@ def get_provider() -> BaseProvider:
|
|||
config = ProviderConfig(
|
||||
api_key=settings.open_router_api_key,
|
||||
base_url="https://openrouter.ai/api/v1",
|
||||
rate_limit=settings.open_router_rate_limit,
|
||||
rate_window=settings.open_router_rate_window,
|
||||
rate_limit=settings.provider_rate_limit,
|
||||
rate_window=settings.provider_rate_window,
|
||||
nim_settings=settings.nim,
|
||||
)
|
||||
_provider = OpenRouterProvider(config)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue