findUnusedConfigurationPaths
findUnusedConfigurationPaths(
configuration,consumedPaths):string[]
Defined in: packages/core/src/providers/configurationPassthrough.ts:83
List the paths inside a configuration block that the calling factory will NOT read.
consumedPaths entries are either a whole key (baseURL) or a dotted one-level path
(defaultHeaders.X-Title). The dotted form matters because consumption is genuinely PARTIAL:
openrouter reads two named attribution headers out of defaultHeaders and drops every other
header in it. Reporting defaultHeaders as wholly consumed would silence the warning for
exactly the case the user most needs it for — an auth header for a self-hosted gateway that is
quietly discarded.
A configuration that is not a record at all (configuration: "https://x/v1", a plausible typo
for the block) has no paths and is reported as nothing. That is NOT a silent drop: llm.configuration
is z.record in schema.ts, and every config layer goes through the loader’s validateRawConfigLayer,
so a non-record value is a hard, path-scoped validation error that ends the run before any provider
factory is reached. The schema is the gate for the shape; this function is the gate for the
contents. configurationPassthrough.spec.ts pins that boundary — if the schema ever stops
requiring a record, the case has to be handled here instead.
Parameters
Section titled “Parameters”configuration
Section titled “configuration”unknown
consumedPaths
Section titled “consumedPaths”readonly string[]
Returns
Section titled “Returns”string[]