> ## Documentation Index
> Fetch the complete documentation index at: https://helloluciallc.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Model Layer

> Two providers behind one Engine gateway: GPT-5.6 Sol by default, Fable as Lucia's voice where a task is pinned, with per-task pins, recorded provenance, and the no-fallback rule.

<Note>
  Lucia's model layer is one Engine-owned gateway with two providers behind it.
  The provider is resolved from the model id a task is pointed at: a `claude-*`
  model goes to Anthropic, anything else goes to OpenAI. Fable is Lucia's voice
  where a task is pinned to it; GPT-5.6 Sol remains the configured default.
</Note>

This page was **OpenAI Model Layer** until 2026-09-10. The old address
redirects here. The single-provider description it carried is dated history;
the gateway has spoken both providers on Engine `dev` since 2026-09-04
(Fable is Lucia's voice, ALGO-39).

***

## Current posture

```text theme={"dark"}
runtime owner: hello-lucia/lucia-booking-engine
deployed branch: dev
deployed source commit: e2166b86ac6794a1423c7b2ce1b293a3dba505c4
served at: https://api-dev.hellolucia.ai (Render lucia-booking-engine, dev)
configured default model: gpt-5.6-sol (GPT-5.6 Sol, OpenAI Responses API)
Anthropic path: Messages API, resolved for any claude-* model id
provider resolution: from the model id, one place (luciaModelProviders.js)
```

Which model a task uses is a setting, not a code path. The Engine reads one
default (`LUCIA_INTELLIGENCE_MODEL`) and a per-task pin
(`LUCIA_MODEL_<TASK>`) for each task in the source map:

```text theme={"dark"}
guest_intent
guest_entity_extraction
concierge_selection
focus_ops_intent_assist
focus_ops_response_refinement
focus_ops_house_composition
payment_request_draft
guest_reply
focus_ops_reply
```

The source comment states the rule plainly: "Anthropic model ids such as
claude-fable-5-1 and claude-opus-5 are valid values." Provider follows the
model id; every caller of the gateway gets both providers for free.

## What runs on Fable today

Two tasks are pinned to `claude-fable-5-1` on the Development Engine, both
with **no fallback**:

| Task                          | What it is                                                                                         | Pinned by                                                                                            | Fallback                                                 |
| ----------------------------- | -------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -------------------------------------------------------- |
| `focus_ops_house_composition` | The one composition behind Focus with Lucia: the house-state pack in, Lucia's answer and doors out | `LUCIA_MODEL_FOCUS_OPS_HOUSE_COMPOSITION=claude-fable-5-1` on api-dev, 2026-09-04 (ALGO-39 phase 02) | none, by source default (`LUCIA_TASK_FALLBACK_DEFAULTS`) |
| `payment_request_draft`       | Lucia's draft of the guest's payment request                                                       | `LUCIA_MODEL_PAYMENT_REQUEST_DRAFT=claude-fable-5-1` on api-dev (LUCI-210 law block, 2026-09-06)     | none, by source default                                  |

The founder's words that set this, on Fable is Lucia's voice (ALGO-39): "I
think Anthropic's models should be her predominant voice." (2026-09-03) and,
after the first live Fable answers, "Keep Fable on." (2026-09-04, 06:46 PT).
On the same day the founder kept the Fieldwork brain where it was: "GPT is
fine here and we can save token spend by keeping this on GPT and reserving
Fable for what really matters, in this case, the core Lucia."

The no-fallback rule is the quiet-and-honest rule: when Fable cannot answer,
Lucia says so in one owner-language sentence rather than letting another mind
speak in her voice. Focus answers from one brain (ALGO-40) records the founder's
ruling as "No fallback: quiet and honest." (2026-09-04). The source carries it
as a per-task default that the literal env value `none` also expresses
(`LUCIA_FALLBACK_MODEL_<TASK>=none`). For the Focus composition the env line
is recorded set on api-dev (`LUCIA_FALLBACK_MODEL_FOCUS_OPS_HOUSE_COMPOSITION=none`,
ALGO-40 gate, 2026-09-04). For the payment draft the equivalent line is not
evidenced on any record and is treated as set by the founder's hand,
unverified; the source default already yields no fallback for both tasks at
this commit.

Everything not pinned runs on the default. The Fieldwork conversation brain
and the guest-facing tasks stay on GPT-5.6 Sol; the Fieldwork conversation
provider path is a separate, LIEA-contracted file that the gateway change did
not touch.

## The Anthropic path, as built

Verified in the Engine source at the deployed commit:

* **Messages API** with the same JSON schema the task declares; the request
  asks for exactly one JSON object and nothing else.
* **No `temperature`** reaches Anthropic: the request builders accept and
  ignore it after Anthropic rejected it as deprecated (ALGO-39 addendum,
  2026-09-04); every Anthropic request is model, system, messages and
  `max_tokens`, plus the JSON output format when the schema passes the grammar
  audit. GPT-5 family requests omit `temperature` too (`shouldOmitTemperature`).
* **45 s timeout** for Anthropic calls by default
  (`LUCIA_ANTHROPIC_DEFAULT_TIMEOUT_MS = 45_000`, overridable by name through
  `LUCIA_ANTHROPIC_TIMEOUT_MS`). The source comment records why: Fable answers
  a house question in 5 to 12 s live and one composition died at the old 15 s
  cut. OpenAI keeps its own defaults.
* **Usage is read from the provider's own response, never estimated.** For
  Anthropic the billed input is the sum of `input_tokens`,
  `cache_read_input_tokens` and `cache_creation_input_tokens`; for OpenAI the
  reported `input_tokens` already includes the cached part. Numbers only, no
  pricing.
* **Credential** is `LUCIA_ANTHROPIC_API_KEY` first, then `ANTHROPIC_API_KEY`,
  by name. Readiness reports the provider and whether its key is configured.

## Failover, recorded

The gateway retries **once** on the configured fallback model when the primary
provider fails with a transient class (timeout, 5xx, rate limit, overloaded,
per the provider error classifier). It does **not** fail over on
authentication errors, schema rejections, or a model refusal; those are
reported as the task's own error. Malformed output is not a failover trigger.

A task whose fallback resolves to none never retries on another model. The
Fieldwork conversation task never fails over.

The global fallback is `LUCIA_FALLBACK_MODEL` (default `gpt-5.6-sol`); a task
may override it with `LUCIA_FALLBACK_MODEL_<TASK>`.

## Provenance: the ledger records the provider

Every gateway diagnostics record carries:

```text theme={"dark"}
provider
model
resolved_model
provider_request_id
latency_ms
provider_fallback
fallback_from   (only when a fallback ran)
usage           (provider-reported, numbers only)
```

This is the founder's "ledger records provider" law, carried into the gateway
by Fable is Lucia's voice (ALGO-39). The served Focus route exposes its path in
`meta.focus_path` (`house_pack` or `house_pack_unavailable`); see
[Focus Ops Intelligence](/lucia/intelligence/focus-ops-intelligence).

The runtime-verification route reports which provider each task would use
(`getLuciaModelConfigSnapshot().providers`). A `200` still does not by itself
prove model execution or provider success; read provenance rather than infer
it from the route status or the configured default.

## What the model does not own

Unchanged doctrine. The model must not own:

```text theme={"dark"}
system truth
external execution claims
route contract
identity of records
verified completion
workspace truth
guest verification truth
booking-private data access
```

Model output sits above deterministic truth. Guest identity, booking IDs, stay
windows, payment state, task status, route and action safety, and completion
truth remain system-owned. Everything feeds the Algorithm; the Algorithm
decides what surfaces. See
[LIEA doctrine](/lucia/intelligence/lucia-intelligence-engine-algorithm).

## Not current

* **The predominant voice** (ALGO-39 phase 03) was executed as a decision,
  not a flip (2026-09-04): the default stays `gpt-5.6-sol`, Fable is pinned
  per owner-facing task, GPT stays the Fieldwork brain and the recorded global
  fallback. No task-by-task flip of the default has happened.
* **A stand-in voice** when Fable is down (ALGO-41) is Planned and is a
  recorded launch blocker; nothing stands in today.
* ALGO-32 and ALGO-33 are Planned; the gateway carries the provider ledger
  fields, not those issues' further scope.
* **Lucia Guest Agent** is an independently owned runtime. Its last accepted
  same-deploy proof (2026-07-18, source
  `fbf77b662511cf004ee1f46787e05773a8a78d71`, configured and provider-resolved
  `gpt-5.6-sol`) is dated evidence about that surface only.
* **Staging** still serves Engine `stage` commit
  `9a9227e8fb40e94748c160265a697994023361ca` (2026-04-28). None of the
  September gateway work is promoted there.

## Historical: the single-provider gateway

Between 2026-05-04 and 2026-09-04 the JSON gateway spoke only the OpenAI
Responses API, with `gpt-5.6-sol` as the source default (recorded at Engine
dev `9a15b1da199923d1ecb0927be2507feda2cb4c71`, 2026-08-12). The legacy Focus
path that used `focus_ops_intent_assist` and `focus_ops_response_refinement`
left the served route on 2026-09-04 (ALGO-40); its task keys remain in the
model map only where a caller still exists.

***

## See also

* [Focus Ops Intelligence](/lucia/intelligence/focus-ops-intelligence)
* [LIEA doctrine](/lucia/intelligence/lucia-intelligence-engine-algorithm)
* [Reasoning Model](/lucia/intelligence/reasoning-model)
* [Truth State Doctrine](/lucia/foundation/truth-state-doctrine)
* [Payment truth — current](/lucia/system-architecture/payment-truth-current)
* [Domains and Live Routing](/lucia/infrastructure/domains-and-live-routing)
