Repository navigation
Return real E2EE tool calls to agents like Hermes - #3
Merged
Merged
Conversation
The proxy kept only decrypted text and always finished with stop, then rejected the follow-up because an assistant tool call uses content null. Stream tool_calls deltas in order, assemble them when the client does not stream, and send tool-result bodies to encrypt while leaving call metadata in the clear. The library pin is the unpublished commit 7b4e652 until 0.3.0 is on npm. Co-authored-by: guil <guil@axlabs.com>
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.
Summary
Hermes could not use tools on E2EE models. Venice already emitted the call: a short preamble in
delta.content, thendelta.tool_calls, thenfinish_reason: "tool_calls". This proxy kept only the text and closed the stream withfinish_reason: "stop". Hermes stored that cut-off message and never ran a tool. The follow-up was then rejected, because an assistant tool-call message iscontent: nullandChatMessageDtorequiredcontent.toPlainMessagesalso strippedtool_calls,tool_call_id, andnamebefore encryption.After this change:
delta.tool_callschunks in upstream order. The final chunk uses the real finish reason (tool_calls,stop, orlength).indexontomessage.tool_calls. A tool-only turn hascontent: null.content: nulland includetool_calls,tool_call_id, andname.encrypt, so they stay ciphertext. Tool names, JSON schemas, call ids, and arguments stay plaintext. That is the Venice E2EE rule: the enclave chat template reads those fields as JSON.Library pin
@axlabs/venice-e2eeis pinned to the merged library commit7b4e6528f7f870402224bc887de06f0952f7f575(AxLabs/venice-e2ee#1) viagit+https, not the registry.0.2.0still drops tool calls, and0.3.0is not on npm. This environment has no npm credentials, and the library CI workflow does not publish.Follow-up, from a clean library
main:npm run release -- minor # 0.2.0 -> 0.3.0, publishes @axlabs/venice-e2eeThen in this repo, replace the git pin with
"@axlabs/venice-e2ee": "^0.3.0", refresh the lockfile, and release the proxy (npm run release -- patch).decryptStreamnow yields structured events instead of strings, so do not point this proxy back at0.2.0.Tests
npm test— 34 passednpm run lint— cleannpm run build— nest build succeedednpm ci— installs the pinned library commit over HTTPS