Skip to content

Commit 5aa9383

Browse files
committed
feat: update NewConversationParams to take an optional model_provider
1 parent 1fae499 commit 5aa9383

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

codex-rs/app-server-protocol/src/protocol.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,10 @@ pub struct NewConversationParams {
259259
#[serde(skip_serializing_if = "Option::is_none")]
260260
pub model: Option<String>,
261261

262+
/// Override the model provider to use for this session.
263+
#[serde(skip_serializing_if = "Option::is_none")]
264+
pub model_provider: Option<String>,
265+
262266
/// Configuration profile from config.toml to specify default options.
263267
#[serde(skip_serializing_if = "Option::is_none")]
264268
pub profile: Option<String>,

codex-rs/app-server/src/codex_message_processor.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1543,6 +1543,7 @@ async fn derive_config_from_params(
15431543
) -> std::io::Result<Config> {
15441544
let NewConversationParams {
15451545
model,
1546+
model_provider,
15461547
profile,
15471548
cwd,
15481549
approval_policy,
@@ -1558,7 +1559,7 @@ async fn derive_config_from_params(
15581559
cwd: cwd.map(PathBuf::from),
15591560
approval_policy,
15601561
sandbox_mode,
1561-
model_provider: None,
1562+
model_provider,
15621563
codex_linux_sandbox_exe,
15631564
base_instructions,
15641565
include_apply_patch_tool,

0 commit comments

Comments
 (0)