Skip to content

Track Eredu main 465cf519 (planned-session API port) - #2

Merged
michaelneale merged 3 commits into
mainfrom
wario/eredu-465cf519
Nov 4, 2026
Merged

michaelneale merged 3 commits into
mainfrom
wario/eredu-465cf519

Conversation

@michaelneale

@michaelneale michaelneale commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Tracks upstream Eredu main at 465cf519 (2026-10-29), 89 commits past the previous pin d5683bb3 (Oct 7).

What the bump brings

  • MLX 0.32.0 → 0.32.3 with the rebased native patch stack (3e74a8e2).
  • New families: Phi-4 (original), DiffusionGemma, Muse Spark Open, Nemotron Labs Diffusion; Gemma 4 MLX checkpoint compatibility fix (1cb681fb).
  • Reasoning parsing independent of native tool support; tool-call completion events now carry schema-validated arguments.

Port (API changes between the pins)

  • LoadedModel::load_execution_plan now returns a PlannedModel; the plugin keeps it target-only (into_target_only()) and prepares/settles through model_mut().
  • generate_prepared_chat(PreparedChatGenerationRequest) → generate(GenerationRequest { output_mode: Semantic, control_handle: None, .. }).
  • SemanticEvent::ToolCallEnd → ToolCallCompleted { .. } (only a complete, validated call closes a tool call).
  • NativeToolSupport::Unsupported { reason } → { rejection }.
  • Reference: eredu/examples/native_tool_calling.rs at 465cf519.

Thinking control through Mesh (second commit)

Mesh canonicalizes every thinking knob a client sends (enable_thinking, reasoning_effort, reasoning, …) into chat_template_kwargs.enable_thinking and forwards it together with the source field. The plugin's strict request schema rejected chat_template_kwargs, so through Mesh (0.78.1 and main alike) any request that turned thinking off — including tool calls with enable_thinking: false — failed with HTTP 400 (present since v0.1.5; found while testing this PR through Mesh). The request schema now accepts chat_template_kwargs and reasoning_effort, resolves enable_thinking with Mesh's precedence (reasoning_effort < explicit flag < caller kwargs), and passes the remaining kwargs to Eredu's extra_template_kwargs. Unknown top-level fields still fail closed.

Tool-result replay (third commit)

The plugin emits OpenAI's content: null for a text-free tool-call turn. Replaying that turn (the normal tool-result follow-up) failed in Qwen3's template ('</think>' in message.content on null → eredu_error); the old pin masked this by returning the call text as content. Assistant messages with null/missing content are now normalized to "" before rendering.

Checks

  • Local (portable): cargo fmt --check, cargo test --locked --all-targets (15 mock tests), cargo clippy --locked --all-targets -D warnings — pass.
  • Native build + release clippy: this PR's CI (macos-26, Xcode 26.6). Upstream now requires Xcode ≥ 26.2 for MLX's NAX JIT kernels; the runner already satisfies it.
  • Live runs of the CI artifacts through Mesh v0.78.1 and a Mesh main build (f48d5afaf) with Qwen3-1.7B-4bit: models list, chat, SSE, thinking off (enable_thinking, reasoning_effort: none), tool call (JSON + SSE), tool-result follow-up, SIGINT cleanup — results in the Buzz eredu-plugin thread.

- Pin eredu, eredu-core and eredu-backend-mlx to jbg/eredu@465cf519
  (MLX 0.32.3, new families, validated tool-call completion events).
- native.rs: keep the PlannedModel returned by load_execution_plan
  (target-only), prepare through model_mut(), generate with
  GenerationRequest { output_mode: Semantic, control_handle: None, .. },
  count SemanticEvent::ToolCallCompleted instead of the removed ToolCallEnd,
  and read NativeToolSupport::Unsupported { rejection }.
- check-model path uses model_mut() for reset/synchronize.

Portable verify (fmt, 13 mock tests, clippy -D warnings) passes locally;
the native build is exercised by CI on macos-26.
@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 343112e2-941f-43ce-af62-765c8c6e897e
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Wario added 2 commits November 4, 2026 09:11
…d reasoning_effort

Through Mesh every thinking control (enable_thinking, reasoning_effort, ...) is
canonicalized into chat_template_kwargs.enable_thinking and forwarded with the
source field, which the strict request schema rejected (HTTP 400 for any
request that turns thinking off, including tool calls with enable_thinking=false).
Resolve the knobs with Mesh's precedence and pass remaining template kwargs to
Eredu's extra_template_kwargs.
The plugin emits OpenAI's content: null for a text-free tool call; replaying
that message failed in Qwen3's template ('</think>' in message.content on null).
Normalize null/missing assistant content to an empty string before rendering.
@michaelneale
michaelneale merged commit 05a82a4 into main Nov 4, 2026
3 checks passed
@michaelneale
michaelneale deleted the wario/eredu-465cf519 branch November 4, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant