mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-22 16:43:35 +00:00
feat(pricing): 添加模型价格文件本地fallback机制
This commit is contained in:
37
resources/model-pricing/README.md
Normal file
37
resources/model-pricing/README.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# Model Pricing Data
|
||||
|
||||
This directory contains a local copy of the LiteLLM model pricing data as a fallback mechanism.
|
||||
|
||||
## Source
|
||||
The original file is maintained by the LiteLLM project:
|
||||
- Repository: https://github.com/BerriAI/litellm
|
||||
- File: https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json
|
||||
|
||||
## Purpose
|
||||
This local copy serves as a fallback when the remote file cannot be downloaded due to:
|
||||
- Network restrictions
|
||||
- Firewall rules
|
||||
- DNS resolution issues
|
||||
- GitHub being blocked in certain regions
|
||||
- Docker container network limitations
|
||||
|
||||
## Update Process
|
||||
The pricingService will:
|
||||
1. First attempt to download the latest version from GitHub
|
||||
2. If download fails, use this local copy as fallback
|
||||
3. Log a warning when using the fallback file
|
||||
|
||||
## Manual Update
|
||||
To manually update this file with the latest pricing data:
|
||||
```bash
|
||||
curl -s https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json -o model_prices_and_context_window.json
|
||||
```
|
||||
|
||||
## File Format
|
||||
The file contains JSON data with model pricing information including:
|
||||
- Model names and identifiers
|
||||
- Input/output token costs
|
||||
- Context window sizes
|
||||
- Model capabilities
|
||||
|
||||
Last updated: 2025-07-29
|
||||
17435
resources/model-pricing/model_prices_and_context_window.json
Normal file
17435
resources/model-pricing/model_prices_and_context_window.json
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user