[codex] Add SiliconFlow provider support#1868
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds support for SiliconFlow as a new model provider, updating the CLI, TUI, and documentation to handle SiliconFlow-specific configurations and environment variables. Feedback was provided regarding the model normalization logic to ensure that reasoning-capable models are correctly mapped to the Pro model instead of the Flash model.
| (ProviderKind::Siliconflow, "deepseek-v4-pro" | "deepseek-v4pro") => { | ||
| DEFAULT_SILICONFLOW_MODEL.to_string() | ||
| } | ||
| ( | ||
| ProviderKind::Siliconflow, | ||
| "deepseek-v4-flash" | "deepseek-v4flash" | "deepseek-chat" | "deepseek-reasoner" | ||
| | "deepseek-r1" | "deepseek-v3" | "deepseek-v3.2", | ||
| ) => DEFAULT_SILICONFLOW_FLASH_MODEL.to_string(), |
There was a problem hiding this comment.
The model aliases deepseek-reasoner and deepseek-r1 should be mapped to the Pro model (DEFAULT_SILICONFLOW_MODEL) rather than the Flash model, as they represent reasoning-capable models. Additionally, deepseek-v3.2 appears to be a typo for deepseek-v3 (which is already present) or perhaps deepseek-v2.5.
| (ProviderKind::Siliconflow, "deepseek-v4-pro" | "deepseek-v4pro") => { | |
| DEFAULT_SILICONFLOW_MODEL.to_string() | |
| } | |
| ( | |
| ProviderKind::Siliconflow, | |
| "deepseek-v4-flash" | "deepseek-v4flash" | "deepseek-chat" | "deepseek-reasoner" | |
| | "deepseek-r1" | "deepseek-v3" | "deepseek-v3.2", | |
| ) => DEFAULT_SILICONFLOW_FLASH_MODEL.to_string(), | |
| ( | |
| ProviderKind::Siliconflow, | |
| "deepseek-v4-pro" | "deepseek-v4pro" | "deepseek-reasoner" | "deepseek-r1", | |
| ) => DEFAULT_SILICONFLOW_MODEL.to_string(), | |
| ( | |
| ProviderKind::Siliconflow, | |
| "deepseek-v4-flash" | "deepseek-v4flash" | "deepseek-chat" | "deepseek-v3", | |
| ) => DEFAULT_SILICONFLOW_FLASH_MODEL.to_string(), |
There was a problem hiding this comment.
Fixed in 89aa47a2.
deepseek-reasoneranddeepseek-r1now map toDEFAULT_SILICONFLOW_MODEL.deepseek-v3.2is no longer treated as a SiliconFlow Flash alias; it is preserved as an explicit model value.- Added config tests for both behaviors.
Validation: cargo test -p deepseek-config siliconflow -- --nocapture, cargo check -p deepseek-config, cargo check -p deepseek-tui-cli.
cdab5da to
89aa47a
Compare
|
Addressed the SiliconFlow model alias feedback in the latest push:
Validation:
|
Summary
Fixes #1710
Validation