Skip to content

feat: 8sync opencode connect gguf + 8sync gsd connect gguf #5

Description

@8syncdev

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    configConfiguration file changesenhancementNew feature or requestos:windowsWindows-specific issue or fix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions