Skip to content

armgit / ODS

Public Imported from GitHub
0

ODS V3 Pre-Release: Public testing and refinement ahead of the official V3 launch. Turn your PC, Mac, or Linux box into a private AI server.

11.0 KB
Raw Blame
{
  "version": 1,
  "description": "Generated runtime config surfaces whose writers must stay in sync across install, upgrade, and host-agent paths.",
  "surfaces": [
    {
      "id": "env",
      "label": ".env and core runtime environment",
      "target_paths": [
        ".env"
      ],
      "required_keys": [
        "ODS_MODE",
        "LLM_BACKEND",
        "LLM_MODEL",
        "GGUF_FILE",
        "OLLAMA_PORT",
        "WEBUI_PORT",
        "DASHBOARD_PORT",
        "DASHBOARD_API_PORT"
      ],
      "writers": [
        {
          "platform": "linux",
          "path": "installers/phases/06-directories.sh"
        },
        {
          "platform": "macos",
          "path": "installers/macos/lib/env-generator.sh"
        },
        {
          "platform": "windows",
          "path": "installers/windows/lib/env-generator.ps1"
        },
        {
          "platform": "runtime",
          "path": "bin/ods-host-agent.py"
        }
      ],
      "invariants": [
        {
          "id": "schema-covers-runtime-mode",
          "type": "json_path_enum_contains",
          "path": ".env.schema.json",
          "json_path": "properties.ODS_MODE.enum",
          "values": [
            "local",
            "cloud",
            "hybrid",
            "lemonade"
          ]
        }
      ]
    },
    {
      "id": "opencode",
      "label": "OpenCode provider/model config",
      "target_paths": [
        "~/.config/opencode/opencode.json",
        "~/.config/opencode/opencode.jsonc",
        "~/.config/opencode/config.json",
        "~/.local/share/opencode/opencode.json",
        "~/.local/share/opencode/opencode.jsonc"
      ],
      "writers": [
        {
          "platform": "linux",
          "path": "installers/phases/07-devtools.sh"
        },
        {
          "platform": "macos",
          "path": "installers/macos/install-macos.sh"
        },
        {
          "platform": "windows",
          "path": "installers/windows/lib/opencode-config.ps1"
        },
        {
          "platform": "windows-runtime",
          "path": "scripts/update-windows-opencode-config.ps1"
        },
        {
          "platform": "upgrade",
          "path": "scripts/bootstrap-upgrade.sh"
        },
        {
          "platform": "runtime",
          "path": "bin/ods-host-agent.py"
        }
      ],
      "invariants": [
        {
          "id": "linux-opencode-uses-litellm-key",
          "type": "file_contains",
          "path": "installers/phases/07-devtools.sh",
          "needle": "LITELLM_KEY"
        },
        {
          "id": "windows-writer-exists",
          "type": "file_contains",
          "path": "installers/windows/lib/opencode-config.ps1",
          "needle": "OpenCode"
        }
      ]
    },
    {
      "id": "litellm-local",
      "label": "LiteLLM local model routing",
      "target_paths": [
        "config/litellm/local.yaml"
      ],
      "writers": [
        {
          "platform": "canonical-renderer",
          "path": "scripts/render-runtime-configs.py"
        },
        {
          "platform": "checked-in-template",
          "path": "config/litellm/local.yaml"
        }
      ],
      "invariants": [
        {
          "id": "local-routes-to-llama-server",
          "type": "yaml_text_contains",
          "path": "config/litellm/local.yaml",
          "needle": "api_base: http://llama-server:8080/v1"
        }
      ]
    },
    {
      "id": "litellm-local-native",
      "label": "LiteLLM host-native local model routing",
      "target_paths": [
        "config/litellm/local.yaml"
      ],
      "writer_marker": "ODS-CONTRACT-WRITER: litellm-local-native",
      "writers": [
        {
          "platform": "canonical-renderer",
          "path": "scripts/render-runtime-configs.py"
        },
        {
          "platform": "windows-env-generator",
          "path": "installers/windows/lib/env-generator.ps1"
        },
        {
          "platform": "windows-upgrade",
          "path": "scripts/bootstrap-upgrade.sh"
        }
      ],
      "invariants": [
        {
          "id": "native-local-projection-exists",
          "type": "file_contains",
          "path": "scripts/render-runtime-configs.py",
          "needle": "def render_litellm_local_native"
        }
      ]
    },
    {
      "id": "litellm-cloud",
      "label": "LiteLLM cloud model routing",
      "target_paths": [
        "config/litellm/cloud.yaml"
      ],
      "writers": [
        {
          "platform": "canonical-preview",
          "path": "scripts/render-runtime-configs.py"
        },
        {
          "platform": "checked-in-template",
          "path": "config/litellm/cloud.yaml"
        }
      ],
      "invariants": [
        {
          "id": "cloud-exposes-stable-alias",
          "type": "yaml_text_contains",
          "path": "config/litellm/cloud.yaml",
          "needle": "model_name: ods/current"
        }
      ]
    },
    {
      "id": "litellm-hybrid",
      "label": "LiteLLM hybrid model routing",
      "target_paths": [
        "config/litellm/hybrid.yaml"
      ],
      "writers": [
        {
          "platform": "canonical-preview",
          "path": "scripts/render-runtime-configs.py"
        },
        {
          "platform": "checked-in-template",
          "path": "config/litellm/hybrid.yaml"
        }
      ],
      "invariants": [
        {
          "id": "hybrid-preserves-cloud-fallback",
          "type": "yaml_text_contains",
          "path": "config/litellm/hybrid.yaml",
          "needle": "fallbacks:"
        }
      ]
    },
    {
      "id": "litellm-switchboard",
      "label": "LiteLLM stable-alias Switchboard routing",
      "target_paths": [
        "config/litellm/switchboard.yaml"
      ],
      "writers": [
        {
          "platform": "canonical-renderer",
          "path": "scripts/render-runtime-configs.py"
        },
        {
          "platform": "checked-in-template",
          "path": "config/litellm/switchboard.yaml"
        }
      ],
      "invariants": [
        {
          "id": "switchboard-exposes-stable-alias",
          "type": "yaml_text_contains",
          "path": "config/litellm/switchboard.yaml",
          "needle": "model_name: ods/current"
        },
        {
          "id": "switchboard-routes-to-model-router",
          "type": "yaml_text_contains",
          "path": "config/litellm/switchboard.yaml",
          "needle": "api_base: http://model-router:9099/v1"
        }
      ]
    },
    {
      "id": "model-router-endpoints",
      "label": "Model Router endpoint allowlist",
      "target_paths": [
        "config/model-router/endpoints.json"
      ],
      "writers": [
        {
          "platform": "canonical-renderer",
          "path": "scripts/render-runtime-configs.py"
        },
        {
          "platform": "windows-installer",
          "path": "installers/windows/lib/env-generator.ps1"
        }
      ],
      "invariants": [
        {
          "id": "router-endpoint-document",
          "type": "file_contains",
          "path": "config/model-router/endpoints.json",
          "needle": "\"endpoints\""
        }
      ]
    },
    {
      "id": "remote-routing-state",
      "label": "Remote provider routing receipt",
      "target_paths": [
        "data/remote-provider/routing-state.json"
      ],
      "writers": [
        {
          "platform": "canonical-renderer",
          "path": "scripts/render-runtime-configs.py"
        }
      ],
      "invariants": [
        {
          "id": "renderer-emits-remote-routing-state",
          "type": "file_contains",
          "path": "scripts/render-runtime-configs.py",
          "needle": "def render_remote_routing_state"
        },
        {
          "id": "schema-covers-remote-switch",
          "type": "json_path_enum_contains",
          "path": ".env.schema.json",
          "json_path": "properties.REMOTE_LLM_ENABLED.enum",
          "values": [
            "true",
            "false"
          ]
        }
      ]
    },
    {
      "id": "perplexica",
      "label": "Perplexica settings and default chat model",
      "target_paths": [
        "data/perplexica/settings.seed.json"
      ],
      "writers": [
        {
          "platform": "linux",
          "path": "installers/phases/12-health.sh"
        },
        {
          "platform": "linux",
          "path": "installers/phases/13-summary.sh"
        },
        {
          "platform": "macos",
          "path": "installers/macos/lib/env-generator.sh"
        },
        {
          "platform": "macos",
          "path": "installers/macos/install-macos.sh"
        },
        {
          "platform": "windows",
          "path": "installers/windows/lib/env-generator.ps1"
        },
        {
          "platform": "windows",
          "path": "installers/windows/install-windows.ps1"
        },
        {
          "platform": "upgrade",
          "path": "scripts/bootstrap-upgrade.sh"
        },
        {
          "platform": "repair",
          "path": "scripts/repair/repair-perplexica.sh"
        }
      ],
      "invariants": [
        {
          "id": "repair-refreshes-default-model",
          "type": "file_contains",
          "path": "scripts/repair/repair-perplexica.sh",
          "needle": "defaultChatModel"
        },
        {
          "id": "bootstrap-refreshes-default-model",
          "type": "file_contains",
          "path": "scripts/bootstrap-upgrade.sh",
          "needle": "defaultChatModel"
        }
      ]
    },
    {
      "id": "hermes",
      "label": "Hermes model and context config",
      "target_paths": [
        "data/hermes/config.yaml",
        "extensions/services/hermes/cli-config.yaml.template"
      ],
      "writers": [
        {
          "platform": "linux",
          "path": "installers/phases/11-services.sh"
        },
        {
          "platform": "linux-helper",
          "path": "scripts/patch-hermes-config.py"
        },
        {
          "platform": "macos",
          "path": "installers/macos/install-macos.sh"
        },
        {
          "platform": "windows",
          "path": "installers/windows/phases/06-directories.ps1"
        },
        {
          "platform": "upgrade",
          "path": "scripts/bootstrap-upgrade.sh"
        },
        {
          "platform": "runtime",
          "path": "bin/ods-host-agent.py"
        }
      ],
      "invariants": [
        {
          "id": "template-context-floor",
          "type": "yaml_text_contains",
          "path": "extensions/services/hermes/cli-config.yaml.template",
          "needle": "context_length: 131072"
        },
        {
          "id": "template-output-cap",
          "type": "yaml_text_contains",
          "path": "extensions/services/hermes/cli-config.yaml.template",
          "needle": "max_tokens: 1024"
        },
        {
          "id": "patcher-updates-model-name",
          "type": "file_contains",
          "path": "scripts/patch-hermes-config.py",
          "needle": "patch_config"
        },
        {
          "id": "host-agent-patches-hermes",
          "type": "file_contains",
          "path": "bin/ods-host-agent.py",
          "needle": "_patch_hermes_model_config"
        }
      ]
    }
  ]
}