diff --git a/openless-all/app/src-tauri/src/commands/credentials.rs b/openless-all/app/src-tauri/src/commands/credentials.rs index 305b0c91..7ed34ba1 100644 --- a/openless-all/app/src-tauri/src/commands/credentials.rs +++ b/openless-all/app/src-tauri/src/commands/credentials.rs @@ -92,6 +92,7 @@ fn llm_provider_default_endpoint(provider: &str) -> Option<&'static str> { "openrouterFree" => Some("https://openrouter.ai/api/v1"), "alibabaCoding" => Some("https://coding-intl.dashscope.aliyuncs.com/v1"), "codingPlanX" => Some("https://api.codingplanx.ai/v1"), + "stepfun" => Some("https://api.stepfun.com/v1"), _ => None, } } diff --git a/openless-all/app/src-tauri/src/polish.rs b/openless-all/app/src-tauri/src/polish.rs index 21c40d20..1ff47baf 100644 --- a/openless-all/app/src-tauri/src/polish.rs +++ b/openless-all/app/src-tauri/src/polish.rs @@ -25,7 +25,10 @@ const DEFAULT_REQUEST_TIMEOUT_SECS: u64 = 30; const BODY_PREVIEW_LIMIT: usize = 200; pub const CODEX_OAUTH_PROVIDER_ID: &str = "codex_oauth"; pub const CODEX_DEFAULT_BASE_URL: &str = "https://chatgpt.com/backend-api"; -pub const CODEX_DEFAULT_MODEL: &str = "gpt-5.3-codex-spark"; +// 注意:gpt-5.3-codex-spark 不能做默认——ChatGPT 账号走 Codex OAuth 时后端会 +// 400 拒绝("model is not supported when using Codex with a ChatGPT account"), +// 每次润色都失败并回退原文。gpt-5.5 是该通道实测可用的模型。 +pub const CODEX_DEFAULT_MODEL: &str = "gpt-5.5"; const CODEX_MIN_TOKEN_TTL_SECS: u64 = 60; #[derive(Clone, Debug)] @@ -1607,7 +1610,9 @@ fn openai_compatible_thinking_control(provider_id: &str) -> Option Some(ThinkingControl::MiniMaxThinking), "openrouterFree" => Some(ThinkingControl::OpenRouterReasoning), "alibabaCoding" => Some(ThinkingControl::EnableThinking), - "openai" | "codingPlanX" => Some(ThinkingControl::ReasoningEffort), + // StepFun step-3.x-flash 系列按官方文档接受 reasoning_effort(low/medium/high, + // 无法完全关闭思考);非推理模型(如 step-1o-turbo-vision)会忽略该字段。 + "openai" | "codingPlanX" | "stepfun" => Some(ThinkingControl::ReasoningEffort), // custom / 其他未声明 provider 走 base_url 兜底识别——用户用自定义 // endpoint 接入 MiniMax 时,根据 base_url 命中即下发官方 thinking 参数。 _ => None, @@ -1643,6 +1648,9 @@ fn openai_compatible_thinking_control_for_base_url(base_url: &str) -> Option