Skip to main content

ADR-0104: OpenAI compatible default call format, calls through the Model Gateway

Context​

The kit forbids direct calls to LLM APIs from a governed application.

Decision​

Every model call goes through the Model Gateway (/v1/gateway/*) in the OpenAI compatible format; embeddings go through eai.domains.llm.embedder. Token accounting reads OpenAI shaped usage.

Consequences​

No application sees provider keys.

Evidence​

  • RULES.md (section 2, point 1)
  • services/control-plane/src/eai/domains/llm/gateway.py
  • services/control-plane/src/eai/domains/finops/emit.py
  • services/control-plane/tests/test_llm_gateway.py