mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
[codex] Enable standalone web search in code mode (#26719)
## What - Consume plaintext `output` from standalone search while retaining optional `encrypted_output` parsing. - Expose `web.run` to code mode and return search output to nested JavaScript calls. - Cover direct and code-mode standalone search paths with integration tests. ## Why `/v1/alpha/search` now returns plaintext output, which code mode needs to consume standalone search results. ## Test plan - `just test -p codex-api` - `just test -p codex-web-search-extension` - `just test -p codex-core code_mode_can_call_standalone_web_search` - `just test -p codex-app-server standalone_web_search_round_trips_output`
This commit is contained in:
1 parent
5a440c03f2
commit
ed6e5cf919
6 files changed
+141
-27
No files matched your search
@@ -26,7 +26,7 @@ use http::HeaderMap;
|
||||
use url::Url;
|
||||
|
||||
use crate::history::recent_input;
|
||||
use crate::output::EncryptedSearchOutput;
|
||||
use crate::output::SearchOutput;
|
||||
use crate::schema::commands_schema;
|
||||
|
||||
pub(crate) const WEB_NAMESPACE: &str = "web";
|
||||
@@ -67,7 +67,7 @@ impl ToolExecutor<ToolCall> for WebSearchTool {
|
||||
}
|
||||
|
||||
fn exposure(&self) -> ToolExposure {
|
||||
ToolExposure::DirectModelOnly
|
||||
ToolExposure::Direct
|
||||
}
|
||||
|
||||
fn supports_parallel_tool_calls(&self) -> bool {
|
||||
@@ -114,9 +114,7 @@ impl ToolExecutor<ToolCall> for WebSearchTool {
|
||||
.emit_completed(web_search_item(&call.call_id, command_action))
|
||||
.await;
|
||||
|
||||
Ok(Box::new(EncryptedSearchOutput::new(
|
||||
response.encrypted_output,
|
||||
)))
|
||||
Ok(Box::new(SearchOutput::new(response.output)))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user