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>
This commit is contained in:
shaw
2025-08-06 10:24:03 +08:00
parent 63ba17e02d
commit 1a423d3afd
7 changed files with 926 additions and 54 deletions

View File

@@ -607,9 +607,9 @@
"supports_system_messages": true,
"supports_tool_choice": true,
"search_context_cost_per_query": {
"search_context_size_low": 30.0,
"search_context_size_medium": 35.0,
"search_context_size_high": 50.0
"search_context_size_low": 0.025,
"search_context_size_medium": 0.0275,
"search_context_size_high": 0.03
}
},
"codex-mini-latest": {
@@ -3750,7 +3750,7 @@
"max_input_tokens": 131072,
"max_output_tokens": 131072,
"input_cost_per_token": 3.3e-06,
"output_cost_per_token": 16.5e-06,
"output_cost_per_token": 1.65e-05,
"litellm_provider": "azure_ai",
"mode": "chat",
"supports_function_calling": true,
@@ -3764,7 +3764,7 @@
"max_input_tokens": 131072,
"max_output_tokens": 131072,
"input_cost_per_token": 3e-06,
"output_cost_per_token": 15e-06,
"output_cost_per_token": 1.5e-05,
"litellm_provider": "azure_ai",
"mode": "chat",
"supports_function_calling": true,
@@ -3777,7 +3777,7 @@
"max_tokens": 131072,
"max_input_tokens": 131072,
"max_output_tokens": 131072,
"input_cost_per_token": 0.25e-06,
"input_cost_per_token": 2.5e-07,
"output_cost_per_token": 1.27e-06,
"litellm_provider": "azure_ai",
"mode": "chat",
@@ -3792,7 +3792,7 @@
"max_tokens": 131072,
"max_input_tokens": 131072,
"max_output_tokens": 131072,
"input_cost_per_token": 0.275e-06,
"input_cost_per_token": 2.75e-07,
"output_cost_per_token": 1.38e-06,
"litellm_provider": "azure_ai",
"mode": "chat",
@@ -5741,6 +5741,32 @@
"supports_reasoning": true,
"supports_computer_use": true
},
"claude-opus-4-1-20250805": {
"max_tokens": 32000,
"max_input_tokens": 200000,
"max_output_tokens": 32000,
"input_cost_per_token": 1.5e-05,
"output_cost_per_token": 7.5e-05,
"search_context_cost_per_query": {
"search_context_size_low": 0.01,
"search_context_size_medium": 0.01,
"search_context_size_high": 0.01
},
"cache_creation_input_token_cost": 1.875e-05,
"cache_read_input_token_cost": 1.5e-06,
"litellm_provider": "anthropic",
"mode": "chat",
"supports_function_calling": true,
"supports_vision": true,
"tool_use_system_prompt_tokens": 159,
"supports_assistant_prefill": true,
"supports_pdf_input": true,
"supports_prompt_caching": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_reasoning": true,
"supports_computer_use": true
},
"claude-sonnet-4-20250514": {
"max_tokens": 64000,
"max_input_tokens": 200000,
@@ -7337,12 +7363,12 @@
"max_audio_length_hours": 8.4,
"max_audio_per_prompt": 1,
"max_pdf_size_mb": 30,
"input_cost_per_token": 3.5e-07,
"input_cost_per_token": 3.5e-07,
"input_cost_per_audio_token": 2.1e-06,
"input_cost_per_image": 2.1e-06,
"input_cost_per_video_per_second": 2.1e-06,
"output_cost_per_token": 1.5e-06,
"output_cost_per_audio_token": 8.5e-06,
"output_cost_per_audio_token": 8.5e-06,
"litellm_provider": "gemini",
"mode": "chat",
"rpm": 10,
@@ -9039,9 +9065,9 @@
"supports_tool_choice": true
},
"vertex_ai/meta/llama-4-scout-17b-16e-instruct-maas": {
"max_tokens": 10000000.0,
"max_input_tokens": 10000000.0,
"max_output_tokens": 10000000.0,
"max_tokens": 10000000,
"max_input_tokens": 10000000,
"max_output_tokens": 10000000,
"input_cost_per_token": 2.5e-07,
"output_cost_per_token": 7e-07,
"litellm_provider": "vertex_ai-llama_models",
@@ -9059,9 +9085,9 @@
]
},
"vertex_ai/meta/llama-4-scout-17b-128e-instruct-maas": {
"max_tokens": 10000000.0,
"max_input_tokens": 10000000.0,
"max_output_tokens": 10000000.0,
"max_tokens": 10000000,
"max_input_tokens": 10000000,
"max_output_tokens": 10000000,
"input_cost_per_token": 2.5e-07,
"output_cost_per_token": 7e-07,
"litellm_provider": "vertex_ai-llama_models",
@@ -9079,9 +9105,9 @@
]
},
"vertex_ai/meta/llama-4-maverick-17b-128e-instruct-maas": {
"max_tokens": 1000000.0,
"max_input_tokens": 1000000.0,
"max_output_tokens": 1000000.0,
"max_tokens": 1000000,
"max_input_tokens": 1000000,
"max_output_tokens": 1000000,
"input_cost_per_token": 3.5e-07,
"output_cost_per_token": 1.15e-06,
"litellm_provider": "vertex_ai-llama_models",
@@ -9099,9 +9125,9 @@
]
},
"vertex_ai/meta/llama-4-maverick-17b-16e-instruct-maas": {
"max_tokens": 1000000.0,
"max_input_tokens": 1000000.0,
"max_output_tokens": 1000000.0,
"max_tokens": 1000000,
"max_input_tokens": 1000000,
"max_output_tokens": 1000000,
"input_cost_per_token": 3.5e-07,
"output_cost_per_token": 1.15e-06,
"litellm_provider": "vertex_ai-llama_models",
@@ -9174,7 +9200,7 @@
"max_input_tokens": 128000,
"max_output_tokens": 2048,
"input_cost_per_token": 5e-06,
"output_cost_per_token": 16e-06,
"output_cost_per_token": 1.6e-05,
"litellm_provider": "vertex_ai-llama_models",
"mode": "chat",
"supports_system_messages": true,
@@ -10480,12 +10506,26 @@
"supports_tool_choice": true,
"supports_prompt_caching": true
},
"openrouter/bytedance/ui-tars-1.5-7b":{
"openrouter/x-ai/grok-4": {
"max_tokens": 256000,
"max_input_tokens": 256000,
"max_output_tokens": 256000,
"input_cost_per_token": 3e-06,
"output_cost_per_token": 1.5e-05,
"litellm_provider": "openrouter",
"mode": "chat",
"supports_function_calling": true,
"supports_tool_choice": true,
"supports_reasoning": true,
"source": "https://openrouter.ai/x-ai/grok-4",
"supports_web_search": true
},
"openrouter/bytedance/ui-tars-1.5-7b": {
"max_tokens": 2048,
"max_input_tokens": 131072,
"max_output_tokens": 2048,
"input_cost_per_token": 0.1e-06,
"output_cost_per_token": 0.2e-06,
"input_cost_per_token": 1e-07,
"output_cost_per_token": 2e-07,
"litellm_provider": "openrouter",
"mode": "chat",
"source": "https://openrouter.ai/api/v1/models/bytedance/ui-tars-1.5-7b",
@@ -11164,8 +11204,8 @@
"max_tokens": 8192,
"max_input_tokens": 8192,
"max_output_tokens": 2048,
"input_cost_per_token": 0.21e-06,
"output_cost_per_token": 0.63e-06,
"input_cost_per_token": 2.1e-07,
"output_cost_per_token": 6.3e-07,
"litellm_provider": "openrouter",
"mode": "chat",
"supports_tool_choice": true
@@ -11877,6 +11917,32 @@
"supports_pdf_input": true,
"supports_tool_choice": true
},
"anthropic.claude-opus-4-1-20250805-v1:0": {
"max_tokens": 32000,
"max_input_tokens": 200000,
"max_output_tokens": 32000,
"input_cost_per_token": 1.5e-05,
"output_cost_per_token": 7.5e-05,
"search_context_cost_per_query": {
"search_context_size_low": 0.01,
"search_context_size_medium": 0.01,
"search_context_size_high": 0.01
},
"cache_creation_input_token_cost": 1.875e-05,
"cache_read_input_token_cost": 1.5e-06,
"litellm_provider": "bedrock_converse",
"mode": "chat",
"supports_function_calling": true,
"supports_vision": true,
"tool_use_system_prompt_tokens": 159,
"supports_assistant_prefill": true,
"supports_pdf_input": true,
"supports_prompt_caching": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_reasoning": true,
"supports_computer_use": true
},
"anthropic.claude-opus-4-20250514-v1:0": {
"max_tokens": 32000,
"max_input_tokens": 200000,
@@ -12079,6 +12145,32 @@
"supports_tool_choice": true,
"supports_reasoning": true
},
"us.anthropic.claude-opus-4-1-20250805-v1:0": {
"max_tokens": 32000,
"max_input_tokens": 200000,
"max_output_tokens": 32000,
"input_cost_per_token": 1.5e-05,
"output_cost_per_token": 7.5e-05,
"search_context_cost_per_query": {
"search_context_size_low": 0.01,
"search_context_size_medium": 0.01,
"search_context_size_high": 0.01
},
"cache_creation_input_token_cost": 1.875e-05,
"cache_read_input_token_cost": 1.5e-06,
"litellm_provider": "bedrock_converse",
"mode": "chat",
"supports_function_calling": true,
"supports_vision": true,
"tool_use_system_prompt_tokens": 159,
"supports_assistant_prefill": true,
"supports_pdf_input": true,
"supports_prompt_caching": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_reasoning": true,
"supports_computer_use": true
},
"us.anthropic.claude-opus-4-20250514-v1:0": {
"max_tokens": 32000,
"max_input_tokens": 200000,
@@ -12252,6 +12344,32 @@
"supports_pdf_input": true,
"supports_tool_choice": true
},
"eu.anthropic.claude-opus-4-1-20250805-v1:0": {
"max_tokens": 32000,
"max_input_tokens": 200000,
"max_output_tokens": 32000,
"input_cost_per_token": 1.5e-05,
"output_cost_per_token": 7.5e-05,
"search_context_cost_per_query": {
"search_context_size_low": 0.01,
"search_context_size_medium": 0.01,
"search_context_size_high": 0.01
},
"cache_creation_input_token_cost": 1.875e-05,
"cache_read_input_token_cost": 1.5e-06,
"litellm_provider": "bedrock_converse",
"mode": "chat",
"supports_function_calling": true,
"supports_vision": true,
"tool_use_system_prompt_tokens": 159,
"supports_assistant_prefill": true,
"supports_pdf_input": true,
"supports_prompt_caching": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_reasoning": true,
"supports_computer_use": true
},
"eu.anthropic.claude-opus-4-20250514-v1:0": {
"max_tokens": 32000,
"max_input_tokens": 200000,
@@ -14749,7 +14867,7 @@
"max_tokens": 131072,
"max_input_tokens": 131072,
"max_output_tokens": 16384,
"input_cost_per_token": 0.6e-06,
"input_cost_per_token": 6e-07,
"output_cost_per_token": 2.5e-06,
"litellm_provider": "fireworks_ai",
"mode": "chat",
@@ -14795,6 +14913,58 @@
"source": "https://fireworks.ai/pricing",
"supports_tool_choice": false
},
"fireworks_ai/accounts/fireworks/models/glm-4p5": {
"max_tokens": 128000,
"max_input_tokens": 128000,
"max_output_tokens": 96000,
"input_cost_per_token": 5.5e-07,
"output_cost_per_token": 2.19e-06,
"litellm_provider": "fireworks_ai",
"mode": "chat",
"supports_function_calling": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"source": "https://fireworks.ai/models/fireworks/glm-4p5"
},
"fireworks_ai/accounts/fireworks/models/glm-4p5-air": {
"max_tokens": 128000,
"max_input_tokens": 128000,
"max_output_tokens": 96000,
"input_cost_per_token": 2.2e-07,
"output_cost_per_token": 8.8e-07,
"litellm_provider": "fireworks_ai",
"mode": "chat",
"supports_function_calling": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"source": "https://artificialanalysis.ai/models/glm-4-5-air"
},
"fireworks_ai/accounts/fireworks/models/gpt-oss-120b": {
"max_tokens": 131072,
"max_input_tokens": 131072,
"max_output_tokens": 131072,
"input_cost_per_token": 1.5e-07,
"output_cost_per_token": 6e-07,
"litellm_provider": "fireworks_ai",
"mode": "chat",
"supports_function_calling": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"source": "https://fireworks.ai/pricing"
},
"fireworks_ai/accounts/fireworks/models/gpt-oss-20b": {
"max_tokens": 131072,
"max_input_tokens": 131072,
"max_output_tokens": 131072,
"input_cost_per_token": 5e-08,
"output_cost_per_token": 2e-07,
"litellm_provider": "fireworks_ai",
"mode": "chat",
"supports_function_calling": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"source": "https://fireworks.ai/pricing"
},
"fireworks_ai/nomic-ai/nomic-embed-text-v1.5": {
"max_tokens": 8192,
"max_input_tokens": 8192,