Skip to content

fix: stabilize MiMo Free Claude streams#1824

Draft
DuyPrX wants to merge 2 commits into
decolua:masterfrom
DuyPrX:codex/mimo-free-claude-stream-stability
Draft

fix: stabilize MiMo Free Claude streams#1824
DuyPrX wants to merge 2 commits into
decolua:masterfrom
DuyPrX:codex/mimo-free-claude-stream-stability

Conversation

@DuyPrX

@DuyPrX DuyPrX commented Jun 15, 2026

Copy link
Copy Markdown

Summary

  • Add mmf/mimo-auto-claude as a Claude-compatible alias for the existing MiMo Free mimo-auto model.
  • Suppress MiMo Free reasoning deltas when translating OpenAI-style streams to Claude so Claude clients do not receive noisy thinking blocks from this provider.
  • Add a synthetic Claude SSE path for Claude clients when a MiMo Free request is large or tool-heavy, while keeping real upstream streaming for small/simple requests.

Why

MiMo Free's OpenAI-compatible streaming endpoint can stall after first bytes on large Claude Code requests, especially when many tools or long message history are present. Once the first bytes are sent, combo fallback cannot recover cleanly and the client may wait until timeout.

This patch keeps the fast path for simple requests (stream=true upstream), but switches large/tool-heavy Claude requests to upstream stream=false and synthesizes a valid Claude SSE response back to the client. That preserves Claude Code's streaming contract while avoiding flaky long-lived MiMo Free SSE sockets.

Notes

The synthetic path currently triggers for Claude requests to mmf when any of these are true:

  • at least 20 tools
  • at least 12 messages
  • request body is at least 200 KB

Testing

  • node --check open-sse/handlers/chatCore.js
  • node --check open-sse/handlers/chatCore/streamingHandler.js
  • node --check open-sse/translator/response/openai-to-claude.js
  • pnpm exec next build --webpack

Opened as draft because this adds a provider-specific stream fallback and the thresholds may need maintainer tuning.

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