mirror of
https://github.com/openai/codex.git
synced 2026-11-02 16:20:35 +00:00
chore: deprecate old web search feature flags (#10097)
deprecate all old web search flags and aliases, including: - `[features].web_search_request` and `[features].web_search_cached` - `[tools].web_search` - `[features].web_search` slightly rework `legacy_usages` to enable pointing to non-features from deprecated features; we need to point to `web_search` (not under `[features]`) from things like `[features].web_search_cached` and `[features].web_search_request`. Added integration tests to confirm deprecation notice is shown on explicit enablement and disablement of deprecated flags.
This commit is contained in:
1 parent
b8156706e6
commit
851617ff5a
3 files changed
+136
-17
No files matched your search
@@ -765,19 +765,13 @@ impl Session {
|
||||
|
||||
let mut post_session_configured_events = Vec::<Event>::new();
|
||||
|
||||
for (alias, feature) in config.features.legacy_feature_usages() {
|
||||
let canonical = feature.key();
|
||||
let summary = format!("`{alias}` is deprecated. Use `[features].{canonical}` instead.");
|
||||
let details = if alias == canonical {
|
||||
None
|
||||
} else {
|
||||
Some(format!(
|
||||
"Enable it with `--enable {canonical}` or `[features].{canonical}` in config.toml. See https://github.com/openai/codex/blob/main/docs/config.md#feature-flags for details."
|
||||
))
|
||||
};
|
||||
for usage in config.features.legacy_feature_usages() {
|
||||
post_session_configured_events.push(Event {
|
||||
id: INITIAL_SUBMIT_ID.to_owned(),
|
||||
msg: EventMsg::DeprecationNotice(DeprecationNoticeEvent { summary, details }),
|
||||
msg: EventMsg::DeprecationNotice(DeprecationNoticeEvent {
|
||||
summary: usage.summary.clone(),
|
||||
details: usage.details.clone(),
|
||||
}),
|
||||
});
|
||||
}
|
||||
if crate::config::uses_deprecated_instructions_file(&config.config_layer_stack) {
|
||||
|
||||
Reference in new issue
Block a user