package codex import "encoding/json" // These notices come from disabled legacy flags in the pinned coordinator policy. // Unknown notices and requests still fail closed. func pinnedDeprecation(v envelope) bool { if len(v.ID) != 0 { return false } var p map[string]json.RawMessage var summary, details string if json.Unmarshal(v.Params, &p) != nil || len(p) != 2 || json.Unmarshal(p["summary"], &summary) != nil || json.Unmarshal(p["details"], &details) != nil { return false } switch summary { case "`[features].web_search_cached` is deprecated because web search is enabled by default.": return details == "Set `web_search` to `\"live\"`, `\"indexed\"`, `\"cached\"`, or `\"disabled\"` at the top level (or under a profile) in config.toml if you want to override it." case "`[features].web_search_request` is deprecated because web search is enabled by default.": return details == "Set `web_search` to `\"live\"`, `\"indexed\"`, `\"cached\"`, or `\"disabled\"` at the top level (or under a profile) in config.toml if you want to override it." case "`[features].imagegenext` is deprecated. Use `[features].image_generation` instead.": return details == "Enable it with `--enable image_generation` or `[features].image_generation` in config.toml. See https://developers.openai.com/codex/config-basic#feature-flags for details." case "`[features].memory_tool` is deprecated. Use `[features].memories` instead.": return details == "Enable it with `--enable memories` or `[features].memories` in config.toml. See https://developers.openai.com/codex/config-basic#feature-flags for details." case "`[features].web_search` is deprecated because web search is enabled by default.": return details == "Set `web_search` to `\"live\"`, `\"indexed\"`, `\"cached\"`, or `\"disabled\"` at the top level (or under a profile) in config.toml if you want to override it." } return false }