You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tool calling broken on LM Studio and Ollama: Local models emit tool calls as inline <tool_call>{...}</tool_call> blocks inside delta.content instead of native delta.tool_calls. The SSE parser now runs every text chunk through a new ToolCallAdapter (src/tools/toolCallAdapter.ts) that detects these XML-style blocks, generates a stable callId, and emits a LanguageModelToolCallPart. Native delta.tool_calls is still honored (OpenCode / Zen / Go unchanged).
Tool-calls and reasoning tags from many model families: The parser recognizes the full range of XML/pipe-bar/bracket/markdown tag variants used by Qwen, DeepSeek, Hermes, Llama 3.x, Mistral (<antml:function_calls>), Phi-3.5, Granite, Cohere, Yi, and any local model that emits reasoning or tool blocks inside delta.content. Tool-call tags: <tool_call>, <toolcall>, <tool>, <invoke name="x">, <action>, <function>, <antml:function_calls>, <|tool_call|> (Llama 3), [TOOL_CALL] / [TOOL_CALLS] (Cohere/Yi). Reasoning tags: <think>, <thinking>, <reasoning>, <reflection>, <analysis>, <thought>, <solution>, <plan>, <|thinking|> / <|reasoning|>, [THINK], and markdown-style ### Reasoning / ### Thought / ### Plan blocks. Body parsing supports the common JSON shapes ({name, arguments|parameters|input|args}, {function: {name, arguments}}, Cohere {tool, parameters}) and the Hermes/Granite XML form <invoke name="x">JSON-args</invoke>.
Reasoning blocks missing on LM Studio and Ollama: `` blocks inside delta.content are now parsed and emitted as `LanguageModelThinkingPart`, so reasoning models show their thinking as a collapsible block. Native `delta.reasoning_content` is still honored.
LM Studio / Ollama servers invisible in the side panel: OpenCodeTreeProvider only received OpenCode servers in its state. The two local providers now expose getServerList() and refreshTreeView() aggregates them under the same Dashboard header with a per-type icon (LM Studio = $(chip), Ollama = $(zap)).
LM Studio / Ollama servers lost on reload: Servers added via the "Add Server" command were kept only in memory. They are now persisted to SecretStorage (workspace state) under a new LocalServerConfig schema and re-hydrated on activate().
Added
Per-device LM Studio model entries: Newer LM Studio versions expose the same model key once per device (GPU0, GPU1, CPU, MPS). The provider now reads loaded_instances[] and emits one RoutedModelInfo per (model, device) pair, with the device id suffixed in the display name and embedded in the composite id (${serverId}:${key}@${device}). Single-device installations keep the original naming.
Unified "Remove Server" picker: opencode-zen.removeServer now lists OpenCode, LM Studio and Ollama entries together, dispatching to the right backend (MultiServerManager vs LMStudioProvider vs OllamaProvider) and persisting accordingly.
ToolCallAdapter unit tests in test/tool-call-adapter.test.ts: 46 cases covering complete blocks, split chunks, partial opening tags, nested JSON shape, malformed bodies, interleaved reasoning + tool calls, and every supported tag family (Qwen, DeepSeek, Hermes, Llama 3.x, Mistral, Cohere, Yi, markdown headers).
README.md: Documentación completa de LM Studio, Ollama, OpenCode Servers, y OpenCode Cloud
[3.2.5] - 2026-06-11
Added
Tests reales con datos del servidor: 30 tests pasando validados contra respuestas reales.
test/OpenCodeServerProvider.test.ts — 15 tests: extracción de texto/reasoning/tokens de parts[], manejo de errores, respuestas vacías, tool calls, validación de estructura JSON, simulación de orden de eventos streaming
test/OpenCodeServerProvider.streaming.test.ts — 9 tests: orden reasoning→texto, concatenación de múltiples text parts, cancelación de token, manejo de tool calls, respuesta vacía
test/opencode-server.integration.test.ts — 6 tests de integración REAL con servidor opencode + LMStudio:
Verifica health del servidor, crea sesión, envía mensajes
Tarea pesada: genera 900+ chars con 28K tokens en 22s
Verifica reasoning en respuesta compleja (matemáticas)
Valida estructura JSON: step-start → reasoning → text → step-finish
test/provider-behavior.test.ts — 4 tests HONESTOS del comportamiento REAL:
Documenta que el servidor opencode devuelve JSON completo (NO SSE/streaming)
El provider acumula parts[] y emite al final con yield al event loop
100 parts se procesan en ~165ms (si fuera streaming real tardaría 10-20s)
Valida estructura JSON real del servidor: step-start → reasoning → text → step-finish
Documenta la diferencia: opencode (JSON completo) vs LMStudio (SSE real)
Framework: node:test + tsx (sin jest/mocha)
Fixed
Chat se queda "working" infinitamente: Simplificado OpenCodeServerProvider para procesar la respuesta JSON del servidor de forma directa y limpia. Ahora: fetch() → await response.json() → acumular parts[] → emitir progress.report() con yield al event loop entre cada chunk para que VS Code actualice el UI.
Eliminada simulación por delays: Removido todo el código de parsing multi-formato con delays artificiales de 50ms (readAllStreamData, processAnyFormatResponse, parseSSE, parseNDJSON, processParsedEvents, inferEventType, safeParseJson).
Eliminada dependencia @opencode-ai/sdk: El intento de usar el SDK para SSE streaming no funcionó porque el servidor no emite eventos de contenido en tiempo real vía /global/event. El SDK fue removido del bundle (tree-shaking). Bundle bajó de 177KB a 105KB.
Manejo de respuesta limpio: Acumula reasoning, tool calls y texto por separado, luego los emite en orden (reasoning → tools → text) con await new Promise(r => setTimeout(r, 0)) entre cada uno para ceder al event loop.
Manejo de errores: Verificación de messageData.error a nivel top-level antes de procesar parts[].
[3.2.4] - 2026-06-11
Changed
Intento de integración con SDK @opencode-ai/sdk para SSE streaming. Descartado — el servidor no emite eventos de contenido en tiempo real. Solución final en v3.2.5.
[3.2.3] - 2026-06-11
Fixed
Parsing multi-formato de respuestas del servidor (SSE, NDJSON, JSON parts[], OpenAI delta). Obsoleto en v3.2.5 — reemplazado por SDK nativo. Ver v3.2.4 para contexto.
[3.2.2] - 2026-06-11
Fixed
11 TypeScript compilation errors que rompían tsc --noEmit en CI. Ver release v3.2.2 para el listado completo de archivos corregidos.
[3.2.1] - 2026-06-11
Changed
Server launch: Reemplazado exec() con spawn() para lanzar servidores locales como proceso background sin ventana cmd.exe emergente
Launch UX: El usuario puede elegir entre lanzar servidor en terminal VS Code o como proceso background invisible
Activation: Ya no se auto-lanzan servidores locales al activar la extensión
Added
SSE streaming inicial: Server provider lee respuestas como text/event-stream con progreso incremental
Server launch command: Interfaz interactiva con showQuickPick para elegir modo de lanzamiento
[3.2.0] - 2026-06-02
Added
Subagent tool (opencode_subagent): Registered via vscode.lm.registerTool(), delegates to first available OpenCode provider
Thinking blocks: Server provider and BaseOpenCodeProvider now use LanguageModelThinkingPart for collapsible reasoning content
Fixed
Tool registration in package.json — requires modelDescription, displayName, and inputSchema fields
[3.1.0] - 2026-06-02
Fixed
Server provider session API: Correct request format for OpenCode server (model como { providerID, modelID }, solo model y parts en el body)
[3.0.0] - 2026-06-02
BREAKING CHANGES
models.dev API integration: Model capabilities fetched live from https://models.dev/api.json
Server provider rewrite: Usa session-based API (POST /session + POST /session/:id/message)
Single server provider: All connected servers register under one opencode-server vendor
Added
Live model registry: 40+ Zen models + 16 Go models con context sizes, pricing, y capabilities reales