Repository navigation
fix(engine): Builder and Autopilot agent steps still run when NEAR AI's embedder does not - #301
Merged
Conversation
…'s embedder does not #296 turned semantic recall off per chat call while the embedder hangs, but workflow agent steps take no per-call memory options. With the embedder down, a Builder agent step and its Autopilot fires kept failing with "Failed to determine the embedder's output dimension". Turning recall off in the agent's defaultOptions was tried first and did not help: Mastra reads it from the Memory there. So the agent's memory is a function: while embedderReady() is false it returns the same Memory settings with semanticRecall: false and no vector or embedder. The agent hands it Mastra's storage, so threads, messages and working memory are shared. Chat behaviour is unchanged. Tests (NEAR AI's embedder still down; live tests run with the embedder marked down, as the probe does): - test/workflows.test.ts: before 7/9 (agent steps failed on the embedder), after 9/9. - test/autopilot.test.ts: pass. test/threads.test.ts: all pass except the one that embeds through NEAR AI (needs the embedder). - New memory.test.ts case: down -> Memory without recall, up -> the usual. - typecheck clean; test:unit 188/188. - Load: k6 load/workflow.js AGENT=1, 2 VUs 30 s: 202/202 checks, 0% failed; load/chat.js 20 s: 60/60 checks, 0% failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q5ZrzK8une3S2YyhDG746e
Contributor
Author
|
Merged (Axel's approval). @Lin1er @AncungAulia it deploys to the hosted demo automatically. While NEAR AI's embedder is down, Builder and Autopilot agent steps now run without semantic recall instead of failing, the same way chat already did after #296. Nothing changes in FE, BE or env. |
Contributor
|
Live on the hosted demo:
|
This was referenced Nov 12, 2026
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.
Follow-up to #296. That PR keeps chat alive while NEAR AI's embeddings endpoint hangs, but Builder and Autopilot agent steps still failed. Workflow agent steps take no per-call memory options, and Mastra still tried to embed:
Fix
memoryis now a function (memoryFor()inengine/src/mastra.ts):embedderReady()is false, it returns the same Memory settings withsemanticRecall: falseand no vector or embedder;defaultOptionsfirst. It did not help, because Mastra reads that setting from the Memory in the workflow path.Tests
NEAR AI's embedder was still down. Live tests ran with the embedder marked down, which is what the probe does on the server.
test/workflows.test.ts: before 7/9 (the agent steps failed on the embedder), after 9/9.test/autopilot.test.ts: all pass.test/threads.test.ts: all pass except the one test that embeds through NEAR AI, which needs the embedder.memory.test.tscase: embedder down gives the Memory without recall; embedder up gives the usual one.test:unit188/188.k6 load/workflow.js -e AGENT=1, 2 VUs for 30 s: 202/202 checks, 0% failed;load/chat.jsfor 20 s: 60/60 checks, 0% failed.Approved by Axel. Merging deploys to the hosted demo.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Q5ZrzK8une3S2YyhDG746e