# Probe: auto backend with explicit gpuLayers: 0

Command:
node .opencode/specs/system-spec-kit/026-graph-and-context-optimization/014-local-embeddings-migration/041-llama-cpp-metal-investigation/scratch/probe-gpulayers-zero.mjs auto

Exit: 1

Output:
```text
[node-llama-cpp] load: control-looking token:    212 '</s>' was not control-type; this is probably a bug in the model. its type will be overridden
[node-llama-cpp] load: special_eos_id is not in special_eog_ids - the tokenizer config may be incorrect
[node-llama-cpp] Failed to get swap info
[node-llama-cpp] ggml_metal_init: error: failed to create command queue
[node-llama-cpp] ggml_backend_metal_device_init_backend: error: failed to allocate context
[node-llama-cpp] llama_init_from_model: failed to initialize the context: failed to initialize  backend
file:///Users/michelkerkmeester/MEGA/Development/Code_Environment/Public/.opencode/skills/system-spec-kit/mcp_server/node_modules/node-llama-cpp/dist/evaluator/LlamaContext/LlamaContext.js:634
                    throw new Error("Failed to create context");
                          ^

Error: Failed to create context
    at createContext (file:///Users/michelkerkmeester/MEGA/Development/Code_Environment/Public/.opencode/skills/system-spec-kit/mcp_server/node_modules/node-llama-cpp/dist/evaluator/LlamaContext/LlamaContext.js:634:27)
    at async LlamaContext._create (file:///Users/michelkerkmeester/MEGA/Development/Code_Environment/Public/.opencode/skills/system-spec-kit/mcp_server/node_modules/node-llama-cpp/dist/evaluator/LlamaContext/LlamaContext.js:673:24)
    at async file:///Users/michelkerkmeester/MEGA/Development/Code_Environment/Public/.opencode/skills/system-spec-kit/mcp_server/node_modules/node-llama-cpp/dist/evaluator/LlamaModel/LlamaModel.js:311:24
    at async withLock (file:///Users/michelkerkmeester/MEGA/Development/Code_Environment/Public/.opencode/skills/system-spec-kit/mcp_server/node_modules/node-llama-cpp/node_modules/lifecycle-utils/dist/withLock.js:23:16)
    at async LlamaModel.createContext (file:///Users/michelkerkmeester/MEGA/Development/Code_Environment/Public/.opencode/skills/system-spec-kit/mcp_server/node_modules/node-llama-cpp/dist/evaluator/LlamaModel/LlamaModel.js:308:16)
    at async LlamaEmbeddingContext._create (file:///Users/michelkerkmeester/MEGA/Development/Code_Environment/Public/.opencode/skills/system-spec-kit/mcp_server/node_modules/node-llama-cpp/dist/evaluator/LlamaEmbeddingContext.js:73:30)
    at async LlamaModel.createEmbeddingContext (file:///Users/michelkerkmeester/MEGA/Development/Code_Environment/Public/.opencode/skills/system-spec-kit/mcp_server/node_modules/node-llama-cpp/dist/evaluator/LlamaModel/LlamaModel.js:324:16)
    at async file:///Users/michelkerkmeester/MEGA/Development/Code_Environment/Public/.opencode/specs/system-spec-kit/026-graph-and-context-optimization/014-local-embeddings-migration/041-llama-cpp-metal-investigation/scratch/probe-gpulayers-zero.mjs:41:17

Node.js v25.6.1
```

Interpretation:
The probe explicitly passed `gpuLayers: 0`, but default `getLlama()` still selected the Metal backend and failed during context creation. This argues against a gpuLayers-only source patch as the full fix.
