mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-31 11:01:36 +08:00
feat(pricing): add ~50 new model pricing entries and fix outdated prices
Add pricing data for 4 new providers (Qwen, xAI Grok, Mistral, Cohere) and supplement existing providers (MiniMax M2.5/M2.7, GLM-5/5.1, Doubao Seed 2.0, MiMo V2 Pro, OpenAI o1/o3/codex-mini/gpt-5-mini/nano). Fix outdated prices for deepseek-chat, deepseek-reasoner, and kimi-k2.5. Fix display_name casing "Mimo" → "MiMo" for consistency. Use prepared statement in seed_model_pricing() to avoid recompiling SQL on each of ~130 INSERT iterations. Schema migration v8→v9: DELETE + re-seed model_pricing for existing users.
This commit is contained in:
@@ -44,7 +44,7 @@ use std::sync::Mutex;
|
||||
|
||||
/// 当前 Schema 版本号
|
||||
/// 每次修改表结构时递增,并在 schema.rs 中添加相应的迁移逻辑
|
||||
pub(crate) const SCHEMA_VERSION: i32 = 8;
|
||||
pub(crate) const SCHEMA_VERSION: i32 = 9;
|
||||
|
||||
/// 安全地序列化 JSON,避免 unwrap panic
|
||||
pub(crate) fn to_json_string<T: Serialize>(value: &T) -> Result<String, AppError> {
|
||||
|
||||
Reference in New Issue
Block a user