Skip to content

Commit 1cfea37

Browse files
committed
feat: update NewConversationParams to take an optional model_provider
1 parent 2bca20a commit 1cfea37

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
@@ -252,6 +252,10 @@ pub struct NewConversationParams {
252252
#[serde(skip_serializing_if = "Option::is_none")]
253253
pub model: Option<String>,
254254

255+
/// Override the model provider to use for this session.
256+
#[serde(skip_serializing_if = "Option::is_none")]
257+
pub model_provider: Option<String>,
258+
255259
/// Configuration profile from config.toml to specify default options.
256260
#[serde(skip_serializing_if = "Option::is_none")]
257261
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
@@ -1533,6 +1533,7 @@ async fn derive_config_from_params(
15331533
) -> std::io::Result<Config> {
15341534
let NewConversationParams {
15351535
model,
1536+
model_provider,
15361537
profile,
15371538
cwd,
15381539
approval_policy,
@@ -1548,7 +1549,7 @@ async fn derive_config_from_params(
15481549
cwd: cwd.map(PathBuf::from),
15491550
approval_policy,
15501551
sandbox_mode,
1551-
model_provider: None,
1552+
model_provider,
15521553
codex_linux_sandbox_exe,
15531554
base_instructions,
15541555
include_apply_patch_tool,

0 commit comments

Comments
 (0)