Replace model roles with an instance model catalogue, per-org allow-lists, BYO providers and aliases #1205
Notifications
Due Date
No due date set.
Depends on
Reference: sam/archie#1205
Reference in new issue
Block a user
Today models are chosen by role (cfg.Models[role]: builder/planner/triage/review plus embedding/transcription), hard-coded across workflow stages, chat and MCP sampling with a silent builder fallback. There is no model picker in chat or on the canvas.
Design (persona council, maintainer decisions):
Slices: (1) archie-core-dajez credential leak fix; (2) instance catalogue and aliases replace roles, single resolver, step/chat pickers, apply/dispatch validation; (3) usage records; (4) per-task org resolution; (5) org Settings: allow-list, alias remap, BYO providers behind flag; (6) org-scoped chat in the gateway.
Done when: no Models[role] lookup remains; a self-hoster configures models in one instance screen; steps and chat pick aliases; a second org sees only allowed or own models; every model call leaves a usage record; task check passes.
Notes
Slice 2 landed: aliases replace roles (model-aliases resource, config.ResolveModel), step and chat pickers, apply-time check for workflow definitions. Not done in slice 2: a separate instance catalogue of entries (aliases point straight at provider/model refs); it arrives with the per-org allow-list in slice 5.
Slice 3 landed: model_usage table, RecordUsage RPC (run credential limited to its own task, task rows billed to the task's org), recorded from task agent runs, worker MCP sampling, gateway chat turns, titles, sampling and curators. Embedding and transcription calls are not recorded yet.
Slice 4 landed: TaskModelAliases RPC (org from the task row), daemon sends the task org's effective aliases to the agent, egress and credential resolver use task.Org. An org's own model-aliases resource is read but nothing writes it yet; that is slice 5.
Slice 5 landed: org-model-policy (deny by default), org model-aliases and provider-settings validated against it, ModelsFor resolution, TaskModels RPC carries org providers, resolver grants org-own provider keys, /org/models tab and Org access section. Gap: an org cannot create its own credential bindings; the instance admin adds a binding with that org.
Close reason
Slices 1-6 landed: leak fix, aliases, usage records, task org resolution, org policy/aliases/providers, org-scoped chat models, usage and sessions.
Imported from beads
archie-core-9kzqi· GitHub #1510 · type feature · priority P1 · created 2026-10-10 · closed 2026-10-10