---
id: ADR-PFM-LLM-001
title: Centralize Model Execution and Keep Answers With Their Feature
product_area: platform
module: llm
revision: 1
status: proposed
design_intent: confirmed
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
decision: >-
  Require declared Platform model execution for routing, budgets, admission, evidence and charges, while each
  consuming feature constructs its question, validates the answer and owns domain effects.
constrains:
  - SVC-PFM-LLM-llm
  - SVC-PFM-LLM-console-agent
  - WF-PFM-LLM-001
  - WF-PFM-LLM-013
  - DOM-PFM-LLM-001
  - DOM-PFM-LLM-002
  - RESP-PFM
origin: >-
  The foundation design, section 4.1 (Where It Lives, decision) and its work plan approved by Andrew
  2026-10-10, accepted 2026-10-12 (services-platform:docs/llm/llm-foundation-and-generate-query.md#4.1 Where
  It Lives; #Acceptance checkpoints); the second-consumer direction D-5
  (services-platform:docs/proposals/llm-observability/11-decisions.md#Decision record); compliance exception
  EX-AI-001 (services-platform:docs/compliance/exceptions.md, EX-AI-001 row).
alternatives:
  - option: Independent provider requests in each feature
    why_not: 'They fragment allowance, credentials, diagnostic evidence and failure handling.'
  - option: Separate ledgers within each macroservice
    why_not: They divide one customer allowance and require combined reporting across services.
  - option: Central execution with remotely supplied tool callbacks
    why_not: >-
      Remote function boundaries require an additional callback protocol that the recorded direction does not
      provide.
consequences:
  - The provider import and host guard applies within the Platform repository.
  - New features need declared operation routing and prices before using this runtime.
  - Consumer validation remains responsible for domain correctness.
  - Direct console replies remain an unresolved exception.
  - >-
    Another macroservice needs the already recorded runtime-library and Platform-metering direction
    implemented.
supersedes: []
evidence:
  - >-
    services-platform at ad3f6a6: docs/llm.md (The contract; What is deliberately not here);
    tests/unit/llm-provider-boundary.spec.ts; modules/llm/services/execution/run-operation.ts;
    docs/llm/llm-foundation-and-generate-query.md.
  - 'react-console at baf6dae: app/api/agent/conversations/[id]/messages/route.ts.'
---

# Centralize Model Execution and Keep Answers With Their Feature

## Context

Separate feature teams need a common accounting and provider boundary. The pinned query consumer uses it; the general Jazz AI prototype does not.

## Decision

Require declared Platform model execution for routing, budgets, admission, evidence and charges, while each consuming feature constructs its question, validates the answer and owns domain effects.

## Alternatives Considered

Independent provider requests in each feature: They fragment allowance, credentials, diagnostic evidence and failure handling.

Separate ledgers within each macroservice: They divide one customer allowance and require combined reporting across services.

Central execution with remotely supplied tool callbacks: Remote function boundaries require an additional callback protocol that the recorded direction does not provide.

## Consequences

The provider import and host guard applies within the Platform repository. New features need declared operation routing and prices before using this runtime. Consumer validation remains responsible for domain correctness. Direct console replies remain an unresolved exception. Another macroservice needs the already recorded runtime-library and Platform-metering direction implemented.
