Summary
Two new commands to register a running llama-server as a local provider in GSD and OpenCode, with correct provider schemas.
8sync gsd connect gguf (alias for add gguf)
Probes llama-server on localhost, writes entry to ~/.gsd/agent/models.json.
8sync gsd connect gguf # probe ports 8080/8081/8082/1234/11434
8sync gsd connect gguf --port 8081 # specific port
8sync gsd connect gguf --name my-id # custom provider id
8sync gsd connect gguf --dry-run # preview only
Fix: Missing apiKey field caused GSD to reject the models.json entry with:
Provider gguf-local-model: "apiKey" is required when defining custom models.
Added apiKey: "local" (GSD schema requires the field; llama-server ignores it).
8sync opencode connect gguf
Probes llama-server, patches ~/.config/opencode/opencode.json.
8sync opencode connect gguf
8sync opencode connect gguf --port 8081
8sync opencode connect gguf --name my-local --dry-run
Fix: OpenCode schema requires:
options.apiKey + options.baseURL (not top-level apiKey)
models as a key-value object, not an array
Previous attempt caused:
Invalid input: expected record, received array provider.gguf-local-model.models
Unrecognized key: "apiKey" provider.gguf-local-model
Correct structure written:
"gguf-local-model": {
"options": { "apiKey": "local", "baseURL": "http://localhost:8080/v1" },
"models": {
"model.gguf": { "name": "model (local GGUF)", "attachment": false, "reasoning": false }
}
}
Schema verified against https://opencode.ai/config.json.
Full workflow
8sync gguf serve --engine-path "C:\...\run" --model-path "C:\...\model.gguf" --balance
8sync gsd connect gguf # registers in models.json
8sync opencode connect gguf # registers in opencode.json
# /model -> select gguf-local-model/model.gguf
8sync gguf stop # when done
Commit
5dfea7e
Summary
Two new commands to register a running
llama-serveras a local provider in GSD and OpenCode, with correct provider schemas.8sync gsd connect gguf(alias foradd gguf)Probes
llama-serveron localhost, writes entry to~/.gsd/agent/models.json.Fix: Missing
apiKeyfield caused GSD to reject the models.json entry with:Added
apiKey: "local"(GSD schema requires the field; llama-server ignores it).8sync opencode connect ggufProbes
llama-server, patches~/.config/opencode/opencode.json.Fix: OpenCode schema requires:
options.apiKey+options.baseURL(not top-levelapiKey)modelsas a key-value object, not an arrayPrevious attempt caused:
Correct structure written:
Schema verified against
https://opencode.ai/config.json.Full workflow
Commit
5dfea7e