Skip to content

ShadowedFieldWarning

Defined in: packages/core/src/providers/configurationPassthrough.ts:206

Warn when one honoured location of the llm block silently beats another that sets the same thing.

Neither value is unusable here and neither location is wrong, so this is not a case for warnUnusedConfiguration: both are honoured surfaces, and the only defect is that one wins without saying so. The user’s config then reads as two settings and behaves as one.

The two paths are arbitrary, and they have to be, because the precedence in this block is not one direction. For baseURL the configuration value beats the top-level field; for the OpenRouter attribution headers the top-level siteUrl/siteName beat the header inside the block, and the losing path is a nested one that shares no name with the winner. A helper that took a single field and hardcoded which side of it wins could only ever announce the first of those, which is how the second stayed silent.

Values are never printed — a base URL can carry credentials — so the message names the two paths and which of them takes effect.

Named fields, and the reason the names are not the whole guard. ignoredPath/appliedPath are two strings and ignoredValue/appliedValue two unknowns, so a transposition type-checks either way round; the rendered message still contains both paths and only their ROLES are swapped, which no toContain on either path can see. What catches it is in configurationPassthrough.spec.ts: the paths are pinned IN THEIR SLOTS in the rendered sentence, and the values by the discriminating pair around the empty-value guard below (an empty LOSER is silent, an empty WINNER is not).

appliedPath: string

Defined in: packages/core/src/providers/configurationPassthrough.ts:215

The path whose value IS used, in the same form.


appliedValue: unknown

Defined in: packages/core/src/providers/configurationPassthrough.ts:223

The value the factory actually applied. Pass the result of the SAME expression that decides it, never a second copy of the test, for the reason given on warnUnappliedConfigurationPath. Never printed.


ignoredPath: string

Defined in: packages/core/src/providers/configurationPassthrough.ts:213

The path whose value is NOT used, relative to the llm block and printed with an llm. prefix — baseURL, or configuration.defaultHeaders.HTTP-Referer.


ignoredValue: unknown

Defined in: packages/core/src/providers/configurationPassthrough.ts:217

The value at ignoredPath, as the user wrote it. Never printed.


provider: string

Defined in: packages/core/src/providers/configurationPassthrough.ts:208

The gth provider namespace, printed to the user (openrouter, …).