fix: route muse-spark to /v1/responses (Zen requires Responses API) - #2
Open
ConTresillo wants to merge 1 commit into
Open
ConTresillo wants to merge 1 commit into
ConTresillo wants to merge 1 commit into
Conversation
muse-spark-1.2/1.3-contributor-free now return 500 on POST /zen/v1/chat/completions and 200 on POST /zen/v1/responses per opencode.ai/docs/zen (issues #44659, #44847, #45744). Previously zen-proxy always hit /chat/completions, so Spark was bucketed as flaky and dashboard Test never succeeded. - Route /muse-spark/i models to /responses with chat->input translation (chatMessagesToInput) and back-translation (responsesOutputToText -> chat.completion shape) - Ignore tiny max_tokens (<256) for Responses models; Spark uses ~900 reasoning tokens for a trivial prompt and truncates to empty output_text when max_output_tokens is small - Probe and /api/test also use the correct endpoint, so auto-sync now marks Spark as working instead of flaky - Verified via zen-proxy: POST /v1/chat/completions with model=muse-spark-1.2/1.3-contributor-free -> 200 with text, and sync working list now includes both Spark variants
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.
Fixes Muse Spark always showing as flaky / Test ✕ in the dashboard.
Root cause: Upstream Zen moved muse-spark-1.2/1.3-contributor-free to the Responses API. POST /zen/v1/chat/completions now returns 500 {"type":"error","message":"Internal server error"} for those IDs (repro 100%, issues #44659 #44847 #45744), while POST /zen/v1/responses with {"input":"hi"}\ returns 200. Docs at https://opencode.ai/docs/zen now list Spark under /v1/responses. Zen-proxy previously always hit /chat/completions, so Spark was bucketed as flaky and dashboard Test never succeeded even though the model is healthy.
Validated that the local \opencode serve\ path (\C:\DevLearning\opencode-as-cloudllm\ gateway via \POST /session\ -> /session/:id/message) still works for Spark — this is why the same model works in that project but not via zen-proxy's remote Zen path. Direct upstream probing confirms: \muse-spark-*\ -> 500 on chat, 200 on responses;
emotron-3.5\ intermittent timeout; \deepseek-v4-flash-free\ -> 400 model unavailable.
Fix:
esponsesOutputToText()\ -> OpenAI \chat.completion\ shape (so existing /v1/chat/completions\ clients keep working).
Verified: