Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

chore(config) rm tools.view_image (#22501)

Dylan Hurd9c691b74d682
diff --git a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json
index 667607d43e..6da572813f 100644
--- a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json
+++ b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json
@@ -17693,12 +17693,6 @@
},
"ToolsV2": {
"properties": {
- "view_image": {
- "type": [
- "boolean",
- "null"
- ]
- },
"web_search": {
"anyOf": [
{
diff --git a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json
index c1a99eddda..e338f4151f 100644
--- a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json
+++ b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json
@@ -15517,12 +15517,6 @@
},
"ToolsV2": {
"properties": {
- "view_image": {
- "type": [
- "boolean",
- "null"
- ]
- },
"web_search": {
"anyOf": [
{
diff --git a/codex-rs/app-server-protocol/schema/json/v2/ConfigReadResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ConfigReadResponse.json
index 87a826e5af..2e0a05725c 100644
--- a/codex-rs/app-server-protocol/schema/json/v2/ConfigReadResponse.json
+++ b/codex-rs/app-server-protocol/schema/json/v2/ConfigReadResponse.json
@@ -748,12 +748,6 @@
},
"ToolsV2": {
"properties": {
- "view_image": {
- "type": [
- "boolean",
- "null"
- ]
- },
"web_search": {
"anyOf": [
{
diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ToolsV2.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ToolsV2.ts
index 784991f017..13dc06e915 100644
--- a/codex-rs/app-server-protocol/schema/typescript/v2/ToolsV2.ts
+++ b/codex-rs/app-server-protocol/schema/typescript/v2/ToolsV2.ts
@@ -3,4 +3,4 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { WebSearchToolConfig } from "../WebSearchToolConfig";
-export type ToolsV2 = { web_search: WebSearchToolConfig | null, view_image: boolean | null, };
+export type ToolsV2 = { web_search: WebSearchToolConfig | null, };
diff --git a/codex-rs/app-server-protocol/src/protocol/v1.rs b/codex-rs/app-server-protocol/src/protocol/v1.rs
index 95ab710a6b..f8e9afdd12 100644
--- a/codex-rs/app-server-protocol/src/protocol/v1.rs
+++ b/codex-rs/app-server-protocol/src/protocol/v1.rs
@@ -228,7 +228,6 @@ pub struct Profile {
#[serde(rename_all = "camelCase")]
pub struct Tools {
pub web_search: Option<bool>,
- pub view_image: Option<bool>,
}
#[derive(Deserialize, Debug, Clone, PartialEq, Serialize, JsonSchema, TS)]
diff --git a/codex-rs/app-server-protocol/src/protocol/v2/config.rs b/codex-rs/app-server-protocol/src/protocol/v2/config.rs
index 2c0e2df8e5..28a2ad01f9 100644
--- a/codex-rs/app-server-protocol/src/protocol/v2/config.rs
+++ b/codex-rs/app-server-protocol/src/protocol/v2/config.rs
@@ -120,7 +120,6 @@ pub struct SandboxWorkspaceWrite {
#[ts(export_to = "v2/")]
pub struct ToolsV2 {
pub web_search: Option<WebSearchToolConfig>,
- pub view_image: Option<bool>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS, ExperimentalApi)]
diff --git a/codex-rs/app-server/tests/suite/v2/config_rpc.rs b/codex-rs/app-server/tests/suite/v2/config_rpc.rs
index b5f795740c..406dc9ef6c 100644
--- a/codex-rs/app-server/tests/suite/v2/config_rpc.rs
+++ b/codex-rs/app-server/tests/suite/v2/config_rpc.rs
@@ -101,9 +101,6 @@ model = "gpt-user"
[tools.web_search]
context_size = "low"
allowed_domains = ["example.com"]
-
-[tools]
-view_image = false
"#,
)?;
let codex_home_path = codex_home.path().canonicalize()?;
@@ -138,7 +135,6 @@ view_image = false
allowed_domains: Some(vec!["example.com".to_string()]),
location: None,
}),
- view_image: Some(false),
}
);
assert_eq!(
@@ -159,13 +155,6 @@ view_image = false
file: user_file.clone(),
}
);
- assert_eq!(
- origins.get("tools.view_image").expect("origin").name,
- ConfigLayerSource::User {
- file: user_file.clone(),
- }
- );
-
let layers = layers.expect("layers present");
assert_layers_user_then_optional_system(&layers, user_file)?;
diff --git a/codex-rs/config/src/config_toml.rs b/codex-rs/config/src/config_toml.rs
index fdca03de1a..b627a83726 100644
--- a/codex-rs/config/src/config_toml.rs
+++ b/codex-rs/config/src/config_toml.rs
@@ -598,10 +598,6 @@ pub struct ToolsToml {
deserialize_with = "deserialize_optional_web_search_tool_config"
)]
pub web_search: Option<WebSearchToolConfig>,
-
- /// Enable the `view_image` tool that lets the agent attach local images.
- #[serde(default)]
- pub view_image: Option<bool>,
}
#[derive(Deserialize)]
@@ -679,7 +675,6 @@ impl From<ToolsToml> for Tools {
fn from(tools_toml: ToolsToml) -> Self {
Self {
web_search: tools_toml.web_search.is_some().then_some(true),
- view_image: tools_toml.view_image,
}
}
}
diff --git a/codex-rs/config/src/profile_toml.rs b/codex-rs/config/src/profile_toml.rs
index 11d3a6a403..ed036d1b4e 100644
--- a/codex-rs/config/src/profile_toml.rs
+++ b/codex-rs/config/src/profile_toml.rs
@@ -61,7 +61,6 @@ pub struct ConfigProfile {
pub include_environment_context: Option<bool>,
pub experimental_use_unified_exec_tool: Option<bool>,
pub experimental_use_freeform_apply_patch: Option<bool>,
- pub tools_view_image: Option<bool>,
pub tools: Option<ToolsToml>,
pub web_search: Option<WebSearchMode>,
pub analytics: Option<AnalyticsConfigToml>,
diff --git a/codex-rs/core/config.schema.json b/codex-rs/core/config.schema.json
index 847cd48399..82fde87e78 100644
--- a/codex-rs/core/config.schema.json
+++ b/codex-rs/core/config.schema.json
@@ -685,9 +685,6 @@
"tools": {
"$ref": "#/definitions/ToolsToml"
},
- "tools_view_image": {
- "type": "boolean"
- },
"tui": {
"allOf": [
{
@@ -2504,11 +2501,6 @@
"ToolsToml": {
"additionalProperties": false,
"properties": {
- "view_image": {
- "default": null,
- "description": "Enable the `view_image` tool that lets the agent attach local images.",
- "type": "boolean"
- },
"web_search": {
"allOf": [
{
diff --git a/codex-rs/core/src/config/config_tests.rs b/codex-rs/core/src/config/config_tests.rs
index d4db387631..f6d6eff968 100644
--- a/codex-rs/core/src/config/config_tests.rs
+++ b/codex-rs/core/src/config/config_tests.rs
@@ -376,13 +376,7 @@ web_search = true
)
.expect("TOML deserialization should succeed");
- assert_eq!(
- cfg.tools,
- Some(ToolsToml {
- web_search: None,
- view_image: None,
- })
- );
+ assert_eq!(cfg.tools, Some(ToolsToml { web_search: None }));
}
#[test]
@@ -395,13 +389,7 @@ web_search = false
)
.expect("TOML deserialization should succeed");
- assert_eq!(
- cfg.tools,
- Some(ToolsToml {
- web_search: None,
- view_image: None,
- })
- );
+ assert_eq!(cfg.tools, Some(ToolsToml { web_search: None }));
}
#[test]