-- v4: optional pool key. When NULL, the effective pool key is the row's
-- own `name` (pool of 1, identical to pre-v4 behavior). Multiple Llms
-- sharing a non-null `poolName` stack into one load-balanced pool that
-- the chat dispatcher expands at request time.
ALTER TABLE "Llm" ADD COLUMN "poolName" TEXT;

-- Index covers both the dispatcher's `WHERE poolName = $1` lookup and
-- the v4 admin endpoint `GET /api/v1/llms/<name>/members` (which expands
-- by effective pool key).
CREATE INDEX "Llm_poolName_idx" ON "Llm"("poolName");
