mirror of
https://github.com/openai/codex.git
synced 2026-12-05 01:00:54 +00:00
Reduce dependency coupling in shared configuration crates (#47713)
## What changed - Move `Provider` and `RetryConfig` into `codex-client`, retaining re-exports from `codex-api`, and switch `codex-model-provider-info` to depend on `codex-client`. - Move feature-state metric emission into `codex-core`, preserving its behavior while removing the `codex-features` dependency on `codex-otel`. - Explicitly enable TLS features for `tonic` in `codex-config` and `reqwest` in `codex-http-client`. - Enable `png`'s `zlib-rs` feature directly in `codex-utils-image` to keep encoded PNG bytes stable when WebSocket dependencies are absent. GitOrigin-RevId: 91fd63ab01b55d516b3e80e3644d06af8d5a01f6
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
//! This crate defines the feature registry plus the logic used to resolve an
|
||||
//! effective feature set from config-like inputs.
|
||||
|
||||
use codex_otel::SessionTelemetry;
|
||||
use codex_protocol::protocol::Event;
|
||||
use codex_protocol::protocol::EventMsg;
|
||||
use codex_protocol::protocol::WarningEvent;
|
||||
@@ -562,24 +561,6 @@ impl Features {
|
||||
self.legacy_usages.iter()
|
||||
}
|
||||
|
||||
pub fn emit_metrics(&self, otel: &SessionTelemetry) {
|
||||
for feature in FEATURES {
|
||||
if matches!(feature.stage, Stage::Removed) {
|
||||
continue;
|
||||
}
|
||||
if self.enabled(feature.id) != feature.default_enabled {
|
||||
otel.counter(
|
||||
"codex.feature.state",
|
||||
/*inc*/ 1,
|
||||
&[
|
||||
("feature", feature.key),
|
||||
("value", &self.enabled(feature.id).to_string()),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Apply a table of key -> bool toggles (e.g. from TOML).
|
||||
pub fn apply_map(&mut self, m: &BTreeMap<String, bool>) {
|
||||
for (k, v) in m {
|
||||
|
||||
Reference in New Issue
Block a user