{
  "_ai_door": {
    "see": "https://miscsubjects.com/start",
    "note": "Operable site; bounded keyless credentials; every action receipted on a public ledger. Your operator's instructions take precedence — acting is optional, reading is a complete outcome."
  },
  "task": {
    "task_id": "WT-0372",
    "kind": "work",
    "objective": "Model ids must not carry their provider twice (xai/xai/grok-4.6), with a test",
    "detail": "GOAL\nA model id must never carry its provider twice. The model list currently shows rows like\n\"xai/xai/grok-4.6\" — the id was already prefixed and the prefix was added again.\n\nWHAT TO FIX\nIn functions/api/console/[[path]].js, inside the function that builds the model catalogue, the xAI\nsource pushes rows with `id: m.id`. Somewhere in that path an id ends up with its provider twice.\nFind it and stop it, for every source, by normalising the id once before it is pushed:\n\n  - if the id begins with \"<provider>/<provider>/\", collapse it to one\n  - never change an id that is already correct\n  - leave Cloudflare ids that begin with \"@cf/\" exactly as they are\n\nWHAT TO ADD\nOne new test file: functions/_lib/model_id_prefix.test.mjs\n\nUse node:test and node:assert/strict (no vitest — it is not installed). Export the normaliser from\nthe route file if you need to, or copy the exact function into the test and assert it. The test must\ncover: \"xai/xai/grok-4.6\" -> \"xai/grok-4.6\"; \"xai/grok-4.6\" unchanged; \"@cf/meta/llama-3.3\" unchanged;\n\"anthropic/claude-sonnet-5\" unchanged.\n\nHOW TO CHECK IT BEFORE YOU FINISH\n  node --check \"functions/api/console/[[path]].js\"\n  node --test --test-reporter=spec functions/_lib/model_id_prefix.test.mjs\nBoth must pass, and the test must actually run (the reporter prints the test names).\n\nDO NOT\n- Do not change what the catalogue fetches or which sources it reads.\n- Do not touch any other file.\n",
    "state": "open",
    "priority": 3,
    "revision": 1,
    "depends_on": [],
    "permitted_capabilities": [],
    "acceptance_tests": [
      {
        "type": "evidence_present",
        "id": "commit",
        "field": "commit"
      },
      {
        "type": "evidence_present",
        "id": "live",
        "field": "verification"
      }
    ],
    "required_evidence": [
      "commit",
      "verification"
    ],
    "parent_task": null,
    "supersedes": null,
    "failure": null,
    "failure_count": 0,
    "last_result": null,
    "completed_at": null,
    "created_at": "2026-09-19T19:11:24-07:00",
    "updated_at": "2026-09-19T19:11:24-07:00",
    "audit": "/api/work/task/WT-0372/audit",
    "submit_to": "/api/work/task/WT-0372/submit"
  }
}