Repository navigation
fix(memory): enable agent memory save via MCP tools + builtin stream guard - #10887
Merged
Merged
Conversation
…stream guard - memoryTools: apiKeyId now optional; falls back to caller principal (HTTP auth headers / OMNIROUTE_API_KEY env) so agents can store memory without knowing their key id - memorySkillsInjection: server-side memory_* builtins only injected for non-stream requests (stream clients execute tools client-side via MCP) - memoryBuiltins: memory_save/update/search/delete builtin tools with per-provider schemas + interception dispatch - retrieval: fix toFts5MatchQuery import (ReferenceError on FTS5 path) - tests: MCP auto-owner fallback, cross-principal isolation, stream guard
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…guard (cheaper-inference#10887) Merged — clean single-commit extraction from cheaper-inference#9115's genuinely new content (see PR body for the full extraction rationale: 66-commit branch, only 1 commit matched the stated scope). typecheck/file-size/changelog gates clean, 19/19 unit + 14/14 integration tests passing.
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.
Clean extraction of #9115's value commit (by @Egorich-print), whose branch had accumulated 66 commits over 3 weeks — mostly already-merged release history (ChatGPT Web provider, Devin provider, i18n ru, dashboard param-filter fixes, CI changes, Vertex error classifier, etc, all shipped separately). Only ONE commit matched the PR's stated title/scope.
Original commit preserved verbatim, with one exception: the bundled
toFts5MatchQueryimport fix was dropped — it depends on a separateftsQuery.tsextraction commit (from earlier in the same 66-commit branch) that was never merged and doesn't exist on the current release tip. That FTS5 sanitizer work is out of scope for this PR's title and can be a separate follow-up if still needed.Summary
memoryTools:apiKeyIdis now optional; falls back to the caller principal (HTTP auth headers /OMNIROUTE_API_KEYenv) so agents can store memory without knowing their key id.memorySkillsInjection: server-sidememory_*builtins are only injected for non-stream requests (stream clients execute tools client-side via MCP).memoryBuiltins(new):memory_save/update/search/deletebuiltin tools with per-provider schemas + interception dispatch.Validation
npm run typecheck:core— cleannode scripts/check/check-file-size.mjs/check-changelog-integrity.mjs— OKtests/unit/skills-memory-builtins.test.ts+tests/unit/chatcore-memory-skills-injection.test.ts— 19/19 passingtests/integration/memory-pipeline.test.ts— 14/14 passingCo-authored-by: Egor egorich-print@users.noreply.github.com