Question
OpenCode 1.15.12
I self-hosted Ollama locally using Docker and installed the gemma4 model. I also configured the Ollama provider in OpenCode under C:\Users<UserName>.config\opencode.
{ "$schema": "https://opencode.ai/config.json", "plugin": ["opencode-antigravity-auth@latest"], "provider": { "ollama": { "npm": "@ai-sdk/openai-compatible", "name": "Ollama (local)", "options": { "baseURL": "http://localhost:11434/v1" }, "models": { "gemma4:26b": { "name": "gemma4:26b" }, "deepseek-r1:8b": { "name": "deepseek-r1:8b" } } } } }
In OpenCode, I can successfully connect to the self-hosted Ollama and use the gemma4 model. However, there is one issue: in an OpenCode conversation, I want it to help me build a web page, but instead of generating files, it only displays the code in the chat window.
Am I missing some configuration, or is there an additional setting required?
Question
OpenCode 1.15.12
I self-hosted Ollama locally using Docker and installed the gemma4 model. I also configured the Ollama provider in OpenCode under C:\Users<UserName>.config\opencode.
{ "$schema": "https://opencode.ai/config.json", "plugin": ["opencode-antigravity-auth@latest"], "provider": { "ollama": { "npm": "@ai-sdk/openai-compatible", "name": "Ollama (local)", "options": { "baseURL": "http://localhost:11434/v1" }, "models": { "gemma4:26b": { "name": "gemma4:26b" }, "deepseek-r1:8b": { "name": "deepseek-r1:8b" } } } } }In OpenCode, I can successfully connect to the self-hosted Ollama and use the gemma4 model. However, there is one issue: in an OpenCode conversation, I want it to help me build a web page, but instead of generating files, it only displays the code in the chat window.
Am I missing some configuration, or is there an additional setting required?