Files
claude-relay-service/resources/model-pricing/README.md
shaw 1a423d3afd feat: 优化前端构建分发和模型价格更新机制
1. 前端构建分发优化:
   - 修改 GitHub Actions workflow,构建前端后推送到 web-dist 分支
   - 更新 manage.sh 安装脚本,从 web-dist 分支获取预构建文件
   - 解决部分机器无法本地编译前端的问题
   - 添加测试脚本 test-web-dist.sh 验证流程

2. 模型价格更新功能:
   - 添加手动更新模型价格脚本 update-model-pricing.js
   - 新增 npm run update:pricing 命令
   - 在 manage.sh 添加 update-pricing 命令和菜单选项
   - 支持备份、进度显示和统计信息

3. 其他改进:
   - 优化安装流程,减少对 Node.js 环境的依赖
   - 提供多种更新模型价格的方式
   - 改进错误处理和回退机制

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-06 10:24:03 +08:00

1.2 KiB

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:

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:

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-08-06