Repository navigation
fix: preserve Responses-API built-ins through the trim - #26
Merged
Merged
Conversation
askJev silently dropped every tool past the 254th from the criteria, so a 260-tool request offered 254 to routing with zero operator signal. Behavior stays safe (a pick among kept tools still trims); the note is awareness only. The JEV_MODEL env-only doc claim from the same issue was already fixed by #24. - askJev: one "note:" line before the round-trip when names.length > 254 - DEVELOPMENT.md: table row for the note: line (can precede apply: too) - Test 23: 260-tool payload — stub criteria = 254 tools + respond_to_user, note logged, trim still applies
Jev is never shown built-in tools (invariant 4), yet a confident trim removed them from the payload — an actor must not silently delete options it was forbidden to consider. The trim filter now passes type !== "function" entries untouched; the predicate lives in one isBuiltIn() used by candidate selection and the kept-count alike. Corollary: a lone function candidate now reproduces the payload under trim, so that round-trip is skipped — subsuming the old [web_search, shell] special case. apply: log gains a "(+ N built-ins kept)" suffix. Test 7 flipped, test 7b added, invariant-4 text synced (AGENTS/DEVELOPMENT/README), and the Q2-A README privacy note ships alongside.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Implements the design verdict recorded in #12.
Q1 — built-ins survive the trim. Jev is never offered Responses-API built-in tools (
type !== "function"), yet a confident trim removed them from the payload. An actor must not silently delete options it was forbidden to consider. The filter inroutePayloadnow passes built-ins through untouched; the predicate is unified into oneisBuiltIn()shared by candidate selection and the kept-count. Corollary: a lone function candidate + built-ins can only reproduce the payload, so that Jev round-trip is skipped — subsuming the old[web_search, shell]special case. Theapply:log gains a(+ N built-ins kept)suffix.Q2 — README Privacy section (option A). States exactly what conversation content is POSTed to
apiUrl(first user message + last 4 turns, 2 KB/turn, 8 KB cap, ≤254 tool names, default hostapi.typesafe.ai) and the zero-egress paths (unconfigured = invisible; self-hosted endpoint viaapiUrl/JEV_API_URL). Option B (stateMode) deferred as YAGNI per the issue.Tests
[web_search, shell, read] → shell@0.95ships[web_search, shell]; asserts the new log suffix.Gates
npm run typecheck✓ ·npm test26/26 ✓ ·npm run build✓Note: squash-only repo, so the Q2 docs ride the single
fix:commit — patch bump comes from the behavior change, the privacy note adds nothing release-wise on its own.Fixes #12