Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

4.6 KB
Raw Blame
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "model-hub/probe-result.schema.json",
  "title": "ProbeResult",
  "description": "Outcome of probing the first runnable exact hop from the shared effective route plan. Probes use the same manual, automatic or passthrough tier as reads and execution; live restrictions never create another tier. Unknown-model passthrough is Hub API-key-only; subscriptions retain existing model admission.",
  "type": "object",
  "required": ["contract_version", "backend", "channel", "reachable", "source_id", "model_id", "latency_ms", "error"],
  "additionalProperties": false,
  "properties": {
    "contract_version": { "const": 23 },
    "backend": { "enum": ["claude", "codex", "opencode", "vibey"] },
    "channel": { "enum": ["hub", "native_cli"] },
    "reachable": { "type": "boolean" },
    "source_id": { "type": "string", "pattern": "^src_[a-z0-9]{8,}$" },
    "model_id": { "type": "string", "minLength": 1, "description": "The exact upstream model id selected by the effective planner." },
    "latency_ms": { "type": ["integer", "null"], "minimum": 0 },
    "error": {
      "type": ["string", "null"],
      "enum": [
        null,
        "models.source.backoff.connection_failed",
        "models.source.cooldown.rate_limited",
        "models.source.cooldown.quota_exhausted",
        "models.source.cooldown.server_error",
        "models.source.needs_action.oauth_expired",
        "models.source.needs_action.balance_exhausted",
        "models.source.needs_action.credential_revoked",
        "models.source.needs_action.account_banned",
        "models.source.needs_action.plan_excludes_product",
        "models.source.needs_action.spend_limit_reached",
        "models.source.error.unclassified",
        "models.probe.native_cli_unavailable"
      ]
    }
  },
  "allOf": [
    {
      "if": { "properties": { "backend": { "const": "vibey" } }, "required": ["backend"] },
      "then": { "properties": { "channel": { "const": "hub" } } }
    },
    {
      "if": { "properties": { "channel": { "const": "hub" }, "reachable": { "const": true } }, "required": ["channel", "reachable"] },
      "then": { "properties": { "latency_ms": { "type": "integer" }, "error": { "type": "null" } } }
    },
    {
      "if": { "properties": { "channel": { "const": "hub" }, "reachable": { "const": false } }, "required": ["channel", "reachable"] },
      "then": { "properties": { "error": { "type": "string" } } }
    },
    {
      "if": { "properties": { "channel": { "const": "hub" }, "latency_ms": { "type": "null" } }, "required": ["channel", "latency_ms"] },
      "then": { "properties": { "error": { "const": "models.source.backoff.connection_failed" } } }
    },
    {
      "if": { "properties": { "channel": { "const": "native_cli" } }, "required": ["channel"] },
      "then": { "properties": { "latency_ms": { "type": "null" } } }
    },
    {
      "if": { "properties": { "channel": { "const": "native_cli" }, "reachable": { "const": false } }, "required": ["channel", "reachable"] },
      "then": { "properties": { "error": { "type": "string" } } }
    },
    {
      "if": { "properties": { "error": { "const": "models.probe.native_cli_unavailable" } }, "required": ["error"] },
      "then": { "properties": { "channel": { "const": "native_cli" }, "reachable": { "const": false }, "latency_ms": { "type": "null" } } }
    },
    {
      "if": { "properties": { "error": { "const": "models.source.backoff.connection_failed" } }, "required": ["error"] },
      "then": { "properties": { "channel": { "const": "hub" }, "reachable": { "const": false }, "latency_ms": { "type": "null" } } }
    }
  ],
  "examples": [
    { "contract_version": 23, "backend": "codex", "channel": "hub", "reachable": true, "source_id": "src_chatgptplus", "model_id": "gpt-5.6", "latency_ms": 412, "error": null },
    { "contract_version": 23, "backend": "claude", "channel": "hub", "reachable": false, "source_id": "src_relay9c1x", "model_id": "glm-5.2", "latency_ms": 287, "error": "models.source.needs_action.balance_exhausted" },
    { "contract_version": 23, "backend": "codex", "channel": "hub", "reachable": false, "source_id": "src_chatgptplus", "model_id": "gpt-5.6", "latency_ms": null, "error": "models.source.backoff.connection_failed" },
    { "contract_version": 23, "backend": "codex", "channel": "native_cli", "reachable": true, "source_id": "src_chatgptplus", "model_id": "gpt-5.6", "latency_ms": null, "error": null },
    { "contract_version": 23, "backend": "codex", "channel": "native_cli", "reachable": false, "source_id": "src_chatgptplus", "model_id": "gpt-5.6", "latency_ms": null, "error": "models.probe.native_cli_unavailable" }
  ]
}