diegosouzapw/OmniRoute · error · GrokBuildConfigConflictError

The [model.omniroute] table exists and OmniRoute does not ow

Error message

The [model.omniroute] table exists and OmniRoute does not own it

What it means

Error "The [model.omniroute] table exists and OmniRoute does not own it" thrown in diegosouzapw/OmniRoute.

Source

Thrown at src/shared/services/grokBuildConfig.ts:229

  const section = parseModelSection(toml, GROK_MAIN_MODEL_SLOT);
  if (!section) return false;
  const body = getSectionBody(toml, `model.${GROK_MAIN_MODEL_SLOT}`) ?? "";
  const keys = [...body.matchAll(/^\s*([A-Za-z0-9_-]+)\s*=/gm)].map((match) => match[1]);
  const allowed = new Set(["model", "base_url", "name", "description", "api_backend", "api_key"]);
  return (
    keys.every((key) => allowed.has(key)) &&
    section.model !== null &&
    section.base_url !== null &&
    section.name === "OmniRoute" &&
    section.api_backend === "chat_completions" &&
    getSectionString(toml, `model.${GROK_MAIN_MODEL_SLOT}`, "description") === LEGACY_DESCRIPTION
  );
};

const assertMainSlotOwnership = (toml: string): void => {
  const body = getSectionBody(toml, `model.${GROK_MAIN_MODEL_SLOT}`);
  if (body === null || body.includes(MANAGED_MARKER) || isLegacyOwnedMainSection(toml)) return;
  throw new GrokBuildConfigConflictError();
};

export class GrokBuildConfigConflictError extends Error {
  constructor() {
    super("The [model.omniroute] table exists and OmniRoute does not own it");
    this.name = "GrokBuildConfigConflictError";
  }
}

/** Parse the Grok Build fields that OmniRoute manages. */
export function parseGrokBuildConfig(toml: string): GrokBuildSettings {
  if (toml.trim()) parseToml(toml);
  const subagentModels = {} as Record<GrokSubagentType, GrokModelConfig | null>;
  const subagentMappings = {} as Record<GrokSubagentType, string | null>;
  for (const type of GROK_SUBAGENT_TYPES) {
    const mapping = getSectionString(toml, SUBAGENT_MODELS_SECTION, type);
    subagentMappings[type] = mapping;
    subagentModels[type] = mapping === modelSlot(type) ? parseModelSection(toml, mapping) : null;

View on GitHub (pinned to a179ffed5b)

When it happens

Trigger: Thrown at src/shared/services/grokBuildConfig.ts:229 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25). Data as JSON: /api/errors/aefa232e43418621. Report an issue: GitHub.