mirror of
https://github.com/openai/codex.git
synced 2026-05-28 15:00:16 +00:00
Allow default apply_patch environment
Let multi-environment apply_patch calls without an explicit environment_id fall through to the primary turn environment, matching the optional parser contract and existing resolve_tool_environment(None) behavior. Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -589,10 +589,6 @@ fn require_environment_id(
|
||||
"apply_patch environment selection is unavailable for this turn".to_string(),
|
||||
)),
|
||||
Some(environment_id) => Ok(Some(environment_id.to_string())),
|
||||
None if allow_environment_id => Err(FunctionCallError::RespondToModel(
|
||||
"apply_patch environment_id is required when multiple environments are available"
|
||||
.to_string(),
|
||||
)),
|
||||
None => Ok(None),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,10 +207,7 @@ fn reconcile_environment_id_requires_selection_when_enabled() {
|
||||
require_environment_id(
|
||||
/*parsed_environment_id*/ None, /*allow_environment_id*/ true
|
||||
),
|
||||
Err(FunctionCallError::RespondToModel(
|
||||
"apply_patch environment_id is required when multiple environments are available"
|
||||
.to_string(),
|
||||
))
|
||||
Ok(None)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user