Try Muse Spark Open in OpenCode through Ollama Cloud
By Flavio
Updated
Tagged: AI
Launch Muse Spark Open in OpenCode through Ollama Cloud, try a bounded JavaScript fix, and check model access, tool use, context, and billing.
Running Muse Spark Open locally takes serious hardware, so if you just want to test it as a coding model, Ollama’s hosted version is a much faster way in. Ollama gives you a cloud model and a single launch command that hooks straight into OpenCode.
We’ll wire that up and ask the agent to make one small JavaScript fix with a matching test. Keeping the first run this small makes it easy to watch every file it reads and every command it tries to run.
You can check the model listing in the official Ollama catalog. If you want the details on the release, hardware requirements, and license, I covered all of that in my Muse Spark Open overview.
Connect to the hosted model
Start by installing Ollama and OpenCode if you don’t already have them. Open Ollama, sign in to its cloud service, and make sure your account has cloud access under Ollama’s current plans.
From the project folder you want the agent to work in, launch OpenCode with Ollama:
ollama launch opencode --model muse-spark-open:cloud
The :cloud suffix tells Ollama to route requests to the hosted model instead of pulling the weights down to your laptop. OpenCode itself still runs locally on your machine, reading your files and running whatever tools you approve, while the model calls go out to Ollama’s cloud.
Stick with Ollama’s launcher here instead of piecing together manual provider config from different OpenCode versions. The launcher injects the model config for you while keeping the rest of your OpenCode settings intact (see Ollama’s OpenCode integration guide).
Before you type your first prompt, look at the active model inside OpenCode. If the launcher complains that the model is unavailable or your account can’t access it, fix that first rather than assuming it fell back to an equivalent model.
Make a disposable project
Create a small throwaway folder (make sure you have a recent Node.js installed):
mkdir muse-practice
cd muse-practice
git init
Save this function as total.mjs. It adds up a list of prices:
export function total(prices) {
return prices.reduce((sum, price) => sum + price)
}
Put the starting test in total.test.mjs:
import test from 'node:test'
import assert from 'node:assert/strict'
import { total } from './total.mjs'
test('adds prices', () => {
assert.equal(total([10, 20, 5]), 35)
})
Run the baseline test and save the starting state in Git:
node --test
git add total.mjs total.test.mjs
git commit -m 'Add total practice fixture'
Now launch OpenCode from this folder using the Ollama command from above.
Ask for one specific fix
There’s a classic bug in total.mjs: calling reduce() without an initial value throws when the array is empty. Give the agent a narrow request you can verify right away:
Read total.mjs and its test.
Make total([]) return 0 while preserving the existing behavior.
Add a test for the empty array, then run node --test.
Change only those two files and show the diff.
Do not install packages or commit the change.
Watch the tool calls as they pop up. For this task, the agent only needs to read files here, make small edits, and run the local test command. It shouldn’t need network access, deployment credentials, or any files outside this folder.
The finished function only needs to be this short:
export function total(prices) {
return prices.reduce((sum, price) => sum + price, 0)
}
Once the agent finishes, read the new test and run node --test yourself. Check git diff too, so you know the original test is still there and the agent didn’t touch anything outside the requested files.
When the diff looks clean and the tests pass, you know the connection between Ollama and OpenCode works and you’re ready to try the model on a real task in your own codebase.
Check context and tool compatibility
Muse Spark Open supports tool calling and has a large context window on paper, though how much fits in a single request still depends on Ollama’s hosted endpoint and your OpenCode configuration.
Your source files are only part of what fills that context. System instructions, conversation history, tool schemas, command output, and the model’s reply all share the same budget, so don’t paste an entire repository into your first prompt just because the headline limit looks huge.
Start with the files the task needs and let the agent pull in more when it can explain why. If requests fail as the session grows, read the exact limit or provider error first instead of tweaking unrelated settings.
The model also takes both text and image inputs. If you try sending a screenshot later, verify that your OpenCode connection forwards it and that the model receives it, since hosted integrations don’t always pass through every media type a model supports.
Know what this experiment sends and spends
A hosted session sends whatever files and prompts you include out to Ollama’s servers. Read Ollama’s cloud documentation and its privacy policy before you point this setup at private code, and stick to a throwaway folder until you’ve reviewed the terms.
Even though the model weights are downloadable, hosted access still comes with account limits and billing. Check your account usage right after the test so you see what the run cost, including any retries the agent made.
If you’re weighing API billing against buying local hardware, check out coding agents without another subscription. For this first run, keep your check simple: make sure the hosted model calls the tools properly and leaves a diff with the exact fix you asked for.
Want me to talk about your product? You can sponsor this site.
Related posts about ai: