Repository navigation
Closed as not planned
Closed as not planned
Copy link
Description
Description
Using Synara 0.8.1 on macOS with opencode 1.18.27 and model opencode-go/muse-spark-1.3-contributor (free contributor, opencode-go paid subscription) always fails immediately with:
AI_APICallError: Error from provider (Console Go): Upstream request failed: [invalid_request_error] Recursive JSON schemas are not currently supported
Same error occurs with muse-spark-1.2-contributor. Reported on behalf of user running Meta Muse Spark via Console Go. Mentioning Meta Muse Spark as requested.
Reproduction
- Install Synara desktop 0.8.1 on macOS, enable opencode provider (binary
opencode, version 1.18.27 verified viaopencode --version). - In OpenCode config select model
opencode-go/muse-spark-1.3-contributor. - Start any task via Synara using opencode runtime (e.g. cwd
/Users/AleksandrSlobodanyuk/Projects/Current/mj/opsarmor.net). - First request fails before any tool executes with error above. Thread title generation also fails with same model (
generateThreadTitle: Unexpected server error. model=opencode-go/muse-spark-1.3-contributor).
Expected
Request succeeds like it does in opencode TUI directly, or like other models do inside Synara.
Actual / Logs
From ~/.local/share/opencode/log/opencode.log:
stream providerID=opencode-go modelID=muse-spark-1.3-contributor ... error.error="AI_APICallError: Error from provider (Console Go): Upstream request failed: [invalid_request_error] Recursive JSON schemas are not currently supported"
stream providerID=opencode-go modelID=muse-spark-1.2-contributor ... same error
stream providerID=opencode-go modelID=qwen3.8-flash ... success (step=1, exiting loop)
From ~/.synara/userdata/logs/server.log:
provider command reactor failed to generate thread title ... threadModel: opencode-go/muse-spark-1.3-contributor ... Text generation failed in generateThreadTitle
grep -c "Recursive JSON" ~/.local/share/opencode/log/opencode.log = 15 occurrences.
Analysis / Suspected root cause
- Same model works fine in opencode TUI directly (this issue was triaged from a live opencode session on muse-spark-1.3-contributor in another project with no failure).
- Same Synara setup works with qwen3.8-flash, so failure is Muse-Spark-specific.
- Synara is MCP-native both ways: agents running inside Synara automatically receive Synara task-coordination tools via agent gateway MCP proxy (
~/.synara/userdata/agent-gateway-mcp-proxy.mjs->SYNARA_AGENT_GATEWAY_URL). Those extra tools are only present in Synara-driven sessions, explaining TUI-ok vs Synara-fail difference. - Meta Model API explicitly rejects recursive schemas (https://ai.developer.meta.com/docs/features/structured-output/).
- Likely same root cause as Recursive $ref in postgres tool schemas breaks Meta Muse Spark ("Recursive JSON schemas are not currently supported") #45800 (postgres tool \ sem recursive $ref $defs __schema0) and Bug Report — houseCARL + Muse Spark 1.2 Contributor (Console Go) — Recursive JSON Schema #45823 (housecarl MCP recursive $ref): Synara gateway tools contain self-referencing $ref, and
packages/opencode/src/provider/transform.tshas sanitizers for OpenAI/Moonshot/Gemini but no Meta/Muse-specific sanitization, so recursive schemas pass through to Meta unchanged. - Unmerged PR fix(provider): inline openai-compatible tool refs #29295 (inline local $refs, replace recursive refs with permissive {}) or merged MCP fix fix(mcp): fall back on circular tool schemas #16910 (fallback to {type:object, additionalProperties:true}) approach would apply here too, but scoped to Meta provider.
Workaround tried
- Switching Synara task to qwen3.8-flash works.
- Using muse-spark-1.3-contributor directly in opencode TUI (outside Synara) works.
Environment
- macOS (Apple Silicon), Synara 0.8.1, Synara.app present in /Applications
- opencode 1.18.27 (
/Users/AleksandrSlobodanyuk/.hermes/node/bin/opencode) - Global opencode.json model:
opencode-go/muse-spark-1.3-contributor, MCP: only 1password (disabled) - Auth: opencode-go subscription in
~/.local/share/opencode/auth.json - No project-level opencode.json in failing project
Request
- Log / identify which tool schema is recursive when Meta rejects it (include tool name in error or debug log).
- Add Meta/Muse schema sanitization in provider transform layer (flatten recursive $ref cycles before sending to Console Go / Meta API).
- Alternatively document Synara gateway tools as incompatible with Muse Spark until fixed.
Metadata
Metadata
Assignees
Labels
No labels
Activity
alexfoxtm commentedon Sep 3, 2026
Correction from reporter: this is a Synara-side issue, not opencode. Same model works in opencode TUI directly; failure only occurs for Synara-driven sessions where Synara gateway MCP tools are injected (recursive $ref rejected by Meta API).
Tracked in Synara repo: Emanuele-web04/synara#957
Closing as misfiled here.
github-actions commentedon Sep 3, 2026
This issue might be a duplicate of existing issues. Please check:
Both report the same root cause: recursive $ref schemas in MCP tool definitions being passed through to the Meta/Console Go API without sanitization. Consider following or contributing to those issues for updates on a fix.