Merged
Conversation
tpae
previously approved these changes
Apr 13, 2026
tpae
approved these changes
Apr 13, 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.
Summary
Fixes the root causes of slow Time-To-First-Token (TTFT) on local MLX models, particularly on memory constrained devices.
Changes
canCreatePlugins()to have bothconfig.enabled && config.pluginCreateinstead of justpluginCreate. This prevented the 4.2k charactersSandbox Plugin Creator skillfrom being injected when the sandbox toggle is off.Sandbox Plugin Creator skillinto every unrelated promptstreamStartTimeto afterengine.streamChat(). This was incorrectly measuring TTFT by including the model loading time as well. Now the displayed TTFT reflects inference time only not model loadingcell during
loadContainerwhich signifies that the model is still initializing and not ready for inference just yet. It will transition to the three dot indicator once the model is ready and prefill begins (this is when it actually starts processing the prompt and this also the timestamp from which TTFT will be measured)/tmp/osaurus_ttft_trace.logwith full prompt dump to/tmp/osaurus_debug.loggated behind#if DEBUGNOTE: the local models can still use tool calls mid conversation via
capabilities_search → capabilities_loadBefore
16s TTFT for a simple prompt
After
<1s TTFT for the same prompt
Checklist
CONTRIBUTING.md