mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 12:44:18 +08:00
Update default models and pricing across presets
Bump default model names project-wide: gpt-5.4 -> gpt-5.5,
gemini-3.x -> gemini-3.5-flash, glm-5 -> glm-5.1, and
grok-code-fast-1 -> grok-build-0.1 across all provider presets
(claude, codex, gemini, hermes, openclaw, opencode, universal),
Gemini config, and stream check defaults.
Pricing:
- Seed gemini-3.5-flash, gemini-3.1-flash-lite, step-3.5-flash-2603,
doubao-seed-2.0-code, mimo-v2.5(/pro), qwen3-coder-480b, grok-build-0.1.
- Correct deepseek-v4-flash/pro, glm-5/5.1, grok pricing.
- Add repair_current_model_pricing: idempotent pass that fixes only
rows still equal to the outdated built-in values, preserving any
user-customized prices (seed uses INSERT OR IGNORE and cannot update
existing rows).
Fixes from review:
- opencode: drop duplicate gemini-3.5-flash variant (unreachable via
.find), keep the entry with the full minimal/low/medium/high set.
- Align stale display names/costs to gemini-3.5-flash (hermes, openclaw,
opencode); openclaw cost -> {1.5, 9, 0.15} to match seed.
- i18n (zh/en/ja/zh-TW): refresh OMO category tooltips for new model
names; fix writing tooltip to Kimi K2.5 to match its recommended.
Update tests accordingly and add a regression test asserting unique
model ids in the Google opencode preset variants.
This commit is contained in:
@@ -1485,6 +1485,15 @@ impl Database {
|
||||
("gpt-4.1", "GPT-4.1", "2", "8", "0.50", "0"),
|
||||
("gpt-4.1-mini", "GPT-4.1 Mini", "0.40", "1.60", "0.10", "0"),
|
||||
("gpt-4.1-nano", "GPT-4.1 Nano", "0.10", "0.40", "0.025", "0"),
|
||||
// Gemini 3.5 系列
|
||||
(
|
||||
"gemini-3.5-flash",
|
||||
"Gemini 3.5 Flash",
|
||||
"1.50",
|
||||
"9.00",
|
||||
"0.15",
|
||||
"0",
|
||||
),
|
||||
// Gemini 3.1 系列
|
||||
(
|
||||
"gemini-3.1-pro-preview",
|
||||
@@ -1494,6 +1503,14 @@ impl Database {
|
||||
"0.20",
|
||||
"0",
|
||||
),
|
||||
(
|
||||
"gemini-3.1-flash-lite",
|
||||
"Gemini 3.1 Flash Lite",
|
||||
"0.25",
|
||||
"1.50",
|
||||
"0.025",
|
||||
"0",
|
||||
),
|
||||
(
|
||||
"gemini-3.1-flash-lite-preview",
|
||||
"Gemini 3.1 Flash Lite Preview",
|
||||
@@ -1562,6 +1579,14 @@ impl Database {
|
||||
"0.02",
|
||||
"0",
|
||||
),
|
||||
(
|
||||
"step-3.5-flash-2603",
|
||||
"Step 3.5 Flash 2603",
|
||||
"0.10",
|
||||
"0.30",
|
||||
"0.02",
|
||||
"0",
|
||||
),
|
||||
// ====== 国产模型 (USD/1M tokens) ======
|
||||
// Doubao (字节跳动)
|
||||
(
|
||||
@@ -1588,6 +1613,14 @@ impl Database {
|
||||
"0",
|
||||
"0",
|
||||
),
|
||||
(
|
||||
"doubao-seed-2-0-code-preview-latest",
|
||||
"Doubao Seed 2.0 Code Preview",
|
||||
"0.47",
|
||||
"2.37",
|
||||
"0",
|
||||
"0",
|
||||
),
|
||||
(
|
||||
"doubao-seed-2-0-lite",
|
||||
"Doubao Seed 2.0 Lite",
|
||||
@@ -1644,15 +1677,15 @@ impl Database {
|
||||
"DeepSeek V4 Flash",
|
||||
"0.14",
|
||||
"0.28",
|
||||
"0.028",
|
||||
"0.0028",
|
||||
"0",
|
||||
),
|
||||
(
|
||||
"deepseek-v4-pro",
|
||||
"DeepSeek V4 Pro",
|
||||
"1.68",
|
||||
"3.36",
|
||||
"0.14",
|
||||
"0.435",
|
||||
"0.87",
|
||||
"0.003625",
|
||||
"0",
|
||||
),
|
||||
// Kimi (月之暗面)
|
||||
@@ -1714,8 +1747,8 @@ impl Database {
|
||||
// GLM (智谱)
|
||||
("glm-4.7", "GLM-4.7", "0.39", "1.75", "0.04", "0"),
|
||||
("glm-4.6", "GLM-4.6", "0.28", "1.11", "0.03", "0"),
|
||||
("glm-5", "GLM-5", "0.72", "2.30", "0", "0"),
|
||||
("glm-5.1", "GLM-5.1", "0.95", "3.15", "0", "0"),
|
||||
("glm-5", "GLM-5", "1", "3.2", "0.2", "0"),
|
||||
("glm-5.1", "GLM-5.1", "1.4", "4.4", "0.26", "0"),
|
||||
// MiMo (小米)
|
||||
(
|
||||
"mimo-v2-flash",
|
||||
@@ -1726,6 +1759,8 @@ impl Database {
|
||||
"0",
|
||||
),
|
||||
("mimo-v2-pro", "MiMo V2 Pro", "1", "3", "0", "0"),
|
||||
("mimo-v2.5", "MiMo V2.5", "0.09", "0.29", "0.009", "0"),
|
||||
("mimo-v2.5-pro", "MiMo V2.5 Pro", "1", "3", "0", "0"),
|
||||
// Qwen 系列 (阿里巴巴)
|
||||
("qwen3.6-plus", "Qwen3.6 Plus", "0.325", "1.95", "0", "0"),
|
||||
("qwen3.5-plus", "Qwen3.5 Plus", "0.26", "1.56", "0", "0"),
|
||||
@@ -1746,6 +1781,22 @@ impl Database {
|
||||
"0",
|
||||
"0",
|
||||
),
|
||||
(
|
||||
"qwen3-coder-480b",
|
||||
"Qwen3 Coder 480B",
|
||||
"0.65",
|
||||
"3.25",
|
||||
"0",
|
||||
"0",
|
||||
),
|
||||
(
|
||||
"qwen3-coder-480b-a35b-instruct",
|
||||
"Qwen3 Coder 480B-A35B Instruct",
|
||||
"0.65",
|
||||
"3.25",
|
||||
"0",
|
||||
"0",
|
||||
),
|
||||
(
|
||||
"qwen3-coder-flash",
|
||||
"Qwen3 Coder Flash",
|
||||
@@ -1801,12 +1852,13 @@ impl Database {
|
||||
("grok-4", "Grok 4", "3", "15", "0.75", "0"),
|
||||
(
|
||||
"grok-code-fast-1",
|
||||
"Grok Code Fast",
|
||||
"Grok Build 0.1 (Code Fast Alias)",
|
||||
"1",
|
||||
"2",
|
||||
"0.20",
|
||||
"1.50",
|
||||
"0.02",
|
||||
"0",
|
||||
),
|
||||
("grok-build-0.1", "Grok Build 0.1", "1", "2", "0.20", "0"),
|
||||
("grok-3", "Grok 3", "3", "15", "0.75", "0"),
|
||||
("grok-3-mini", "Grok 3 Mini", "0.25", "0.50", "0.075", "0"),
|
||||
// Mistral 系列
|
||||
@@ -1898,6 +1950,96 @@ impl Database {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn repair_current_model_pricing(conn: &Connection) -> Result<(), AppError> {
|
||||
let pricing_fixes = [
|
||||
(
|
||||
"deepseek-v4-flash",
|
||||
"DeepSeek V4 Flash",
|
||||
"0.14",
|
||||
"0.28",
|
||||
"0.0028",
|
||||
"0",
|
||||
"0.14",
|
||||
"0.28",
|
||||
"0.028",
|
||||
"0",
|
||||
),
|
||||
(
|
||||
"deepseek-v4-pro",
|
||||
"DeepSeek V4 Pro",
|
||||
"0.435",
|
||||
"0.87",
|
||||
"0.003625",
|
||||
"0",
|
||||
"1.68",
|
||||
"3.36",
|
||||
"0.14",
|
||||
"0",
|
||||
),
|
||||
(
|
||||
"glm-5", "GLM-5", "1", "3.2", "0.2", "0", "0.72", "2.30", "0", "0",
|
||||
),
|
||||
(
|
||||
"glm-5.1", "GLM-5.1", "1.4", "4.4", "0.26", "0", "0.95", "3.15", "0", "0",
|
||||
),
|
||||
(
|
||||
"grok-code-fast-1",
|
||||
"Grok Build 0.1 (Code Fast Alias)",
|
||||
"1",
|
||||
"2",
|
||||
"0.20",
|
||||
"0",
|
||||
"0.20",
|
||||
"1.50",
|
||||
"0.02",
|
||||
"0",
|
||||
),
|
||||
];
|
||||
|
||||
for (
|
||||
model_id,
|
||||
display_name,
|
||||
input,
|
||||
output,
|
||||
cache_read,
|
||||
cache_creation,
|
||||
old_input,
|
||||
old_output,
|
||||
old_cache_read,
|
||||
old_cache_creation,
|
||||
) in pricing_fixes
|
||||
{
|
||||
conn.execute(
|
||||
"UPDATE model_pricing SET
|
||||
display_name = ?2,
|
||||
input_cost_per_million = ?3,
|
||||
output_cost_per_million = ?4,
|
||||
cache_read_cost_per_million = ?5,
|
||||
cache_creation_cost_per_million = ?6
|
||||
WHERE model_id = ?1
|
||||
AND input_cost_per_million = ?7
|
||||
AND output_cost_per_million = ?8
|
||||
AND cache_read_cost_per_million = ?9
|
||||
AND cache_creation_cost_per_million = ?10",
|
||||
rusqlite::params![
|
||||
model_id,
|
||||
display_name,
|
||||
input,
|
||||
output,
|
||||
cache_read,
|
||||
cache_creation,
|
||||
old_input,
|
||||
old_output,
|
||||
old_cache_read,
|
||||
old_cache_creation
|
||||
],
|
||||
)
|
||||
.map_err(|e| AppError::Database(format!("修复模型 {model_id} 定价失败: {e}")))?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// 确保模型定价表具备默认数据
|
||||
pub fn ensure_model_pricing_seeded(&self) -> Result<(), AppError> {
|
||||
let conn = lock_conn!(self.conn);
|
||||
@@ -1905,8 +2047,9 @@ impl Database {
|
||||
}
|
||||
|
||||
fn ensure_model_pricing_seeded_on_conn(conn: &Connection) -> Result<(), AppError> {
|
||||
// 每次启动都执行 INSERT OR IGNORE,增量追加新模型,已有数据不覆盖
|
||||
Self::seed_model_pricing(conn)
|
||||
// 每次启动都执行 INSERT OR IGNORE,增量追加新模型;仅修复仍等于旧内置值的定价。
|
||||
Self::seed_model_pricing(conn)?;
|
||||
Self::repair_current_model_pricing(conn)
|
||||
}
|
||||
|
||||
// --- 辅助方法 ---
|
||||
|
||||
@@ -662,6 +662,66 @@ fn schema_model_pricing_is_seeded_on_init() {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn model_pricing_seed_repairs_known_outdated_builtin_prices() {
|
||||
let db = Database::memory().expect("create memory db");
|
||||
|
||||
{
|
||||
let conn = db.conn.lock().expect("lock conn");
|
||||
conn.execute(
|
||||
"UPDATE model_pricing
|
||||
SET input_cost_per_million = '1.68',
|
||||
output_cost_per_million = '3.36',
|
||||
cache_read_cost_per_million = '0.14',
|
||||
cache_creation_cost_per_million = '0'
|
||||
WHERE model_id = 'deepseek-v4-pro'",
|
||||
[],
|
||||
)
|
||||
.expect("restore old DeepSeek price");
|
||||
conn.execute(
|
||||
"UPDATE model_pricing
|
||||
SET input_cost_per_million = '9',
|
||||
output_cost_per_million = '9',
|
||||
cache_read_cost_per_million = '9',
|
||||
cache_creation_cost_per_million = '0'
|
||||
WHERE model_id = 'glm-5.1'",
|
||||
[],
|
||||
)
|
||||
.expect("set custom GLM price");
|
||||
}
|
||||
|
||||
db.ensure_model_pricing_seeded()
|
||||
.expect("ensure pricing seeded");
|
||||
|
||||
let conn = db.conn.lock().expect("lock conn");
|
||||
let deepseek: (String, String, String) = conn
|
||||
.query_row(
|
||||
"SELECT input_cost_per_million, output_cost_per_million, cache_read_cost_per_million
|
||||
FROM model_pricing WHERE model_id = 'deepseek-v4-pro'",
|
||||
[],
|
||||
|row| Ok((row.get(0)?, row.get(1)?, row.get(2)?)),
|
||||
)
|
||||
.expect("query DeepSeek price");
|
||||
assert_eq!(
|
||||
deepseek,
|
||||
(
|
||||
"0.435".to_string(),
|
||||
"0.87".to_string(),
|
||||
"0.003625".to_string()
|
||||
)
|
||||
);
|
||||
|
||||
let glm: (String, String, String) = conn
|
||||
.query_row(
|
||||
"SELECT input_cost_per_million, output_cost_per_million, cache_read_cost_per_million
|
||||
FROM model_pricing WHERE model_id = 'glm-5.1'",
|
||||
[],
|
||||
|row| Ok((row.get(0)?, row.get(1)?, row.get(2)?)),
|
||||
)
|
||||
.expect("query GLM price");
|
||||
assert_eq!(glm, ("9".to_string(), "9".to_string(), "9".to_string()));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn ensure_incremental_auto_vacuum_rebuilds_existing_file_db() {
|
||||
let temp = NamedTempFile::new().expect("create temp db file");
|
||||
|
||||
@@ -380,7 +380,7 @@ mod tests {
|
||||
# Comment line
|
||||
GOOGLE_GEMINI_BASE_URL=https://example.com
|
||||
GEMINI_API_KEY=sk-test123
|
||||
GEMINI_MODEL=gemini-3-pro-preview
|
||||
GEMINI_MODEL=gemini-3.5-flash
|
||||
|
||||
# Another comment
|
||||
"#;
|
||||
@@ -395,7 +395,7 @@ GEMINI_MODEL=gemini-3-pro-preview
|
||||
assert_eq!(map.get("GEMINI_API_KEY"), Some(&"sk-test123".to_string()));
|
||||
assert_eq!(
|
||||
map.get("GEMINI_MODEL"),
|
||||
Some(&"gemini-3-pro-preview".to_string())
|
||||
Some(&"gemini-3.5-flash".to_string())
|
||||
);
|
||||
}
|
||||
|
||||
@@ -403,15 +403,12 @@ GEMINI_MODEL=gemini-3-pro-preview
|
||||
fn test_serialize_env_file() {
|
||||
let mut map = HashMap::new();
|
||||
map.insert("GEMINI_API_KEY".to_string(), "sk-test".to_string());
|
||||
map.insert(
|
||||
"GEMINI_MODEL".to_string(),
|
||||
"gemini-3-pro-preview".to_string(),
|
||||
);
|
||||
map.insert("GEMINI_MODEL".to_string(), "gemini-3.5-flash".to_string());
|
||||
|
||||
let content = serialize_env_file(&map);
|
||||
|
||||
assert!(content.contains("GEMINI_API_KEY=sk-test"));
|
||||
assert!(content.contains("GEMINI_MODEL=gemini-3-pro-preview"));
|
||||
assert!(content.contains("GEMINI_MODEL=gemini-3.5-flash"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -435,7 +432,7 @@ GEMINI_MODEL=gemini-3-pro-preview
|
||||
# Comment line
|
||||
GOOGLE_GEMINI_BASE_URL=https://example.com
|
||||
GEMINI_API_KEY=sk-test123
|
||||
GEMINI_MODEL=gemini-3-pro-preview
|
||||
GEMINI_MODEL=gemini-3.5-flash
|
||||
|
||||
# Another comment
|
||||
"#;
|
||||
@@ -452,7 +449,7 @@ GEMINI_MODEL=gemini-3-pro-preview
|
||||
assert_eq!(map.get("GEMINI_API_KEY"), Some(&"sk-test123".to_string()));
|
||||
assert_eq!(
|
||||
map.get("GEMINI_MODEL"),
|
||||
Some(&"gemini-3-pro-preview".to_string())
|
||||
Some(&"gemini-3.5-flash".to_string())
|
||||
);
|
||||
}
|
||||
|
||||
@@ -619,7 +616,7 @@ KEY_WITH-DASH=value";
|
||||
let settings = serde_json::json!({
|
||||
"env": {
|
||||
"GEMINI_API_KEY": "sk-test123",
|
||||
"GEMINI_MODEL": "gemini-3-pro-preview"
|
||||
"GEMINI_MODEL": "gemini-3.5-flash"
|
||||
}
|
||||
});
|
||||
|
||||
@@ -632,7 +629,7 @@ KEY_WITH-DASH=value";
|
||||
// 测试缺少 API Key 的非空配置在基本验证中可以通过(用户稍后填写)
|
||||
let settings = serde_json::json!({
|
||||
"env": {
|
||||
"GEMINI_MODEL": "gemini-3-pro-preview"
|
||||
"GEMINI_MODEL": "gemini-3.5-flash"
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -58,8 +58,8 @@ impl Default for StreamCheckConfig {
|
||||
max_retries: 2,
|
||||
degraded_threshold_ms: 6000,
|
||||
claude_model: "claude-haiku-4-5-20251001".to_string(),
|
||||
codex_model: "gpt-5.4@low".to_string(),
|
||||
gemini_model: "gemini-3-flash-preview".to_string(),
|
||||
codex_model: "gpt-5.5@low".to_string(),
|
||||
gemini_model: "gemini-3.5-flash".to_string(),
|
||||
test_prompt: default_test_prompt(),
|
||||
}
|
||||
}
|
||||
@@ -1886,7 +1886,7 @@ mod tests {
|
||||
AuthStrategy::Bearer,
|
||||
"openai_chat",
|
||||
true,
|
||||
"gpt-5.4",
|
||||
"gpt-5.5",
|
||||
);
|
||||
|
||||
assert_eq!(url, "https://relay.example/v1/chat/completions");
|
||||
@@ -1899,7 +1899,7 @@ mod tests {
|
||||
AuthStrategy::GitHubCopilot,
|
||||
"openai_chat",
|
||||
false,
|
||||
"gpt-5.4",
|
||||
"gpt-5.5",
|
||||
);
|
||||
|
||||
assert_eq!(url, "https://api.githubcopilot.com/chat/completions");
|
||||
@@ -1912,7 +1912,7 @@ mod tests {
|
||||
AuthStrategy::GitHubCopilot,
|
||||
"openai_responses",
|
||||
false,
|
||||
"gpt-5.4",
|
||||
"gpt-5.5",
|
||||
);
|
||||
|
||||
assert_eq!(url, "https://api.githubcopilot.com/v1/responses");
|
||||
@@ -1925,7 +1925,7 @@ mod tests {
|
||||
AuthStrategy::Bearer,
|
||||
"openai_chat",
|
||||
false,
|
||||
"gpt-5.4",
|
||||
"gpt-5.5",
|
||||
);
|
||||
|
||||
assert_eq!(url, "https://example.com/v1/chat/completions");
|
||||
@@ -1938,7 +1938,7 @@ mod tests {
|
||||
AuthStrategy::Bearer,
|
||||
"openai_responses",
|
||||
false,
|
||||
"gpt-5.4",
|
||||
"gpt-5.5",
|
||||
);
|
||||
|
||||
assert_eq!(url, "https://example.com/v1/responses");
|
||||
@@ -2005,7 +2005,7 @@ mod tests {
|
||||
#[test]
|
||||
fn test_resolve_claude_stream_url_for_gemini_native_cloudflare_vertex_full_url() {
|
||||
let url = StreamCheckService::resolve_claude_stream_url(
|
||||
"https://gateway.ai.cloudflare.com/v1/account/gateway/google-vertex-ai/v1/projects/project/locations/us-central1/publishers/google/models/gemini-3.1-pro-preview:streamGenerateContent",
|
||||
"https://gateway.ai.cloudflare.com/v1/account/gateway/google-vertex-ai/v1/projects/project/locations/us-central1/publishers/google/models/gemini-3.5-flash:streamGenerateContent",
|
||||
AuthStrategy::Google,
|
||||
"gemini_native",
|
||||
true,
|
||||
@@ -2014,7 +2014,7 @@ mod tests {
|
||||
|
||||
assert_eq!(
|
||||
url,
|
||||
"https://gateway.ai.cloudflare.com/v1/account/gateway/google-vertex-ai/v1/projects/project/locations/us-central1/publishers/google/models/gemini-3.1-pro-preview:streamGenerateContent?alt=sse"
|
||||
"https://gateway.ai.cloudflare.com/v1/account/gateway/google-vertex-ai/v1/projects/project/locations/us-central1/publishers/google/models/gemini-3.5-flash:streamGenerateContent?alt=sse"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ export const GeminiCommonConfigModal: React.FC<
|
||||
value={draftValue}
|
||||
onChange={setDraftValue}
|
||||
placeholder={`{
|
||||
"GEMINI_MODEL": "gemini-3-pro-preview"
|
||||
"GEMINI_MODEL": "gemini-3.5-flash"
|
||||
}`}
|
||||
darkMode={isDarkMode}
|
||||
rows={16}
|
||||
|
||||
@@ -97,7 +97,7 @@ export const GeminiEnvSection: React.FC<GeminiEnvSectionProps> = ({
|
||||
onChange={handleChange}
|
||||
placeholder={`GOOGLE_GEMINI_BASE_URL=https://your-api-endpoint.com/
|
||||
GEMINI_API_KEY=sk-your-api-key-here
|
||||
GEMINI_MODEL=gemini-3-pro-preview`}
|
||||
GEMINI_MODEL=gemini-3.5-flash`}
|
||||
darkMode={isDarkMode}
|
||||
rows={6}
|
||||
showValidation={false}
|
||||
|
||||
@@ -185,7 +185,7 @@ export function GeminiFormFields({
|
||||
id="gemini-model"
|
||||
value={model}
|
||||
onChange={onModelChange}
|
||||
placeholder="gemini-3-pro-preview"
|
||||
placeholder="gemini-3.5-flash"
|
||||
fetchedModels={fetchedModels}
|
||||
isLoading={isFetchingModels}
|
||||
/>
|
||||
|
||||
@@ -24,7 +24,7 @@ export const GEMINI_DEFAULT_CONFIG = JSON.stringify(
|
||||
env: {
|
||||
GOOGLE_GEMINI_BASE_URL: "",
|
||||
GEMINI_API_KEY: "",
|
||||
GEMINI_MODEL: "gemini-3-pro-preview",
|
||||
GEMINI_MODEL: "gemini-3.5-flash",
|
||||
},
|
||||
},
|
||||
null,
|
||||
|
||||
@@ -146,7 +146,7 @@ export function UniversalProviderFormModal({
|
||||
// 计算 Codex 配置 JSON 预览
|
||||
const codexConfigJson = useMemo(() => {
|
||||
if (!codexEnabled) return null;
|
||||
const model = models.codex?.model || "gpt-5.4";
|
||||
const model = models.codex?.model || "gpt-5.5";
|
||||
const reasoningEffort = models.codex?.reasoningEffort || "high";
|
||||
// 确保 base_url 以 /v1 结尾(Codex 使用 OpenAI 兼容 API)
|
||||
const codexBaseUrl = baseUrl.endsWith("/v1")
|
||||
@@ -592,7 +592,7 @@ requires_openai_auth = true`;
|
||||
onChange={(e) =>
|
||||
updateModel("codex", "model", e.target.value)
|
||||
}
|
||||
placeholder="gpt-5.4"
|
||||
placeholder="gpt-5.5"
|
||||
/>
|
||||
</div>
|
||||
<div className="space-y-1">
|
||||
|
||||
@@ -24,8 +24,8 @@ export function ModelTestConfigPanel() {
|
||||
maxRetries: "2",
|
||||
degradedThresholdMs: "6000",
|
||||
claudeModel: "claude-haiku-4-5-20251001",
|
||||
codexModel: "gpt-5.4@low",
|
||||
geminiModel: "gemini-3-flash-preview",
|
||||
codexModel: "gpt-5.5@low",
|
||||
geminiModel: "gemini-3.5-flash",
|
||||
testPrompt: "Who are you?",
|
||||
});
|
||||
|
||||
|
||||
@@ -250,9 +250,9 @@ export const claudeDesktopProviderPresets: ClaudeDesktopProviderPreset[] = [
|
||||
mode: "proxy",
|
||||
apiFormat: "gemini_native",
|
||||
modelRoutes: brandedRoutes(
|
||||
"gemini-3.1-pro",
|
||||
"gemini-3.1-pro",
|
||||
"gemini-3-flash",
|
||||
"gemini-3.5-flash",
|
||||
"gemini-3.5-flash",
|
||||
"gemini-3.5-flash",
|
||||
),
|
||||
endpointCandidates: ["https://generativelanguage.googleapis.com"],
|
||||
icon: "gemini",
|
||||
@@ -284,7 +284,7 @@ export const claudeDesktopProviderPresets: ClaudeDesktopProviderPreset[] = [
|
||||
apiFormat: "openai_responses",
|
||||
providerType: "codex_oauth",
|
||||
requiresOAuth: true,
|
||||
modelRoutes: brandedRoutes("gpt-5.4", "gpt-5.4", "gpt-5.4-mini"),
|
||||
modelRoutes: brandedRoutes("gpt-5.5", "gpt-5.5", "gpt-5.4-mini"),
|
||||
icon: "openai",
|
||||
iconColor: "#000000",
|
||||
},
|
||||
@@ -327,7 +327,7 @@ export const claudeDesktopProviderPresets: ClaudeDesktopProviderPreset[] = [
|
||||
baseUrl: "https://open.bigmodel.cn/api/anthropic",
|
||||
mode: "proxy",
|
||||
apiFormat: "anthropic",
|
||||
modelRoutes: brandedRoutes("glm-5", "glm-5", "glm-5"),
|
||||
modelRoutes: brandedRoutes("glm-5.1", "glm-5.1", "glm-5.1"),
|
||||
icon: "zhipu",
|
||||
iconColor: "#0F62FE",
|
||||
},
|
||||
@@ -339,7 +339,7 @@ export const claudeDesktopProviderPresets: ClaudeDesktopProviderPreset[] = [
|
||||
baseUrl: "https://api.z.ai/api/anthropic",
|
||||
mode: "proxy",
|
||||
apiFormat: "anthropic",
|
||||
modelRoutes: brandedRoutes("glm-5", "glm-5", "glm-5"),
|
||||
modelRoutes: brandedRoutes("glm-5.1", "glm-5.1", "glm-5.1"),
|
||||
icon: "zhipu",
|
||||
iconColor: "#0F62FE",
|
||||
},
|
||||
@@ -447,9 +447,9 @@ export const claudeDesktopProviderPresets: ClaudeDesktopProviderPreset[] = [
|
||||
mode: "proxy",
|
||||
apiFormat: "anthropic",
|
||||
modelRoutes: brandedRoutes(
|
||||
"ZhipuAI/GLM-5",
|
||||
"ZhipuAI/GLM-5",
|
||||
"ZhipuAI/GLM-5",
|
||||
"ZhipuAI/GLM-5.1",
|
||||
"ZhipuAI/GLM-5.1",
|
||||
"ZhipuAI/GLM-5.1",
|
||||
),
|
||||
icon: "modelscope",
|
||||
iconColor: "#624AFF",
|
||||
@@ -920,9 +920,9 @@ export const claudeDesktopProviderPresets: ClaudeDesktopProviderPreset[] = [
|
||||
mode: "proxy",
|
||||
apiFormat: "anthropic",
|
||||
modelRoutes: brandedRoutes(
|
||||
"zai-org/glm-5",
|
||||
"zai-org/glm-5",
|
||||
"zai-org/glm-5",
|
||||
"zai-org/glm-5.1",
|
||||
"zai-org/glm-5.1",
|
||||
"zai-org/glm-5.1",
|
||||
),
|
||||
endpointCandidates: ["https://api.novita.ai/anthropic"],
|
||||
icon: "novita",
|
||||
|
||||
@@ -202,10 +202,10 @@ export const providerPresets: ProviderPreset[] = [
|
||||
env: {
|
||||
ANTHROPIC_BASE_URL: "https://generativelanguage.googleapis.com",
|
||||
ANTHROPIC_API_KEY: "",
|
||||
ANTHROPIC_MODEL: "gemini-3.1-pro",
|
||||
ANTHROPIC_DEFAULT_HAIKU_MODEL: "gemini-3-flash",
|
||||
ANTHROPIC_DEFAULT_SONNET_MODEL: "gemini-3.1-pro",
|
||||
ANTHROPIC_DEFAULT_OPUS_MODEL: "gemini-3.1-pro",
|
||||
ANTHROPIC_MODEL: "gemini-3.5-flash",
|
||||
ANTHROPIC_DEFAULT_HAIKU_MODEL: "gemini-3.5-flash",
|
||||
ANTHROPIC_DEFAULT_SONNET_MODEL: "gemini-3.5-flash",
|
||||
ANTHROPIC_DEFAULT_OPUS_MODEL: "gemini-3.5-flash",
|
||||
},
|
||||
},
|
||||
category: "third_party",
|
||||
@@ -260,10 +260,10 @@ export const providerPresets: ProviderPreset[] = [
|
||||
env: {
|
||||
ANTHROPIC_BASE_URL: "https://open.bigmodel.cn/api/anthropic",
|
||||
ANTHROPIC_AUTH_TOKEN: "",
|
||||
ANTHROPIC_MODEL: "glm-5",
|
||||
ANTHROPIC_DEFAULT_HAIKU_MODEL: "glm-5",
|
||||
ANTHROPIC_DEFAULT_SONNET_MODEL: "glm-5",
|
||||
ANTHROPIC_DEFAULT_OPUS_MODEL: "glm-5",
|
||||
ANTHROPIC_MODEL: "glm-5.1",
|
||||
ANTHROPIC_DEFAULT_HAIKU_MODEL: "glm-5.1",
|
||||
ANTHROPIC_DEFAULT_SONNET_MODEL: "glm-5.1",
|
||||
ANTHROPIC_DEFAULT_OPUS_MODEL: "glm-5.1",
|
||||
},
|
||||
},
|
||||
category: "cn_official",
|
||||
@@ -278,10 +278,10 @@ export const providerPresets: ProviderPreset[] = [
|
||||
env: {
|
||||
ANTHROPIC_BASE_URL: "https://api.z.ai/api/anthropic",
|
||||
ANTHROPIC_AUTH_TOKEN: "",
|
||||
ANTHROPIC_MODEL: "glm-5",
|
||||
ANTHROPIC_DEFAULT_HAIKU_MODEL: "glm-5",
|
||||
ANTHROPIC_DEFAULT_SONNET_MODEL: "glm-5",
|
||||
ANTHROPIC_DEFAULT_OPUS_MODEL: "glm-5",
|
||||
ANTHROPIC_MODEL: "glm-5.1",
|
||||
ANTHROPIC_DEFAULT_HAIKU_MODEL: "glm-5.1",
|
||||
ANTHROPIC_DEFAULT_SONNET_MODEL: "glm-5.1",
|
||||
ANTHROPIC_DEFAULT_OPUS_MODEL: "glm-5.1",
|
||||
},
|
||||
},
|
||||
category: "cn_official",
|
||||
@@ -410,10 +410,10 @@ export const providerPresets: ProviderPreset[] = [
|
||||
env: {
|
||||
ANTHROPIC_BASE_URL: "https://api-inference.modelscope.cn",
|
||||
ANTHROPIC_AUTH_TOKEN: "",
|
||||
ANTHROPIC_MODEL: "ZhipuAI/GLM-5",
|
||||
ANTHROPIC_DEFAULT_HAIKU_MODEL: "ZhipuAI/GLM-5",
|
||||
ANTHROPIC_DEFAULT_SONNET_MODEL: "ZhipuAI/GLM-5",
|
||||
ANTHROPIC_DEFAULT_OPUS_MODEL: "ZhipuAI/GLM-5",
|
||||
ANTHROPIC_MODEL: "ZhipuAI/GLM-5.1",
|
||||
ANTHROPIC_DEFAULT_HAIKU_MODEL: "ZhipuAI/GLM-5.1",
|
||||
ANTHROPIC_DEFAULT_SONNET_MODEL: "ZhipuAI/GLM-5.1",
|
||||
ANTHROPIC_DEFAULT_OPUS_MODEL: "ZhipuAI/GLM-5.1",
|
||||
},
|
||||
},
|
||||
category: "aggregator",
|
||||
@@ -1008,10 +1008,10 @@ export const providerPresets: ProviderPreset[] = [
|
||||
env: {
|
||||
ANTHROPIC_BASE_URL: "https://api.novita.ai/anthropic",
|
||||
ANTHROPIC_AUTH_TOKEN: "",
|
||||
ANTHROPIC_MODEL: "zai-org/glm-5",
|
||||
ANTHROPIC_DEFAULT_HAIKU_MODEL: "zai-org/glm-5",
|
||||
ANTHROPIC_DEFAULT_SONNET_MODEL: "zai-org/glm-5",
|
||||
ANTHROPIC_DEFAULT_OPUS_MODEL: "zai-org/glm-5",
|
||||
ANTHROPIC_MODEL: "zai-org/glm-5.1",
|
||||
ANTHROPIC_DEFAULT_HAIKU_MODEL: "zai-org/glm-5.1",
|
||||
ANTHROPIC_DEFAULT_SONNET_MODEL: "zai-org/glm-5.1",
|
||||
ANTHROPIC_DEFAULT_OPUS_MODEL: "zai-org/glm-5.1",
|
||||
},
|
||||
},
|
||||
category: "aggregator",
|
||||
@@ -1046,10 +1046,10 @@ export const providerPresets: ProviderPreset[] = [
|
||||
// base_url 由代理后端强制重写为 chatgpt.com/backend-api/codex
|
||||
// 用户无需配置
|
||||
ANTHROPIC_BASE_URL: "https://chatgpt.com/backend-api/codex",
|
||||
ANTHROPIC_MODEL: "gpt-5.4",
|
||||
ANTHROPIC_MODEL: "gpt-5.5",
|
||||
ANTHROPIC_DEFAULT_HAIKU_MODEL: "gpt-5.4-mini",
|
||||
ANTHROPIC_DEFAULT_SONNET_MODEL: "gpt-5.4",
|
||||
ANTHROPIC_DEFAULT_OPUS_MODEL: "gpt-5.4",
|
||||
ANTHROPIC_DEFAULT_SONNET_MODEL: "gpt-5.5",
|
||||
ANTHROPIC_DEFAULT_OPUS_MODEL: "gpt-5.5",
|
||||
},
|
||||
},
|
||||
category: "third_party",
|
||||
|
||||
@@ -52,7 +52,7 @@ export function generateThirdPartyAuth(apiKey: string): Record<string, any> {
|
||||
export function generateThirdPartyConfig(
|
||||
providerName: string,
|
||||
baseUrl: string,
|
||||
modelName = "gpt-5.4",
|
||||
modelName = "gpt-5.5",
|
||||
): string {
|
||||
const tomlString = (value: string) => JSON.stringify(value);
|
||||
|
||||
@@ -223,7 +223,7 @@ export const codexProviderPresets: CodexProviderPreset[] = [
|
||||
isOfficial: true,
|
||||
auth: generateThirdPartyAuth(""),
|
||||
config: `model_provider = "custom"
|
||||
model = "gpt-5.4"
|
||||
model = "gpt-5.5"
|
||||
model_reasoning_effort = "high"
|
||||
disable_response_storage = true
|
||||
|
||||
@@ -287,12 +287,12 @@ requires_openai_auth = true`,
|
||||
config: generateThirdPartyConfig(
|
||||
"zhipu_glm",
|
||||
"https://open.bigmodel.cn/api/paas/v4",
|
||||
"glm-5",
|
||||
"glm-5.1",
|
||||
),
|
||||
endpointCandidates: ["https://open.bigmodel.cn/api/paas/v4"],
|
||||
apiFormat: "openai_chat",
|
||||
modelCatalog: modelCatalog([
|
||||
{ model: "glm-5", displayName: "GLM-5", contextWindow: 200000 },
|
||||
{ model: "glm-5.1", displayName: "GLM-5.1", contextWindow: 200000 },
|
||||
]),
|
||||
codexChatReasoning: {
|
||||
supportsThinking: true,
|
||||
@@ -313,12 +313,12 @@ requires_openai_auth = true`,
|
||||
config: generateThirdPartyConfig(
|
||||
"zhipu_glm_en",
|
||||
"https://api.z.ai/api/paas/v4",
|
||||
"glm-5",
|
||||
"glm-5.1",
|
||||
),
|
||||
endpointCandidates: ["https://api.z.ai/api/paas/v4"],
|
||||
apiFormat: "openai_chat",
|
||||
modelCatalog: modelCatalog([
|
||||
{ model: "glm-5", displayName: "GLM-5", contextWindow: 200000 },
|
||||
{ model: "glm-5.1", displayName: "GLM-5.1", contextWindow: 200000 },
|
||||
]),
|
||||
codexChatReasoning: {
|
||||
supportsThinking: true,
|
||||
@@ -476,14 +476,14 @@ requires_openai_auth = true`,
|
||||
config: generateThirdPartyConfig(
|
||||
"modelscope",
|
||||
"https://api-inference.modelscope.cn/v1",
|
||||
"ZhipuAI/GLM-5",
|
||||
"ZhipuAI/GLM-5.1",
|
||||
),
|
||||
endpointCandidates: ["https://api-inference.modelscope.cn/v1"],
|
||||
apiFormat: "openai_chat",
|
||||
modelCatalog: modelCatalog([
|
||||
{
|
||||
model: "ZhipuAI/GLM-5",
|
||||
displayName: "ZhipuAI / GLM-5",
|
||||
model: "ZhipuAI/GLM-5.1",
|
||||
displayName: "ZhipuAI / GLM-5.1",
|
||||
contextWindow: 200000,
|
||||
},
|
||||
]),
|
||||
@@ -732,12 +732,16 @@ requires_openai_auth = true`,
|
||||
config: generateThirdPartyConfig(
|
||||
"novita",
|
||||
"https://api.novita.ai/openai/v1",
|
||||
"zai-org/glm-5",
|
||||
"zai-org/glm-5.1",
|
||||
),
|
||||
endpointCandidates: ["https://api.novita.ai/openai/v1"],
|
||||
apiFormat: "openai_chat",
|
||||
modelCatalog: modelCatalog([
|
||||
{ model: "zai-org/glm-5", displayName: "GLM-5", contextWindow: 202800 },
|
||||
{
|
||||
model: "zai-org/glm-5.1",
|
||||
displayName: "GLM-5.1",
|
||||
contextWindow: 202800,
|
||||
},
|
||||
]),
|
||||
codexChatReasoning: {
|
||||
supportsThinking: true,
|
||||
@@ -788,7 +792,7 @@ requires_openai_auth = true`,
|
||||
config: generateThirdPartyConfig(
|
||||
"aihubmix",
|
||||
"https://aihubmix.com/v1",
|
||||
"gpt-5.4",
|
||||
"gpt-5.5",
|
||||
),
|
||||
endpointCandidates: [
|
||||
"https://aihubmix.com/v1",
|
||||
@@ -803,7 +807,7 @@ requires_openai_auth = true`,
|
||||
config: generateThirdPartyConfig(
|
||||
"dmxapi",
|
||||
"https://www.dmxapi.cn/v1",
|
||||
"gpt-5.4",
|
||||
"gpt-5.5",
|
||||
),
|
||||
endpointCandidates: ["https://www.dmxapi.cn/v1"],
|
||||
isPartner: true, // 合作伙伴
|
||||
@@ -818,7 +822,7 @@ requires_openai_auth = true`,
|
||||
config: generateThirdPartyConfig(
|
||||
"packycode",
|
||||
"https://www.packyapi.com/v1",
|
||||
"gpt-5.4",
|
||||
"gpt-5.5",
|
||||
),
|
||||
endpointCandidates: [
|
||||
"https://www.packyapi.com/v1",
|
||||
@@ -976,7 +980,7 @@ requires_openai_auth = true`,
|
||||
config: generateThirdPartyConfig(
|
||||
"cubence",
|
||||
"https://api.cubence.com/v1",
|
||||
"gpt-5.4",
|
||||
"gpt-5.5",
|
||||
),
|
||||
endpointCandidates: [
|
||||
"https://api.cubence.com/v1",
|
||||
@@ -999,7 +1003,7 @@ requires_openai_auth = true`,
|
||||
config: generateThirdPartyConfig(
|
||||
"aigocode",
|
||||
"https://api.aigocode.com",
|
||||
"gpt-5.4",
|
||||
"gpt-5.5",
|
||||
),
|
||||
endpointCandidates: ["https://api.aigocode.com"],
|
||||
isPartner: true, // 合作伙伴
|
||||
@@ -1015,7 +1019,7 @@ requires_openai_auth = true`,
|
||||
config: generateThirdPartyConfig(
|
||||
"rightcode",
|
||||
"https://right.codes/codex/v1",
|
||||
"gpt-5.4",
|
||||
"gpt-5.5",
|
||||
),
|
||||
category: "third_party",
|
||||
isPartner: true,
|
||||
@@ -1031,7 +1035,7 @@ requires_openai_auth = true`,
|
||||
config: generateThirdPartyConfig(
|
||||
"aicodemirror",
|
||||
"https://api.aicodemirror.com/api/codex/backend-api/codex",
|
||||
"gpt-5.4",
|
||||
"gpt-5.5",
|
||||
),
|
||||
endpointCandidates: [
|
||||
"https://api.aicodemirror.com/api/codex/backend-api/codex",
|
||||
@@ -1050,7 +1054,7 @@ requires_openai_auth = true`,
|
||||
config: generateThirdPartyConfig(
|
||||
"crazyrouter",
|
||||
"https://cn.crazyrouter.com/v1",
|
||||
"gpt-5.4",
|
||||
"gpt-5.5",
|
||||
),
|
||||
endpointCandidates: ["https://cn.crazyrouter.com/v1"],
|
||||
isPartner: true,
|
||||
@@ -1066,7 +1070,7 @@ requires_openai_auth = true`,
|
||||
config: generateThirdPartyConfig(
|
||||
"sssaicode",
|
||||
"https://node-hk.sssaicode.com/api/v1",
|
||||
"gpt-5.4",
|
||||
"gpt-5.5",
|
||||
),
|
||||
endpointCandidates: [
|
||||
"https://node-hk.sssaicode.com/api/v1",
|
||||
@@ -1089,7 +1093,7 @@ requires_openai_auth = true`,
|
||||
config: generateThirdPartyConfig(
|
||||
"compshare",
|
||||
"https://api.modelverse.cn/v1",
|
||||
"gpt-5.4",
|
||||
"gpt-5.5",
|
||||
),
|
||||
endpointCandidates: ["https://api.modelverse.cn/v1"],
|
||||
category: "aggregator",
|
||||
@@ -1108,7 +1112,7 @@ requires_openai_auth = true`,
|
||||
config: generateThirdPartyConfig(
|
||||
"compshare_coding",
|
||||
"https://cp.compshare.cn/v1",
|
||||
"gpt-5.4",
|
||||
"gpt-5.5",
|
||||
),
|
||||
endpointCandidates: ["https://cp.compshare.cn/v1"],
|
||||
category: "aggregator",
|
||||
@@ -1125,7 +1129,7 @@ requires_openai_auth = true`,
|
||||
config: generateThirdPartyConfig(
|
||||
"micu",
|
||||
"https://www.micuapi.ai/v1",
|
||||
"gpt-5.4",
|
||||
"gpt-5.5",
|
||||
),
|
||||
endpointCandidates: ["https://www.micuapi.ai/v1"],
|
||||
category: "third_party",
|
||||
@@ -1142,7 +1146,7 @@ requires_openai_auth = true`,
|
||||
config: generateThirdPartyConfig(
|
||||
"ctok",
|
||||
"https://api.ctok.ai/v1",
|
||||
"gpt-5.4",
|
||||
"gpt-5.5",
|
||||
),
|
||||
endpointCandidates: ["https://api.ctok.ai/v1"],
|
||||
category: "third_party",
|
||||
@@ -1159,7 +1163,7 @@ requires_openai_auth = true`,
|
||||
OPENAI_API_KEY: "",
|
||||
},
|
||||
config: `model_provider = "custom"
|
||||
model = "gpt-5.4"
|
||||
model = "gpt-5.5"
|
||||
model_reasoning_effort = "high"
|
||||
disable_response_storage = true
|
||||
personality = "pragmatic"
|
||||
@@ -1185,7 +1189,7 @@ model_auto_compact_token_limit = 9000000`,
|
||||
config: generateThirdPartyConfig(
|
||||
"lemondata",
|
||||
"https://api.lemondata.cc/v1",
|
||||
"gpt-5.4",
|
||||
"gpt-5.5",
|
||||
),
|
||||
endpointCandidates: ["https://api.lemondata.cc/v1"],
|
||||
isPartner: true,
|
||||
@@ -1200,7 +1204,7 @@ model_auto_compact_token_limit = 9000000`,
|
||||
OPENAI_API_KEY: "",
|
||||
},
|
||||
config: `model_provider = "custom"
|
||||
model = "gpt-5.4"
|
||||
model = "gpt-5.5"
|
||||
model_reasoning_effort = "medium"
|
||||
disable_response_storage = true
|
||||
|
||||
@@ -1221,7 +1225,7 @@ base_url = "https://cc-api.pipellm.ai/v1"`,
|
||||
config: generateThirdPartyConfig(
|
||||
"openrouter",
|
||||
"https://openrouter.ai/api/v1",
|
||||
"gpt-5.4",
|
||||
"gpt-5.5",
|
||||
),
|
||||
category: "aggregator",
|
||||
icon: "openrouter",
|
||||
|
||||
@@ -14,7 +14,7 @@ export interface CodexTemplate {
|
||||
*/
|
||||
export function getCodexCustomTemplate(): CodexTemplate {
|
||||
const config = `model_provider = "custom"
|
||||
model = "gpt-5.4"
|
||||
model = "gpt-5.5"
|
||||
model_reasoning_effort = "high"
|
||||
disable_response_storage = true
|
||||
|
||||
|
||||
@@ -58,11 +58,11 @@ export const geminiProviderPresets: GeminiProviderPreset[] = [
|
||||
settingsConfig: {
|
||||
env: {
|
||||
GOOGLE_GEMINI_BASE_URL: "https://router.shengsuanyun.com/api",
|
||||
GEMINI_MODEL: "google/gemini-3.1-pro-preview",
|
||||
GEMINI_MODEL: "google/gemini-3.5-flash",
|
||||
},
|
||||
},
|
||||
baseURL: "https://router.shengsuanyun.com/api",
|
||||
model: "google/gemini-3.1-pro-preview",
|
||||
model: "google/gemini-3.5-flash",
|
||||
description: "Shengsuanyun",
|
||||
category: "aggregator",
|
||||
isPartner: true,
|
||||
@@ -76,11 +76,11 @@ export const geminiProviderPresets: GeminiProviderPreset[] = [
|
||||
settingsConfig: {
|
||||
env: {
|
||||
GOOGLE_GEMINI_BASE_URL: "https://www.packyapi.com",
|
||||
GEMINI_MODEL: "gemini-3.1-pro",
|
||||
GEMINI_MODEL: "gemini-3.5-flash",
|
||||
},
|
||||
},
|
||||
baseURL: "https://www.packyapi.com",
|
||||
model: "gemini-3.1-pro",
|
||||
model: "gemini-3.5-flash",
|
||||
description: "PackyCode",
|
||||
category: "third_party",
|
||||
isPartner: true,
|
||||
@@ -99,11 +99,11 @@ export const geminiProviderPresets: GeminiProviderPreset[] = [
|
||||
env: {
|
||||
GOOGLE_GEMINI_BASE_URL: "https://api.apikey.fun",
|
||||
GEMINI_API_KEY: "",
|
||||
GEMINI_MODEL: "gemini-3-pro-preview",
|
||||
GEMINI_MODEL: "gemini-3.5-flash",
|
||||
},
|
||||
},
|
||||
baseURL: "https://api.apikey.fun",
|
||||
model: "gemini-3-pro-preview",
|
||||
model: "gemini-3.5-flash",
|
||||
description: "APIKEY.FUN",
|
||||
category: "third_party",
|
||||
isPartner: true,
|
||||
@@ -119,11 +119,11 @@ export const geminiProviderPresets: GeminiProviderPreset[] = [
|
||||
env: {
|
||||
GOOGLE_GEMINI_BASE_URL: "https://apinebula.com",
|
||||
GEMINI_API_KEY: "",
|
||||
GEMINI_MODEL: "gemini-3-pro-preview",
|
||||
GEMINI_MODEL: "gemini-3.5-flash",
|
||||
},
|
||||
},
|
||||
baseURL: "https://apinebula.com",
|
||||
model: "gemini-3-pro-preview",
|
||||
model: "gemini-3.5-flash",
|
||||
description: "APINebula",
|
||||
category: "third_party",
|
||||
isPartner: true,
|
||||
@@ -139,11 +139,11 @@ export const geminiProviderPresets: GeminiProviderPreset[] = [
|
||||
env: {
|
||||
GOOGLE_GEMINI_BASE_URL: "https://sudocode.us",
|
||||
GEMINI_API_KEY: "",
|
||||
GEMINI_MODEL: "gemini-3.1-flash-lite-preview",
|
||||
GEMINI_MODEL: "gemini-3.1-flash-lite",
|
||||
},
|
||||
},
|
||||
baseURL: "https://sudocode.us",
|
||||
model: "gemini-3.1-flash-lite-preview",
|
||||
model: "gemini-3.1-flash-lite",
|
||||
description: "SudoCode",
|
||||
category: "third_party",
|
||||
isPartner: true,
|
||||
@@ -158,11 +158,11 @@ export const geminiProviderPresets: GeminiProviderPreset[] = [
|
||||
settingsConfig: {
|
||||
env: {
|
||||
GOOGLE_GEMINI_BASE_URL: "https://api.cubence.com",
|
||||
GEMINI_MODEL: "gemini-3.1-pro",
|
||||
GEMINI_MODEL: "gemini-3.5-flash",
|
||||
},
|
||||
},
|
||||
baseURL: "https://api.cubence.com",
|
||||
model: "gemini-3.1-pro",
|
||||
model: "gemini-3.5-flash",
|
||||
description: "Cubence",
|
||||
category: "third_party",
|
||||
isPartner: true,
|
||||
@@ -183,11 +183,11 @@ export const geminiProviderPresets: GeminiProviderPreset[] = [
|
||||
settingsConfig: {
|
||||
env: {
|
||||
GOOGLE_GEMINI_BASE_URL: "https://api.aigocode.com",
|
||||
GEMINI_MODEL: "gemini-3.1-pro",
|
||||
GEMINI_MODEL: "gemini-3.5-flash",
|
||||
},
|
||||
},
|
||||
baseURL: "https://api.aigocode.com",
|
||||
model: "gemini-3.1-pro",
|
||||
model: "gemini-3.5-flash",
|
||||
description: "AIGoCode",
|
||||
category: "third_party",
|
||||
isPartner: true,
|
||||
@@ -203,11 +203,11 @@ export const geminiProviderPresets: GeminiProviderPreset[] = [
|
||||
settingsConfig: {
|
||||
env: {
|
||||
GOOGLE_GEMINI_BASE_URL: "https://api.aicodemirror.com/api/gemini",
|
||||
GEMINI_MODEL: "gemini-3.1-pro",
|
||||
GEMINI_MODEL: "gemini-3.5-flash",
|
||||
},
|
||||
},
|
||||
baseURL: "https://api.aicodemirror.com/api/gemini",
|
||||
model: "gemini-3.1-pro",
|
||||
model: "gemini-3.5-flash",
|
||||
description: "AICodeMirror",
|
||||
category: "third_party",
|
||||
isPartner: true,
|
||||
@@ -226,11 +226,11 @@ export const geminiProviderPresets: GeminiProviderPreset[] = [
|
||||
settingsConfig: {
|
||||
env: {
|
||||
GOOGLE_GEMINI_BASE_URL: "https://cn.crazyrouter.com",
|
||||
GEMINI_MODEL: "gemini-3.1-pro",
|
||||
GEMINI_MODEL: "gemini-3.5-flash",
|
||||
},
|
||||
},
|
||||
baseURL: "https://cn.crazyrouter.com",
|
||||
model: "gemini-3.1-pro",
|
||||
model: "gemini-3.5-flash",
|
||||
description: "CrazyRouter",
|
||||
category: "third_party",
|
||||
isPartner: true,
|
||||
@@ -246,11 +246,11 @@ export const geminiProviderPresets: GeminiProviderPreset[] = [
|
||||
settingsConfig: {
|
||||
env: {
|
||||
GOOGLE_GEMINI_BASE_URL: "https://node-hk.sssaicode.com/api",
|
||||
GEMINI_MODEL: "gemini-3.1-pro",
|
||||
GEMINI_MODEL: "gemini-3.5-flash",
|
||||
},
|
||||
},
|
||||
baseURL: "https://node-hk.sssaicode.com/api",
|
||||
model: "gemini-3.1-pro",
|
||||
model: "gemini-3.5-flash",
|
||||
description: "SSSAiCode",
|
||||
category: "third_party",
|
||||
isPartner: true,
|
||||
@@ -270,11 +270,11 @@ export const geminiProviderPresets: GeminiProviderPreset[] = [
|
||||
settingsConfig: {
|
||||
env: {
|
||||
GOOGLE_GEMINI_BASE_URL: "https://api.ctok.ai/v1beta",
|
||||
GEMINI_MODEL: "gemini-3.1-pro",
|
||||
GEMINI_MODEL: "gemini-3.5-flash",
|
||||
},
|
||||
},
|
||||
baseURL: "https://api.ctok.ai/v1beta",
|
||||
model: "gemini-3.1-pro",
|
||||
model: "gemini-3.5-flash",
|
||||
description: "CTok",
|
||||
category: "third_party",
|
||||
isPartner: true,
|
||||
@@ -291,7 +291,7 @@ export const geminiProviderPresets: GeminiProviderPreset[] = [
|
||||
env: {
|
||||
GOOGLE_GEMINI_BASE_URL: "https://e-flowcode.cc",
|
||||
GEMINI_API_KEY: "",
|
||||
GEMINI_MODEL: "gemini-3.1-pro-preview",
|
||||
GEMINI_MODEL: "gemini-3.5-flash",
|
||||
},
|
||||
config: {
|
||||
general: {
|
||||
@@ -311,7 +311,7 @@ export const geminiProviderPresets: GeminiProviderPreset[] = [
|
||||
},
|
||||
},
|
||||
baseURL: "https://e-flowcode.cc",
|
||||
model: "gemini-3.1-pro-preview",
|
||||
model: "gemini-3.5-flash",
|
||||
description: "E-FlowCode",
|
||||
category: "third_party",
|
||||
endpointCandidates: ["https://e-flowcode.cc"],
|
||||
@@ -325,11 +325,11 @@ export const geminiProviderPresets: GeminiProviderPreset[] = [
|
||||
settingsConfig: {
|
||||
env: {
|
||||
GOOGLE_GEMINI_BASE_URL: "https://api.lemondata.cc",
|
||||
GEMINI_MODEL: "gemini-3.1-pro",
|
||||
GEMINI_MODEL: "gemini-3.5-flash",
|
||||
},
|
||||
},
|
||||
baseURL: "https://api.lemondata.cc",
|
||||
model: "gemini-3.1-pro",
|
||||
model: "gemini-3.5-flash",
|
||||
description: "LemonData",
|
||||
category: "third_party",
|
||||
isPartner: true,
|
||||
@@ -344,11 +344,11 @@ export const geminiProviderPresets: GeminiProviderPreset[] = [
|
||||
settingsConfig: {
|
||||
env: {
|
||||
GOOGLE_GEMINI_BASE_URL: "https://openrouter.ai/api",
|
||||
GEMINI_MODEL: "gemini-3.1-pro",
|
||||
GEMINI_MODEL: "gemini-3.5-flash",
|
||||
},
|
||||
},
|
||||
baseURL: "https://openrouter.ai/api",
|
||||
model: "gemini-3.1-pro",
|
||||
model: "gemini-3.5-flash",
|
||||
description: "OpenRouter",
|
||||
category: "aggregator",
|
||||
icon: "openrouter",
|
||||
@@ -361,11 +361,11 @@ export const geminiProviderPresets: GeminiProviderPreset[] = [
|
||||
settingsConfig: {
|
||||
env: {
|
||||
GOOGLE_GEMINI_BASE_URL: "https://api.therouter.ai",
|
||||
GEMINI_MODEL: "gemini-3.1-pro",
|
||||
GEMINI_MODEL: "gemini-3.5-flash",
|
||||
},
|
||||
},
|
||||
baseURL: "https://api.therouter.ai",
|
||||
model: "gemini-3.1-pro",
|
||||
model: "gemini-3.5-flash",
|
||||
description: "TheRouter",
|
||||
category: "aggregator",
|
||||
endpointCandidates: ["https://api.therouter.ai"],
|
||||
@@ -376,10 +376,10 @@ export const geminiProviderPresets: GeminiProviderPreset[] = [
|
||||
settingsConfig: {
|
||||
env: {
|
||||
GOOGLE_GEMINI_BASE_URL: "",
|
||||
GEMINI_MODEL: "gemini-3.1-pro",
|
||||
GEMINI_MODEL: "gemini-3.5-flash",
|
||||
},
|
||||
},
|
||||
model: "gemini-3.1-pro",
|
||||
model: "gemini-3.5-flash",
|
||||
description: "自定义 Gemini API 端点",
|
||||
category: "custom",
|
||||
},
|
||||
|
||||
@@ -138,7 +138,7 @@ export const hermesProviderPresets: HermesProviderPreset[] = [
|
||||
base_url: "https://router.shengsuanyun.com/api/v1",
|
||||
api_key: "",
|
||||
api_mode: "chat_completions",
|
||||
models: [{ id: "openai/gpt-5.4", name: "GPT-5.4" }],
|
||||
models: [{ id: "openai/gpt-5.5", name: "GPT-5.5" }],
|
||||
},
|
||||
category: "aggregator",
|
||||
isPartner: true,
|
||||
@@ -265,13 +265,13 @@ export const hermesProviderPresets: HermesProviderPreset[] = [
|
||||
context_length: 200000,
|
||||
},
|
||||
{
|
||||
id: "openai/gpt-5.4",
|
||||
name: "GPT-5.4",
|
||||
id: "openai/gpt-5.5",
|
||||
name: "GPT-5.5",
|
||||
context_length: 400000,
|
||||
},
|
||||
{
|
||||
id: "google/gemini-3-pro",
|
||||
name: "Gemini 3 Pro",
|
||||
id: "google/gemini-3.5-flash",
|
||||
name: "Gemini 3.5 Flash",
|
||||
context_length: 1000000,
|
||||
},
|
||||
],
|
||||
@@ -396,13 +396,13 @@ export const hermesProviderPresets: HermesProviderPreset[] = [
|
||||
base_url: "https://open.bigmodel.cn/api/paas/v4",
|
||||
api_key: "",
|
||||
api_mode: "chat_completions",
|
||||
models: [{ id: "glm-5", name: "GLM-5" }],
|
||||
models: [{ id: "glm-5.1", name: "GLM-5.1" }],
|
||||
},
|
||||
category: "cn_official",
|
||||
icon: "zhipu",
|
||||
iconColor: "#0F62FE",
|
||||
suggestedDefaults: {
|
||||
model: { default: "glm-5", provider: "zhipu_glm" },
|
||||
model: { default: "glm-5.1", provider: "zhipu_glm" },
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -414,13 +414,13 @@ export const hermesProviderPresets: HermesProviderPreset[] = [
|
||||
base_url: "https://api.z.ai/api/paas/v4",
|
||||
api_key: "",
|
||||
api_mode: "chat_completions",
|
||||
models: [{ id: "glm-5", name: "GLM-5" }],
|
||||
models: [{ id: "glm-5.1", name: "GLM-5.1" }],
|
||||
},
|
||||
category: "cn_official",
|
||||
icon: "zhipu",
|
||||
iconColor: "#0F62FE",
|
||||
suggestedDefaults: {
|
||||
model: { default: "glm-5", provider: "zhipu_glm_en" },
|
||||
model: { default: "glm-5.1", provider: "zhipu_glm_en" },
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -523,13 +523,13 @@ export const hermesProviderPresets: HermesProviderPreset[] = [
|
||||
base_url: "https://api-inference.modelscope.cn/v1",
|
||||
api_key: "",
|
||||
api_mode: "chat_completions",
|
||||
models: [{ id: "ZhipuAI/GLM-5", name: "ZhipuAI / GLM-5" }],
|
||||
models: [{ id: "ZhipuAI/GLM-5.1", name: "ZhipuAI / GLM-5.1" }],
|
||||
},
|
||||
category: "aggregator",
|
||||
icon: "modelscope",
|
||||
iconColor: "#624AFF",
|
||||
suggestedDefaults: {
|
||||
model: { default: "ZhipuAI/GLM-5", provider: "modelscope" },
|
||||
model: { default: "ZhipuAI/GLM-5.1", provider: "modelscope" },
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -645,13 +645,13 @@ export const hermesProviderPresets: HermesProviderPreset[] = [
|
||||
base_url: "https://aihubmix.com/v1",
|
||||
api_key: "",
|
||||
api_mode: "chat_completions",
|
||||
models: [{ id: "gpt-5.4", name: "GPT-5.4" }],
|
||||
models: [{ id: "gpt-5.5", name: "GPT-5.5" }],
|
||||
},
|
||||
category: "aggregator",
|
||||
icon: "aihubmix",
|
||||
iconColor: "#006FFB",
|
||||
suggestedDefaults: {
|
||||
model: { default: "gpt-5.4", provider: "aihubmix" },
|
||||
model: { default: "gpt-5.5", provider: "aihubmix" },
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -714,13 +714,13 @@ export const hermesProviderPresets: HermesProviderPreset[] = [
|
||||
base_url: "https://www.dmxapi.cn/v1",
|
||||
api_key: "",
|
||||
api_mode: "chat_completions",
|
||||
models: [{ id: "gpt-5.4", name: "GPT-5.4" }],
|
||||
models: [{ id: "gpt-5.5", name: "GPT-5.5" }],
|
||||
},
|
||||
category: "aggregator",
|
||||
isPartner: true,
|
||||
partnerPromotionKey: "dmxapi",
|
||||
suggestedDefaults: {
|
||||
model: { default: "gpt-5.4", provider: "dmxapi" },
|
||||
model: { default: "gpt-5.5", provider: "dmxapi" },
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -1068,7 +1068,7 @@ export const hermesProviderPresets: HermesProviderPreset[] = [
|
||||
base_url: "https://api.modelverse.cn/v1",
|
||||
api_key: "",
|
||||
api_mode: "chat_completions",
|
||||
models: [{ id: "gpt-5.4", name: "GPT-5.4" }],
|
||||
models: [{ id: "gpt-5.5", name: "GPT-5.5" }],
|
||||
},
|
||||
category: "aggregator",
|
||||
isPartner: true,
|
||||
@@ -1076,7 +1076,7 @@ export const hermesProviderPresets: HermesProviderPreset[] = [
|
||||
icon: "ucloud",
|
||||
iconColor: "#000000",
|
||||
suggestedDefaults: {
|
||||
model: { default: "gpt-5.4", provider: "compshare" },
|
||||
model: { default: "gpt-5.5", provider: "compshare" },
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -1090,7 +1090,7 @@ export const hermesProviderPresets: HermesProviderPreset[] = [
|
||||
base_url: "https://cp.compshare.cn/v1",
|
||||
api_key: "",
|
||||
api_mode: "chat_completions",
|
||||
models: [{ id: "gpt-5.4", name: "GPT-5.4" }],
|
||||
models: [{ id: "gpt-5.5", name: "GPT-5.5" }],
|
||||
},
|
||||
category: "aggregator",
|
||||
isPartner: true,
|
||||
@@ -1098,7 +1098,7 @@ export const hermesProviderPresets: HermesProviderPreset[] = [
|
||||
icon: "ucloud",
|
||||
iconColor: "#000000",
|
||||
suggestedDefaults: {
|
||||
model: { default: "gpt-5.4", provider: "compshare_coding" },
|
||||
model: { default: "gpt-5.5", provider: "compshare_coding" },
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -1180,14 +1180,14 @@ export const hermesProviderPresets: HermesProviderPreset[] = [
|
||||
base_url: "https://api.lemondata.cc/v1",
|
||||
api_key: "",
|
||||
api_mode: "chat_completions",
|
||||
models: [{ id: "gpt-5.4", name: "GPT-5.4" }],
|
||||
models: [{ id: "gpt-5.5", name: "GPT-5.5" }],
|
||||
},
|
||||
category: "third_party",
|
||||
isPartner: true,
|
||||
partnerPromotionKey: "lemondata",
|
||||
icon: "lemondata",
|
||||
suggestedDefaults: {
|
||||
model: { default: "gpt-5.4", provider: "lemondata" },
|
||||
model: { default: "gpt-5.5", provider: "lemondata" },
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -1200,7 +1200,7 @@ export const hermesProviderPresets: HermesProviderPreset[] = [
|
||||
api_key: "",
|
||||
api_mode: "chat_completions",
|
||||
models: [
|
||||
{ id: "openai/gpt-5.4", name: "GPT-5.4" },
|
||||
{ id: "openai/gpt-5.5", name: "GPT-5.5" },
|
||||
{ id: "openai/gpt-5.4-mini", name: "GPT-5.4 mini" },
|
||||
{ id: "openai/gpt-5.4-nano", name: "GPT-5.4 nano" },
|
||||
],
|
||||
@@ -1208,7 +1208,7 @@ export const hermesProviderPresets: HermesProviderPreset[] = [
|
||||
category: "aggregator",
|
||||
suggestedDefaults: {
|
||||
model: {
|
||||
default: "openai/gpt-5.4",
|
||||
default: "openai/gpt-5.5",
|
||||
provider: "therouter",
|
||||
},
|
||||
},
|
||||
@@ -1222,13 +1222,13 @@ export const hermesProviderPresets: HermesProviderPreset[] = [
|
||||
base_url: "https://api.novita.ai/v3/openai",
|
||||
api_key: "",
|
||||
api_mode: "chat_completions",
|
||||
models: [{ id: "zai-org/glm-5", name: "Zai-Org / GLM-5" }],
|
||||
models: [{ id: "zai-org/glm-5.1", name: "Zai-Org / GLM-5.1" }],
|
||||
},
|
||||
category: "aggregator",
|
||||
icon: "novita",
|
||||
iconColor: "#000000",
|
||||
suggestedDefaults: {
|
||||
model: { default: "zai-org/glm-5", provider: "novita" },
|
||||
model: { default: "zai-org/glm-5.1", provider: "novita" },
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -311,8 +311,8 @@ export const openclawProviderPresets: OpenClawProviderPreset[] = [
|
||||
api: "openai-completions",
|
||||
models: [
|
||||
{
|
||||
id: "glm-5",
|
||||
name: "GLM-5",
|
||||
id: "glm-5.1",
|
||||
name: "GLM-5.1",
|
||||
contextWindow: 128000,
|
||||
cost: { input: 0.001, output: 0.001 },
|
||||
},
|
||||
@@ -335,8 +335,8 @@ export const openclawProviderPresets: OpenClawProviderPreset[] = [
|
||||
},
|
||||
},
|
||||
suggestedDefaults: {
|
||||
model: { primary: "zhipu/glm-5" },
|
||||
modelCatalog: { "zhipu/glm-5": { alias: "GLM" } },
|
||||
model: { primary: "zhipu/glm-5.1" },
|
||||
modelCatalog: { "zhipu/glm-5.1": { alias: "GLM" } },
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -349,8 +349,8 @@ export const openclawProviderPresets: OpenClawProviderPreset[] = [
|
||||
api: "openai-completions",
|
||||
models: [
|
||||
{
|
||||
id: "glm-5",
|
||||
name: "GLM-5",
|
||||
id: "glm-5.1",
|
||||
name: "GLM-5.1",
|
||||
contextWindow: 128000,
|
||||
cost: { input: 0.001, output: 0.001 },
|
||||
},
|
||||
@@ -373,8 +373,8 @@ export const openclawProviderPresets: OpenClawProviderPreset[] = [
|
||||
},
|
||||
},
|
||||
suggestedDefaults: {
|
||||
model: { primary: "zhipu-en/glm-5" },
|
||||
modelCatalog: { "zhipu-en/glm-5": { alias: "GLM" } },
|
||||
model: { primary: "zhipu-en/glm-5.1" },
|
||||
modelCatalog: { "zhipu-en/glm-5.1": { alias: "GLM" } },
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -1112,10 +1112,10 @@ export const openclawProviderPresets: OpenClawProviderPreset[] = [
|
||||
cost: { input: 1.75, output: 14, cacheRead: 0.175 },
|
||||
},
|
||||
{
|
||||
id: "google/gemini-3-flash-preview",
|
||||
name: "Gemini 3 Flash Preview",
|
||||
id: "google/gemini-3.5-flash",
|
||||
name: "Gemini 3.5 Flash",
|
||||
contextWindow: 1000000,
|
||||
cost: { input: 0.5, output: 3, cacheRead: 0.05 },
|
||||
cost: { input: 1.5, output: 9, cacheRead: 0.15 },
|
||||
},
|
||||
{
|
||||
id: "qwen/qwen3-coder-480b",
|
||||
@@ -1138,13 +1138,13 @@ export const openclawProviderPresets: OpenClawProviderPreset[] = [
|
||||
primary: "therouter/anthropic/claude-sonnet-4.6",
|
||||
fallbacks: [
|
||||
"therouter/openai/gpt-5.2",
|
||||
"therouter/google/gemini-3-flash-preview",
|
||||
"therouter/google/gemini-3.5-flash",
|
||||
],
|
||||
},
|
||||
modelCatalog: {
|
||||
"therouter/anthropic/claude-sonnet-4.6": { alias: "Sonnet" },
|
||||
"therouter/openai/gpt-5.2": { alias: "GPT-5.2" },
|
||||
"therouter/google/gemini-3-flash-preview": { alias: "Gemini Flash" },
|
||||
"therouter/google/gemini-3.5-flash": { alias: "Gemini Flash" },
|
||||
"therouter/openai/gpt-5.3-codex": { alias: "Codex" },
|
||||
"therouter/qwen/qwen3-coder-480b": { alias: "Qwen Coder" },
|
||||
},
|
||||
@@ -1160,8 +1160,8 @@ export const openclawProviderPresets: OpenClawProviderPreset[] = [
|
||||
api: "openai-completions",
|
||||
models: [
|
||||
{
|
||||
id: "ZhipuAI/GLM-5",
|
||||
name: "GLM-5",
|
||||
id: "ZhipuAI/GLM-5.1",
|
||||
name: "GLM-5.1",
|
||||
contextWindow: 128000,
|
||||
cost: { input: 0.001, output: 0.001 },
|
||||
},
|
||||
@@ -1184,8 +1184,8 @@ export const openclawProviderPresets: OpenClawProviderPreset[] = [
|
||||
},
|
||||
},
|
||||
suggestedDefaults: {
|
||||
model: { primary: "modelscope/ZhipuAI/GLM-5" },
|
||||
modelCatalog: { "modelscope/ZhipuAI/GLM-5": { alias: "GLM" } },
|
||||
model: { primary: "modelscope/ZhipuAI/GLM-5.1" },
|
||||
modelCatalog: { "modelscope/ZhipuAI/GLM-5.1": { alias: "GLM" } },
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -1270,8 +1270,8 @@ export const openclawProviderPresets: OpenClawProviderPreset[] = [
|
||||
api: "openai-completions",
|
||||
models: [
|
||||
{
|
||||
id: "zai-org/glm-5",
|
||||
name: "GLM-5",
|
||||
id: "zai-org/glm-5.1",
|
||||
name: "GLM-5.1",
|
||||
contextWindow: 202800,
|
||||
cost: { input: 1, output: 3.2, cacheRead: 0.2 },
|
||||
},
|
||||
@@ -1288,9 +1288,9 @@ export const openclawProviderPresets: OpenClawProviderPreset[] = [
|
||||
},
|
||||
},
|
||||
suggestedDefaults: {
|
||||
model: { primary: "novita/zai-org/glm-5" },
|
||||
model: { primary: "novita/zai-org/glm-5.1" },
|
||||
modelCatalog: {
|
||||
"novita/zai-org/glm-5": { alias: "GLM-5" },
|
||||
"novita/zai-org/glm-5.1": { alias: "GLM-5.1" },
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -2026,8 +2026,8 @@ export const openclawProviderPresets: OpenClawProviderPreset[] = [
|
||||
name: "gpt-5.3-codex",
|
||||
},
|
||||
{
|
||||
id: "gpt-5.4",
|
||||
name: "gpt-5.4",
|
||||
id: "gpt-5.5",
|
||||
name: "gpt-5.5",
|
||||
},
|
||||
{
|
||||
id: "gpt-5.2-codex",
|
||||
@@ -2052,11 +2052,11 @@ export const openclawProviderPresets: OpenClawProviderPreset[] = [
|
||||
suggestedDefaults: {
|
||||
model: {
|
||||
primary: "eflowcode/gpt-5.3-codex",
|
||||
fallbacks: ["eflowcode/gpt-5.4", "eflowcode/gpt-5.2-codex"],
|
||||
fallbacks: ["eflowcode/gpt-5.5", "eflowcode/gpt-5.2-codex"],
|
||||
},
|
||||
modelCatalog: {
|
||||
"eflowcode/gpt-5.3-codex": { alias: "gpt-5.3-codex" },
|
||||
"eflowcode/gpt-5.4": { alias: "gpt-5.4" },
|
||||
"eflowcode/gpt-5.5": { alias: "gpt-5.5" },
|
||||
"eflowcode/gpt-5.2-codex": { alias: "gpt-5.2-codex" },
|
||||
"eflowcode/gpt-5.2": { alias: "gpt-5.2" },
|
||||
},
|
||||
@@ -2072,8 +2072,8 @@ export const openclawProviderPresets: OpenClawProviderPreset[] = [
|
||||
api: "openai-completions",
|
||||
models: [
|
||||
{
|
||||
id: "gpt-5.4",
|
||||
name: "GPT-5.4",
|
||||
id: "gpt-5.5",
|
||||
name: "GPT-5.5",
|
||||
contextWindow: 400000,
|
||||
},
|
||||
],
|
||||
@@ -2091,10 +2091,10 @@ export const openclawProviderPresets: OpenClawProviderPreset[] = [
|
||||
},
|
||||
suggestedDefaults: {
|
||||
model: {
|
||||
primary: "lemondata/gpt-5.4",
|
||||
primary: "lemondata/gpt-5.5",
|
||||
},
|
||||
modelCatalog: {
|
||||
"lemondata/gpt-5.4": { alias: "GPT-5.4" },
|
||||
"lemondata/gpt-5.5": { alias: "GPT-5.5" },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -49,8 +49,8 @@ export const OPENCODE_PRESET_MODEL_VARIANTS: Record<
|
||||
modalities: { input: ["text"], output: ["text"] },
|
||||
},
|
||||
{
|
||||
id: "glm-5",
|
||||
name: "GLM 5",
|
||||
id: "glm-5.1",
|
||||
name: "GLM 5.1",
|
||||
contextLimit: 204800,
|
||||
outputLimit: 131072,
|
||||
modalities: { input: ["text"], output: ["text"] },
|
||||
@@ -91,8 +91,8 @@ export const OPENCODE_PRESET_MODEL_VARIANTS: Record<
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "gemini-3-flash-preview",
|
||||
name: "Gemini 3 Flash Preview",
|
||||
id: "gemini-3.5-flash",
|
||||
name: "Gemini 3.5 Flash",
|
||||
contextLimit: 1048576,
|
||||
outputLimit: 65536,
|
||||
modalities: {
|
||||
@@ -114,29 +114,11 @@ export const OPENCODE_PRESET_MODEL_VARIANTS: Record<
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "gemini-3-pro-preview",
|
||||
name: "Gemini 3 Pro Preview",
|
||||
contextLimit: 1048576,
|
||||
outputLimit: 65536,
|
||||
modalities: {
|
||||
input: ["text", "image", "pdf", "video", "audio"],
|
||||
output: ["text"],
|
||||
},
|
||||
variants: {
|
||||
low: {
|
||||
thinkingConfig: { includeThoughts: true, thinkingLevel: "low" },
|
||||
},
|
||||
high: {
|
||||
thinkingConfig: { includeThoughts: true, thinkingLevel: "high" },
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
"@ai-sdk/openai": [
|
||||
{
|
||||
id: "gpt-5.4",
|
||||
name: "GPT-5.4",
|
||||
id: "gpt-5.5",
|
||||
name: "GPT-5.5",
|
||||
contextLimit: 400000,
|
||||
outputLimit: 128000,
|
||||
modalities: { input: ["text", "image"], output: ["text"] },
|
||||
@@ -465,7 +447,7 @@ export const opencodeProviderPresets: OpenCodeProviderPreset[] = [
|
||||
setCacheKey: true,
|
||||
},
|
||||
models: {
|
||||
"glm-5": { name: "GLM-5" },
|
||||
"glm-5.1": { name: "GLM-5.1" },
|
||||
},
|
||||
},
|
||||
category: "cn_official",
|
||||
@@ -498,7 +480,7 @@ export const opencodeProviderPresets: OpenCodeProviderPreset[] = [
|
||||
setCacheKey: true,
|
||||
},
|
||||
models: {
|
||||
"glm-5": { name: "GLM-5" },
|
||||
"glm-5.1": { name: "GLM-5.1" },
|
||||
},
|
||||
},
|
||||
category: "cn_official",
|
||||
@@ -722,7 +704,7 @@ export const opencodeProviderPresets: OpenCodeProviderPreset[] = [
|
||||
setCacheKey: true,
|
||||
},
|
||||
models: {
|
||||
"ZhipuAI/GLM-5": { name: "GLM-5" },
|
||||
"ZhipuAI/GLM-5.1": { name: "GLM-5.1" },
|
||||
},
|
||||
},
|
||||
category: "aggregator",
|
||||
@@ -1079,8 +1061,8 @@ export const opencodeProviderPresets: OpenCodeProviderPreset[] = [
|
||||
"anthropic/claude-sonnet-4.6": { name: "Claude Sonnet 4.6" },
|
||||
"openai/gpt-5.3-codex": { name: "GPT-5.3 Codex" },
|
||||
"openai/gpt-5.2": { name: "GPT-5.2" },
|
||||
"google/gemini-3-flash-preview": {
|
||||
name: "Gemini 3 Flash Preview",
|
||||
"google/gemini-3.5-flash": {
|
||||
name: "Gemini 3.5 Flash",
|
||||
},
|
||||
"qwen/qwen3-coder-480b": { name: "Qwen3 Coder 480B" },
|
||||
},
|
||||
@@ -1107,7 +1089,7 @@ export const opencodeProviderPresets: OpenCodeProviderPreset[] = [
|
||||
setCacheKey: true,
|
||||
},
|
||||
models: {
|
||||
"zai-org/glm-5": { name: "GLM-5" },
|
||||
"zai-org/glm-5.1": { name: "GLM-5.1" },
|
||||
},
|
||||
},
|
||||
category: "aggregator",
|
||||
@@ -1393,7 +1375,7 @@ export const opencodeProviderPresets: OpenCodeProviderPreset[] = [
|
||||
setCacheKey: true,
|
||||
},
|
||||
models: {
|
||||
"gpt-5.4": { name: "GPT-5.4" },
|
||||
"gpt-5.5": { name: "GPT-5.5" },
|
||||
},
|
||||
},
|
||||
category: "third_party",
|
||||
@@ -1662,7 +1644,7 @@ export const opencodeProviderPresets: OpenCodeProviderPreset[] = [
|
||||
setCacheKey: true,
|
||||
},
|
||||
models: {
|
||||
"gpt-5.4": { name: "GPT-5.4" },
|
||||
"gpt-5.5": { name: "GPT-5.5" },
|
||||
},
|
||||
},
|
||||
category: "third_party",
|
||||
|
||||
@@ -47,11 +47,11 @@ const NEWAPI_DEFAULT_MODELS: UniversalProviderModels = {
|
||||
opusModel: "claude-opus-4-8",
|
||||
},
|
||||
codex: {
|
||||
model: "gpt-5.4",
|
||||
model: "gpt-5.5",
|
||||
reasoningEffort: "high",
|
||||
},
|
||||
gemini: {
|
||||
model: "gemini-3.1-pro",
|
||||
model: "gemini-3.5-flash",
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -2617,14 +2617,14 @@
|
||||
"writing": "Writing"
|
||||
},
|
||||
"categoryTooltip": {
|
||||
"visualEngineering": "Frontend and visual engineering category for UI/UX design, styling, animation and interface implementation. Defaults to Gemini 3 Pro model.",
|
||||
"visualEngineering": "Frontend and visual engineering category for UI/UX design, styling, animation and interface implementation. Defaults to Gemini 3.5 Flash model.",
|
||||
"ultrabrain": "Deep logical reasoning category for complex architectural decisions requiring extensive analysis. Defaults to GPT-5.3 Codex ultra-high reasoning variant.",
|
||||
"deep": "Deep autonomous problem-solving category with goal-oriented execution. Conducts thorough research before action, suitable for difficult problems requiring deep understanding.",
|
||||
"artistry": "Highly creative and artistic task category that inspires novel ideas and creative solutions. Defaults to Gemini 3 Pro max variant.",
|
||||
"artistry": "Highly creative and artistic task category that inspires novel ideas and creative solutions. Defaults to Gemini 3.5 Flash high variant.",
|
||||
"quick": "Lightweight task category for single-file modifications, typo fixes, and simple adjustments. Defaults to Claude Haiku 4.5 fast model.",
|
||||
"unspecifiedLow": "Uncategorized low-effort task category for tasks that don't fit other categories with small workload. Defaults to Claude Sonnet 4.5.",
|
||||
"unspecifiedHigh": "Uncategorized high-effort task category for tasks that don't fit other categories with large workload. Defaults to Claude Opus 4.8 max variant.",
|
||||
"writing": "Writing category for documentation, prose and technical writing. Defaults to Gemini 3 Flash fast generation model."
|
||||
"writing": "Writing category for documentation, prose and technical writing. Defaults to Kimi K2.5 model."
|
||||
},
|
||||
"slimAgentDesc": {
|
||||
"orchestrator": "Orchestrator",
|
||||
|
||||
@@ -2617,14 +2617,14 @@
|
||||
"writing": "ライティング"
|
||||
},
|
||||
"categoryTooltip": {
|
||||
"visualEngineering": "フロントエンドとビジュアルエンジニアリングカテゴリ。UI/UX デザイン、スタイリング、アニメーション、インターフェース実装に特化。デフォルトで Gemini 3 Pro モデルを使用。",
|
||||
"visualEngineering": "フロントエンドとビジュアルエンジニアリングカテゴリ。UI/UX デザイン、スタイリング、アニメーション、インターフェース実装に特化。デフォルトで Gemini 3.5 Flash モデルを使用。",
|
||||
"ultrabrain": "ディープロジック推論カテゴリ。広範な分析が必要な複雑なアーキテクチャ決定に使用。デフォルトで GPT-5.3 Codex の超高推論バリアントを使用。",
|
||||
"deep": "ディープ自律問題解決カテゴリ。目標指向の実行で、行動前に徹底的な調査を実施。深い理解が必要な難問に適しています。",
|
||||
"artistry": "高度にクリエイティブで芸術的なタスクカテゴリ。斬新なアイデアとクリエイティブなソリューションを促進。デフォルトで Gemini 3 Pro の max バリアントを使用。",
|
||||
"artistry": "高度にクリエイティブで芸術的なタスクカテゴリ。斬新なアイデアとクリエイティブなソリューションを促進。デフォルトで Gemini 3.5 Flash の高推論バリアントを使用。",
|
||||
"quick": "軽量タスクカテゴリ。単一ファイルの修正、タイポ修正、簡単な調整などの些細な作業に使用。デフォルトで Claude Haiku 4.5 高速モデルを使用。",
|
||||
"unspecifiedLow": "未分類の低作業量タスクカテゴリ。他のカテゴリに該当せず作業量が小さいタスクに適用。デフォルトで Claude Sonnet 4.5 を使用。",
|
||||
"unspecifiedHigh": "未分類の高作業量タスクカテゴリ。他のカテゴリに該当せず作業量が大きいタスクに適用。デフォルトで Claude Opus 4.8 の max バリアントを使用。",
|
||||
"writing": "ライティングカテゴリ。ドキュメント、散文、技術文書に特化。デフォルトで Gemini 3 Flash 高速生成モデルを使用。"
|
||||
"writing": "ライティングカテゴリ。ドキュメント、散文、技術文書に特化。デフォルトで Kimi K2.5 モデルを使用。"
|
||||
},
|
||||
"slimAgentDesc": {
|
||||
"orchestrator": "オーケストレーター",
|
||||
|
||||
@@ -2563,14 +2563,14 @@
|
||||
"writing": "寫作"
|
||||
},
|
||||
"categoryTooltip": {
|
||||
"visualEngineering": "前端與視覺工程類別,專注於 UI/UX 設計、樣式、動畫和介面實作,預設使用 Gemini 3 Pro 模型。",
|
||||
"visualEngineering": "前端與視覺工程類別,專注於 UI/UX 設計、樣式、動畫和介面實作,預設使用 Gemini 3.5 Flash 模型。",
|
||||
"ultrabrain": "深度邏輯推理類別,用於需要廣泛分析的複雜架構決策,預設使用 GPT-5.3 Codex 的超高推理變體。",
|
||||
"deep": "深度自主問題解決類別,目標導向執行,行動前進行徹底研究,適用於需要深度理解的棘手問題。",
|
||||
"artistry": "高度創意與藝術性任務類別,激發新穎想法和創造性解決方案,預設使用 Gemini 3 Pro 的最大變體。",
|
||||
"artistry": "高度創意與藝術性任務類別,激發新穎想法和創造性解決方案,預設使用 Gemini 3.5 Flash 的高推理變體。",
|
||||
"quick": "輕量任務類別,用於單檔案修改、錯別字修復、簡單調整等瑣碎工作,預設使用 Claude Haiku 4.5 快速模型。",
|
||||
"unspecifiedLow": "未分類低工作量任務類別,適用於不適合其他類別且工作量較小的任務,預設使用 Claude Sonnet 4.5。",
|
||||
"unspecifiedHigh": "未分類高工作量任務類別,適用於不適合其他類別且工作量較大的任務,預設使用 Claude Opus 4.8 的最大變體。",
|
||||
"writing": "寫作類別,專注於文件、散文和技術寫作,預設使用 Gemini 3 Flash 快速產生模型。"
|
||||
"writing": "寫作類別,專注於文件、散文和技術寫作,預設使用 Kimi K2.5 模型。"
|
||||
},
|
||||
"slimAgentDesc": {
|
||||
"orchestrator": "協調器",
|
||||
|
||||
@@ -2617,14 +2617,14 @@
|
||||
"writing": "写作"
|
||||
},
|
||||
"categoryTooltip": {
|
||||
"visualEngineering": "前端与视觉工程类别,专注于 UI/UX 设计、样式、动画和界面实现,默认使用 Gemini 3 Pro 模型。",
|
||||
"visualEngineering": "前端与视觉工程类别,专注于 UI/UX 设计、样式、动画和界面实现,默认使用 Gemini 3.5 Flash 模型。",
|
||||
"ultrabrain": "深度逻辑推理类别,用于需要广泛分析的复杂架构决策,默认使用 GPT-5.3 Codex 的超高推理变体。",
|
||||
"deep": "深度自主问题解决类别,目标导向执行,行动前进行彻底研究,适用于需要深度理解的棘手问题。",
|
||||
"artistry": "高度创意与艺术性任务类别,激发新颖想法和创造性解决方案,默认使用 Gemini 3 Pro 的最大变体。",
|
||||
"artistry": "高度创意与艺术性任务类别,激发新颖想法和创造性解决方案,默认使用 Gemini 3.5 Flash 的高推理变体。",
|
||||
"quick": "轻量任务类别,用于单文件修改、错别字修复、简单调整等琐碎工作,默认使用 Claude Haiku 4.5 快速模型。",
|
||||
"unspecifiedLow": "未归类低工作量任务类别,适用于不适合其他类别且工作量较小的任务,默认使用 Claude Sonnet 4.5。",
|
||||
"unspecifiedHigh": "未归类高工作量任务类别,适用于不适合其他类别且工作量较大的任务,默认使用 Claude Opus 4.8 的最大变体。",
|
||||
"writing": "写作类别,专注于文档、散文和技术写作,默认使用 Gemini 3 Flash 快速生成模型。"
|
||||
"writing": "写作类别,专注于文档、散文和技术写作,默认使用 Kimi K2.5 模型。"
|
||||
},
|
||||
"slimAgentDesc": {
|
||||
"orchestrator": "编排者",
|
||||
|
||||
+8
-8
@@ -120,7 +120,7 @@ export const OMO_BUILTIN_CATEGORIES: OmoCategoryDef[] = [
|
||||
display: "Visual Engineering",
|
||||
descKey: "omo.categoryDesc.visualEngineering",
|
||||
tooltipKey: "omo.categoryTooltip.visualEngineering",
|
||||
recommended: "gemini-3.1-pro",
|
||||
recommended: "gemini-3.5-flash",
|
||||
},
|
||||
{
|
||||
key: "ultrabrain",
|
||||
@@ -141,7 +141,7 @@ export const OMO_BUILTIN_CATEGORIES: OmoCategoryDef[] = [
|
||||
display: "Artistry",
|
||||
descKey: "omo.categoryDesc.artistry",
|
||||
tooltipKey: "omo.categoryTooltip.artistry",
|
||||
recommended: "gemini-3.1-pro",
|
||||
recommended: "gemini-3.5-flash",
|
||||
},
|
||||
{
|
||||
key: "quick",
|
||||
@@ -282,7 +282,7 @@ export const OMO_BACKGROUND_TASK_PLACEHOLDER = `{
|
||||
},
|
||||
"modelConcurrency": {
|
||||
"anthropic/claude-opus-4-8": 2,
|
||||
"google/gemini-3-flash": 10
|
||||
"google/gemini-3.5-flash": 10
|
||||
}
|
||||
}`;
|
||||
|
||||
@@ -328,7 +328,7 @@ export const OMO_SLIM_BUILTIN_AGENTS: OmoAgentDef[] = [
|
||||
display: "Oracle",
|
||||
descKey: "omo.slimAgentDesc.oracle",
|
||||
tooltipKey: "omo.slimAgentTooltip.oracle",
|
||||
recommended: "gpt-5.4",
|
||||
recommended: "gpt-5.5",
|
||||
group: "sub",
|
||||
},
|
||||
{
|
||||
@@ -336,7 +336,7 @@ export const OMO_SLIM_BUILTIN_AGENTS: OmoAgentDef[] = [
|
||||
display: "Librarian",
|
||||
descKey: "omo.slimAgentDesc.librarian",
|
||||
tooltipKey: "omo.slimAgentTooltip.librarian",
|
||||
recommended: "gemini-3-flash",
|
||||
recommended: "gemini-3.5-flash",
|
||||
group: "sub",
|
||||
},
|
||||
{
|
||||
@@ -344,7 +344,7 @@ export const OMO_SLIM_BUILTIN_AGENTS: OmoAgentDef[] = [
|
||||
display: "Explorer",
|
||||
descKey: "omo.slimAgentDesc.explorer",
|
||||
tooltipKey: "omo.slimAgentTooltip.explorer",
|
||||
recommended: "grok-code-fast-1",
|
||||
recommended: "grok-build-0.1",
|
||||
group: "sub",
|
||||
},
|
||||
{
|
||||
@@ -352,7 +352,7 @@ export const OMO_SLIM_BUILTIN_AGENTS: OmoAgentDef[] = [
|
||||
display: "Designer",
|
||||
descKey: "omo.slimAgentDesc.designer",
|
||||
tooltipKey: "omo.slimAgentTooltip.designer",
|
||||
recommended: "gemini-3-pro",
|
||||
recommended: "gemini-3.5-flash",
|
||||
group: "sub",
|
||||
},
|
||||
{
|
||||
@@ -360,7 +360,7 @@ export const OMO_SLIM_BUILTIN_AGENTS: OmoAgentDef[] = [
|
||||
display: "Fixer",
|
||||
descKey: "omo.slimAgentDesc.fixer",
|
||||
tooltipKey: "omo.slimAgentTooltip.fixer",
|
||||
recommended: "gpt-5.4",
|
||||
recommended: "gpt-5.5",
|
||||
group: "sub",
|
||||
},
|
||||
{
|
||||
|
||||
@@ -45,14 +45,14 @@ const expectedChatPresets = new Map<
|
||||
"Zhipu GLM",
|
||||
{
|
||||
baseUrl: "https://open.bigmodel.cn/api/paas/v4",
|
||||
contextWindows: { "glm-5": 200000 },
|
||||
contextWindows: { "glm-5.1": 200000 },
|
||||
},
|
||||
],
|
||||
[
|
||||
"Zhipu GLM en",
|
||||
{
|
||||
baseUrl: "https://api.z.ai/api/paas/v4",
|
||||
contextWindows: { "glm-5": 200000 },
|
||||
contextWindows: { "glm-5.1": 200000 },
|
||||
},
|
||||
],
|
||||
[
|
||||
@@ -103,7 +103,7 @@ const expectedChatPresets = new Map<
|
||||
"ModelScope",
|
||||
{
|
||||
baseUrl: "https://api-inference.modelscope.cn/v1",
|
||||
contextWindows: { "ZhipuAI/GLM-5": 200000 },
|
||||
contextWindows: { "ZhipuAI/GLM-5.1": 200000 },
|
||||
},
|
||||
],
|
||||
[
|
||||
@@ -166,7 +166,7 @@ const expectedChatPresets = new Map<
|
||||
"Novita AI",
|
||||
{
|
||||
baseUrl: "https://api.novita.ai/openai/v1",
|
||||
contextWindows: { "zai-org/glm-5": 202800 },
|
||||
contextWindows: { "zai-org/glm-5.1": 202800 },
|
||||
},
|
||||
],
|
||||
[
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { opencodeProviderPresets } from "@/config/opencodeProviderPresets";
|
||||
import {
|
||||
OPENCODE_PRESET_MODEL_VARIANTS,
|
||||
opencodeProviderPresets,
|
||||
} from "@/config/opencodeProviderPresets";
|
||||
import { openclawProviderPresets } from "@/config/openclawProviderPresets";
|
||||
|
||||
describe("TheRouter OpenCode and OpenClaw presets", () => {
|
||||
it("uses OpenAI-compatible config for OpenCode", () => {
|
||||
const preset = opencodeProviderPresets.find((item) => item.name === "TheRouter");
|
||||
const preset = opencodeProviderPresets.find(
|
||||
(item) => item.name === "TheRouter",
|
||||
);
|
||||
const models = preset?.settingsConfig.models ?? {};
|
||||
|
||||
expect(preset).toBeDefined();
|
||||
@@ -18,12 +23,16 @@ describe("TheRouter OpenCode and OpenClaw presets", () => {
|
||||
expect(preset?.settingsConfig.options?.setCacheKey).toBe(true);
|
||||
expect(models).toHaveProperty("openai/gpt-5.3-codex");
|
||||
expect(models).toHaveProperty("anthropic/claude-sonnet-4.6");
|
||||
expect(models).toHaveProperty("google/gemini-3-flash-preview");
|
||||
expect(models).toHaveProperty("google/gemini-3.5-flash");
|
||||
expect(models["google/gemini-3.5-flash"]?.name).toBe("Gemini 3.5 Flash");
|
||||
});
|
||||
|
||||
it("uses OpenAI completions config for OpenClaw", () => {
|
||||
const preset = openclawProviderPresets.find((item) => item.name === "TheRouter");
|
||||
const modelIds = (preset?.settingsConfig.models ?? []).map((model) => model.id);
|
||||
const preset = openclawProviderPresets.find(
|
||||
(item) => item.name === "TheRouter",
|
||||
);
|
||||
const openClawModels = preset?.settingsConfig.models ?? [];
|
||||
const modelIds = openClawModels.map((model) => model.id);
|
||||
|
||||
expect(preset).toBeDefined();
|
||||
expect(preset?.websiteUrl).toBe("https://therouter.ai");
|
||||
@@ -36,15 +45,41 @@ describe("TheRouter OpenCode and OpenClaw presets", () => {
|
||||
"anthropic/claude-sonnet-4.6",
|
||||
"openai/gpt-5.3-codex",
|
||||
"openai/gpt-5.2",
|
||||
"google/gemini-3-flash-preview",
|
||||
"google/gemini-3.5-flash",
|
||||
]),
|
||||
);
|
||||
expect(
|
||||
openClawModels.find((model) => model.id === "google/gemini-3.5-flash"),
|
||||
).toMatchObject({
|
||||
name: "Gemini 3.5 Flash",
|
||||
cost: { input: 1.5, output: 9, cacheRead: 0.15 },
|
||||
});
|
||||
expect(preset?.suggestedDefaults?.model).toEqual({
|
||||
primary: "therouter/anthropic/claude-sonnet-4.6",
|
||||
fallbacks: [
|
||||
"therouter/openai/gpt-5.2",
|
||||
"therouter/google/gemini-3-flash-preview",
|
||||
"therouter/google/gemini-3.5-flash",
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
it("keeps Google OpenCode preset model ids unique", () => {
|
||||
const googleModels = OPENCODE_PRESET_MODEL_VARIANTS["@ai-sdk/google"];
|
||||
const ids = googleModels.map((model) => model.id);
|
||||
const geminiFlashModels = googleModels.filter(
|
||||
(model) => model.id === "gemini-3.5-flash",
|
||||
);
|
||||
|
||||
expect(new Set(ids).size).toBe(ids.length);
|
||||
expect(geminiFlashModels).toHaveLength(1);
|
||||
expect(geminiFlashModels[0]).toMatchObject({
|
||||
name: "Gemini 3.5 Flash",
|
||||
variants: {
|
||||
minimal: expect.any(Object),
|
||||
low: expect.any(Object),
|
||||
medium: expect.any(Object),
|
||||
high: expect.any(Object),
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -60,10 +60,10 @@ describe("TheRouter provider presets", () => {
|
||||
expect(preset?.category).toBe("aggregator");
|
||||
expect(preset?.endpointCandidates).toEqual(["https://api.therouter.ai"]);
|
||||
expect(preset?.baseURL).toBe("https://api.therouter.ai");
|
||||
expect(preset?.model).toBe("gemini-3.1-pro");
|
||||
expect(preset?.model).toBe("gemini-3.5-flash");
|
||||
|
||||
const env = (preset?.settingsConfig as { env: Record<string, string> }).env;
|
||||
expect(env.GOOGLE_GEMINI_BASE_URL).toBe("https://api.therouter.ai");
|
||||
expect(env.GEMINI_MODEL).toBe("gemini-3.1-pro");
|
||||
expect(env.GEMINI_MODEL).toBe("gemini-3.5-flash");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user