feat: best-effort compact large tool schemas#23904
Conversation
ac122ea to
d16a35f
Compare
d16a35f to
2fd9682
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2fd9682429
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
d747075 to
93779ac
Compare
db23b72 to
9860d3c
Compare
|
@codex review |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
b74b130 to
0ef6923
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0ef6923873
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
0ef6923 to
416e53e
Compare
416e53e to
c14c9d1
Compare
73ec600 to
368d872
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 368d8729db
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
368d872 to
f553d8f
Compare
Why
The
dev/cc/ref-defbranch preserves richer JSON Schema detail for connector tools, including$defsand nested shapes. That improves fidelity, but it pushes the largest connector schemas well past the intended tool-schema budget. This PR adds a best-effort compaction pass for unusually large tool input schemas so the p99 and max tails stay small while ordinary schemas are left alone.What Changed
codex-rs/tools/src/json_schema.rsafter schema sanitization and definition pruning.descriptionmetadata.$defs/definitions.{}.Corpus Results
Scope: 2,025 schemas under
golden_schemas, all parsed successfully. Token count iso200k_baseover compact JSON fromparse_tool_input_schema.origin/main4dbca61e20dev/cc/ref-deff9bf071758After this PR,
0 / 2,025schemas are over 1k tokens.Compaction Savings
These are cumulative waterfall stages over the same corpus. Later passes only run for schemas that are still over the compact JSON budget proxy.
descriptionmetadata$defs/definitions{}