mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
Add metrics for extension-rendered skill catalogs (#35597)
## What changed - Add an optional `ExtensionMetrics` capability to thread, turn-input, and world-state contributors, backed by session telemetry in the host. - Record skill counts, omissions, and truncated description characters for extension-rendered catalogs, tagged by the catalog surface. - Preserve host session attribution on extension metrics, including the effective model for each turn, and prevent extension tags from overriding host metadata. - Avoid duplicate host-catalog samples by recording world-state metrics only when the section is published or changes. ## Testing - Cover metric values and surface tags, session metadata preservation, turn-level model changes, and host world-state publication behavior. GitOrigin-RevId: 9059e521943a8f81df25a38b03692eddbc1d990d
This commit is contained in:
1 parent
3d519bf63a
commit
d6ea5991e7
23 files changed
+625
-8
No files matched your search
@@ -121,7 +121,7 @@ impl SkillRenderReport {
|
||||
.then(|| SKILL_DESCRIPTION_TRUNCATED_WARNING.to_string())
|
||||
}
|
||||
|
||||
fn average_truncated_description_chars(&self) -> usize {
|
||||
pub(crate) fn average_truncated_description_chars(&self) -> usize {
|
||||
if self.total_count == 0 || self.truncated_description_chars == 0 {
|
||||
return 0;
|
||||
}
|
||||
@@ -158,7 +158,7 @@ fn metadata_line_cost(budget: SkillMetadataBudget, line: &str) -> usize {
|
||||
}
|
||||
|
||||
impl SkillMetadataBudget {
|
||||
fn limit(self) -> usize {
|
||||
pub(crate) fn limit(self) -> usize {
|
||||
match self {
|
||||
Self::Tokens(limit) | Self::Characters(limit) => limit,
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user