{"record":{"id":"2678a2f01dfee7ca","repo":"coleam00/Archon","slug":"invalid-run-config-at-assistants-provider-suf","errorCode":null,"errorMessage":"Invalid run config at 'assistants.${provider}${suffix}': ${error.message}.","messagePattern":"Invalid run config at 'assistants\\.(.+?)(.+?)': (.+?)\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/core/src/config/run-config.ts","lineNumber":142,"sourceCode":"    assertRegisteredProvider(provider, `assistants.${provider}`);\n    if (provider === 'pi' && Object.hasOwn(defaults, 'env')) {\n      throw new Error(\n        \"Run config key 'assistants.pi.env' cannot apply: Pi extension environment mutates \" +\n          'process.env and is process-scoped.'\n      );\n    }\n    if (provider === 'pi' && Object.hasOwn(defaults, 'maxConcurrent')) {\n      throw new Error(\n        \"Run config key 'assistants.pi.maxConcurrent' cannot apply: Pi concurrency is \" +\n          'initialized once for the process lifetime.'\n      );\n    }\n    try {\n      assistants[provider] = getRegistration(provider).parseRunConfig(defaults);\n    } catch (error) {\n      if (error instanceof InvalidProviderRunConfigError) {\n        const suffix = error.fieldPath ? `.${error.fieldPath}` : '';\n        throw new Error(\n          `Invalid run config at 'assistants.${provider}${suffix}': ${error.message}.`\n        );\n      }\n      throw error;\n    }\n  }\n  const tiers = Object.fromEntries(\n    Object.entries(layer.tiers ?? {}).map(([tier, preset]) => [\n      tier,\n      normalizePreset(`tiers.${tier}`, preset),\n    ])\n  );\n  const aliases = Object.fromEntries(\n    Object.entries(layer.aliases ?? {}).map(([alias, preset]) => [\n      alias,\n      normalizePreset(`aliases.${alias}`, preset),\n    ])\n  );","sourceCodeStart":124,"sourceCodeEnd":160,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/core/src/config/run-config.ts#L124-L160","documentation":"A provider's parseRunConfig() rejected assistant defaults, so the config layer rethrows with the provider and optional field path prefixed for clarity. InvalidProviderRunConfigError carries a fieldPath used to build the 'assistants.<provider>.<field>' location in the message.","triggerScenarios":"Calling runConfig()/parseWorkflowRunConfig()/unsealWorkflowRunConfig() with a value under assistants.<provider> that fails that provider's parseRunConfig validation (wrong type, unknown field, bad value).","commonSituations":"Typo'd or malformed options under an assistant provider section; passing a string where an object is expected; using options not supported by the registered provider version.","solutions":["Read the inner error.message for the specific field and reason","Fix or remove the offending key under assistants.<provider> in the config","Check the provider's documented run-config options to confirm the key and value shape"],"exampleFix":"// before\nassistants:\n  claude:\n    model: 123\n// after\nassistants:\n  claude:\n    model: claude-sonnet-4-5","handlingStrategy":"validation","validationCode":"function validateAssistantDefaults(provider, defaults, parseRunConfig) { try { parseRunConfig(defaults); } catch (e) { throw new Error(`Invalid assistants.${provider} defaults: ${e.message}`); } }","typeGuard":"function isRecord(v) { return typeof v === 'object' && v !== null && !Array.isArray(v); }","tryCatchPattern":"try { cfg = runConfig(layers); } catch (e) { const m = String(e.message).match(/Invalid run config at 'assistants\\.([^.]+)(\\.(\\S+))?'/); if (m) console.error(`Fix assistants.${m[1]}${m[3] ? '.' + m[3] : ''}`); throw e; }","preventionTips":["Validate provider defaults against the provider's documented schema before loading","Keep provider option names and types in one source of truth","Test run config files with the real loader in CI"],"tags":["config","provider-validation","schema"],"backgroundTag":"schema-validation-failed","analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}