mirror of
https://github.com/openai/codex.git
synced 2026-05-28 06:55:01 +00:00
make direct only allowed caller for standalone websearch (#24646)
only allow `Direct` callers of the standalone websearch tool because its not supported in codemode
This commit is contained in:
@@ -128,6 +128,10 @@ async fn standalone_web_search_round_trips_encrypted_output() -> Result<()> {
|
||||
"search_query": [{"q": "standalone web search"}],
|
||||
})
|
||||
);
|
||||
assert_eq!(
|
||||
search_body["settings"]["allowed_callers"],
|
||||
json!(["direct"])
|
||||
);
|
||||
assert_eq!(
|
||||
search_body["input"]
|
||||
.as_array()
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use codex_api::AllowedCaller;
|
||||
use codex_api::ApproximateLocation;
|
||||
use codex_api::LocationType;
|
||||
use codex_api::SearchContextSize;
|
||||
@@ -71,6 +72,7 @@ fn search_settings(config: &Config, web_search_mode: WebSearchMode) -> SearchSet
|
||||
allowed_domains: filters.allowed_domains.clone(),
|
||||
blocked_domains: None,
|
||||
}),
|
||||
allowed_callers: Some(vec![AllowedCaller::Direct]),
|
||||
external_web_access: Some(match web_search_mode {
|
||||
WebSearchMode::Live => true,
|
||||
WebSearchMode::Cached | WebSearchMode::Disabled => false,
|
||||
|
||||
Reference in New Issue
Block a user