diff --git a/codex-rs/app-server/src/codex_message_processor.rs b/codex-rs/app-server/src/codex_message_processor.rs index 193b47ea..99310e19 100644 --- a/codex-rs/app-server/src/codex_message_processor.rs +++ b/codex-rs/app-server/src/codex_message_processor.rs @@ -1777,7 +1777,6 @@ async fn derive_config_from_params( developer_instructions, compact_prompt, include_apply_patch_tool, - include_view_image_tool: None, show_raw_agent_reasoning: None, tools_web_search_request: None, experimental_sandbox_command_assessment: None, diff --git a/codex-rs/core/src/config/mod.rs b/codex-rs/core/src/config/mod.rs index 17fddcf3..9293e4d5 100644 --- a/codex-rs/core/src/config/mod.rs +++ b/codex-rs/core/src/config/mod.rs @@ -250,9 +250,6 @@ pub struct Config { /// https://github.com/modelcontextprotocol/rust-sdk pub use_experimental_use_rmcp_client: bool, - /// Include the `view_image` tool that lets the agent attach a local image path to context. - pub include_view_image_tool: bool, - /// Centralized feature flags; source of truth for feature gating. pub features: Features, @@ -841,7 +838,6 @@ pub struct ConfigOverrides { pub developer_instructions: Option, pub compact_prompt: Option, pub include_apply_patch_tool: Option, - pub include_view_image_tool: Option, pub show_raw_agent_reasoning: Option, pub tools_web_search_request: Option, pub experimental_sandbox_command_assessment: Option, @@ -873,7 +869,6 @@ impl Config { developer_instructions, compact_prompt, include_apply_patch_tool: include_apply_patch_tool_override, - include_view_image_tool: include_view_image_tool_override, show_raw_agent_reasoning, tools_web_search_request: override_tools_web_search_request, experimental_sandbox_command_assessment: sandbox_command_assessment_override, @@ -900,7 +895,6 @@ impl Config { let feature_overrides = FeatureOverrides { include_apply_patch_tool: include_apply_patch_tool_override, - include_view_image_tool: include_view_image_tool_override, web_search_request: override_tools_web_search_request, experimental_sandbox_command_assessment: sandbox_command_assessment_override, }; @@ -998,7 +992,6 @@ impl Config { let history = cfg.history.unwrap_or_default(); let include_apply_patch_tool_flag = features.enabled(Feature::ApplyPatchFreeform); - let include_view_image_tool_flag = features.enabled(Feature::ViewImageTool); let tools_web_search_request = features.enabled(Feature::WebSearchRequest); let use_experimental_streamable_shell_tool = features.enabled(Feature::StreamableShell); let use_experimental_unified_exec_tool = features.enabled(Feature::UnifiedExec); @@ -1160,7 +1153,6 @@ impl Config { use_experimental_streamable_shell_tool, use_experimental_unified_exec_tool, use_experimental_use_rmcp_client, - include_view_image_tool: include_view_image_tool_flag, features, active_profile: active_profile_name, active_project, @@ -1595,7 +1587,7 @@ trust_level = "trusted" profiles.insert( "work".to_string(), ConfigProfile { - include_view_image_tool: Some(false), + tools_view_image: Some(false), ..Default::default() }, ); @@ -1612,7 +1604,6 @@ trust_level = "trusted" )?; assert!(!config.features.enabled(Feature::ViewImageTool)); - assert!(!config.include_view_image_tool); Ok(()) } @@ -2908,7 +2899,6 @@ model_verbosity = "high" use_experimental_streamable_shell_tool: false, use_experimental_unified_exec_tool: false, use_experimental_use_rmcp_client: false, - include_view_image_tool: true, features: Features::with_defaults(), active_profile: Some("o3".to_string()), active_project: ProjectConfig { trust_level: None }, @@ -2981,7 +2971,6 @@ model_verbosity = "high" use_experimental_streamable_shell_tool: false, use_experimental_unified_exec_tool: false, use_experimental_use_rmcp_client: false, - include_view_image_tool: true, features: Features::with_defaults(), active_profile: Some("gpt3".to_string()), active_project: ProjectConfig { trust_level: None }, @@ -3069,7 +3058,6 @@ model_verbosity = "high" use_experimental_streamable_shell_tool: false, use_experimental_unified_exec_tool: false, use_experimental_use_rmcp_client: false, - include_view_image_tool: true, features: Features::with_defaults(), active_profile: Some("zdr".to_string()), active_project: ProjectConfig { trust_level: None }, @@ -3143,7 +3131,6 @@ model_verbosity = "high" use_experimental_streamable_shell_tool: false, use_experimental_unified_exec_tool: false, use_experimental_use_rmcp_client: false, - include_view_image_tool: true, features: Features::with_defaults(), active_profile: Some("gpt5".to_string()), active_project: ProjectConfig { trust_level: None }, diff --git a/codex-rs/core/src/config/profile.rs b/codex-rs/core/src/config/profile.rs index 7a863f13..f7eb2dce 100644 --- a/codex-rs/core/src/config/profile.rs +++ b/codex-rs/core/src/config/profile.rs @@ -24,7 +24,6 @@ pub struct ConfigProfile { pub experimental_instructions_file: Option, pub experimental_compact_prompt_file: Option, pub include_apply_patch_tool: Option, - pub include_view_image_tool: Option, pub experimental_use_unified_exec_tool: Option, pub experimental_use_exec_command_tool: Option, pub experimental_use_rmcp_client: Option, diff --git a/codex-rs/core/src/features.rs b/codex-rs/core/src/features.rs index 0c4356d7..5488d761 100644 --- a/codex-rs/core/src/features.rs +++ b/codex-rs/core/src/features.rs @@ -82,7 +82,6 @@ pub struct Features { #[derive(Debug, Clone, Default)] pub struct FeatureOverrides { pub include_apply_patch_tool: Option, - pub include_view_image_tool: Option, pub web_search_request: Option, pub experimental_sandbox_command_assessment: Option, } @@ -91,7 +90,6 @@ impl FeatureOverrides { fn apply(self, features: &mut Features) { LegacyFeatureToggles { include_apply_patch_tool: self.include_apply_patch_tool, - include_view_image_tool: self.include_view_image_tool, tools_web_search: self.web_search_request, ..Default::default() } @@ -193,7 +191,6 @@ impl Features { let profile_legacy = LegacyFeatureToggles { include_apply_patch_tool: config_profile.include_apply_patch_tool, - include_view_image_tool: config_profile.include_view_image_tool, experimental_sandbox_command_assessment: config_profile .experimental_sandbox_command_assessment, experimental_use_freeform_apply_patch: config_profile diff --git a/codex-rs/core/src/features/legacy.rs b/codex-rs/core/src/features/legacy.rs index abe313f6..acf96a15 100644 --- a/codex-rs/core/src/features/legacy.rs +++ b/codex-rs/core/src/features/legacy.rs @@ -33,10 +33,6 @@ const ALIASES: &[Alias] = &[ legacy_key: "include_apply_patch_tool", feature: Feature::ApplyPatchFreeform, }, - Alias { - legacy_key: "include_view_image_tool", - feature: Feature::ViewImageTool, - }, Alias { legacy_key: "web_search", feature: Feature::WebSearchRequest, @@ -56,7 +52,6 @@ pub(crate) fn feature_for_key(key: &str) -> Option { #[derive(Debug, Default)] pub struct LegacyFeatureToggles { pub include_apply_patch_tool: Option, - pub include_view_image_tool: Option, pub experimental_sandbox_command_assessment: Option, pub experimental_use_freeform_apply_patch: Option, pub experimental_use_exec_command_tool: Option, @@ -110,12 +105,6 @@ impl LegacyFeatureToggles { self.tools_web_search, "tools.web_search", ); - set_if_some( - features, - Feature::ViewImageTool, - self.include_view_image_tool, - "include_view_image_tool", - ); set_if_some( features, Feature::ViewImageTool, diff --git a/codex-rs/exec/src/lib.rs b/codex-rs/exec/src/lib.rs index a086990d..13d43f61 100644 --- a/codex-rs/exec/src/lib.rs +++ b/codex-rs/exec/src/lib.rs @@ -177,7 +177,6 @@ pub async fn run_main(cli: Cli, codex_linux_sandbox_exe: Option) -> any developer_instructions: None, compact_prompt: None, include_apply_patch_tool: None, - include_view_image_tool: None, show_raw_agent_reasoning: oss.then_some(true), tools_web_search_request: None, experimental_sandbox_command_assessment: None, diff --git a/codex-rs/mcp-server/src/codex_tool_config.rs b/codex-rs/mcp-server/src/codex_tool_config.rs index fd671ea1..4e61bde0 100644 --- a/codex-rs/mcp-server/src/codex_tool_config.rs +++ b/codex-rs/mcp-server/src/codex_tool_config.rs @@ -167,7 +167,6 @@ impl CodexToolCallParam { developer_instructions, compact_prompt, include_apply_patch_tool: None, - include_view_image_tool: None, show_raw_agent_reasoning: None, tools_web_search_request: None, experimental_sandbox_command_assessment: None, diff --git a/codex-rs/tui/src/lib.rs b/codex-rs/tui/src/lib.rs index 487b687a..eb5d3ae9 100644 --- a/codex-rs/tui/src/lib.rs +++ b/codex-rs/tui/src/lib.rs @@ -147,7 +147,6 @@ pub async fn run_main( developer_instructions: None, compact_prompt: None, include_apply_patch_tool: None, - include_view_image_tool: None, show_raw_agent_reasoning: cli.oss.then_some(true), tools_web_search_request: cli.web_search.then_some(true), experimental_sandbox_command_assessment: None, diff --git a/docs/config.md b/docs/config.md index 0d81a64e..7f4c41be 100644 --- a/docs/config.md +++ b/docs/config.md @@ -312,12 +312,12 @@ Though using this option may also be necessary if you try to use Codex in enviro ### tools.\* -Use the optional `[tools]` table to toggle built-in tools that the agent may call. Both keys default to `false` (tools stay disabled) unless you opt in: +Use the optional `[tools]` table to toggle built-in tools that the agent may call. `web_search` stays off unless you opt in, while `view_image` is now enabled by default: ```toml [tools] web_search = true # allow Codex to issue first-party web searches without prompting you -view_image = true # let Codex attach local images (paths in your workspace) to the model request +view_image = false # disable image uploads (they're enabled by default) ``` `web_search` is also recognized under the legacy name `web_search_request`. The `view_image` toggle is useful when you want to include screenshots or diagrams from your repo without pasting them manually. Codex still respects sandboxing: it can only attach files inside the workspace roots you allow. @@ -926,7 +926,7 @@ Valid values: | `experimental_use_exec_command_tool` | boolean | Use experimental exec command tool. | | `projects..trust_level` | string | Mark project/worktree as trusted (only `"trusted"` is recognized). | | `tools.web_search` | boolean | Enable web search tool (alias: `web_search_request`) (default: false). | +| `tools.view_image` | boolean | Enable or disable the `view_image` tool so Codex can attach local image files from the workspace (default: true). | | `forced_login_method` | `chatgpt` \| `api` | Only allow Codex to be used with ChatGPT or API keys. | | `forced_chatgpt_workspace_id` | string (uuid) | Only allow Codex to be used with the specified ChatGPT workspace. | | `cli_auth_credentials_store` | `file` \| `keyring` \| `auto` | Where to store CLI login credentials (default: `file`). | -| `tools.view_image` | boolean | Enable the `view_image` tool so Codex can attach local image files from the workspace (default: false). |