diegosouzapw/OmniRoute · error

Unsupported code language

Error message

Unsupported code language: ${language}

What it means

Language allow-list guard in eval_code: after lowercasing, the requested `language` matched neither javascript/js nor python/py (the only runtimes with preselected sandbox images and commands). Any other language string — or a typo — is rejected before a container image is chosen.

Solutions

  1. Use language "javascript" (or "js") or "python" (or "py")
  2. For other runtimes, use execute_command with a suitable sandbox image instead
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/lib/skills/builtins.ts:452 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/19f4675f36548785. Report an issue: GitHub.

Appendix: source

Thrown at src/lib/skills/builtins.ts:452

      image?: string;
      timeoutMs?: number;
      networkEnabled?: boolean;
    };
    if (!code || typeof code !== "string") {
      throw new Error("Missing required field: code");
    }

    const normalizedLanguage = language.toLowerCase();
    let selectedImage: string;
    let command: string[];
    if (normalizedLanguage === "javascript" || normalizedLanguage === "js") {
      selectedImage = normalizeImage(image, DEFAULT_JS_IMAGE);
      command = ["node", "--eval", code];
    } else if (normalizedLanguage === "python" || normalizedLanguage === "py") {
      selectedImage = normalizeImage(image, DEFAULT_PYTHON_IMAGE);
      command = ["python", "-c", code];
    } else {
      throw new Error(`Unsupported code language: ${language}`);
    }

    const result = await sandboxRunner.run(
      selectedImage,
      command,
      {},
      sandboxConfig({ timeoutMs, networkEnabled })
    );
    const stdout = truncateOutput(result.stdout);
    const stderr = truncateOutput(result.stderr);
    return {
      success: result.exitCode === 0,
      language: normalizedLanguage,
      image: selectedImage,
      exitCode: result.exitCode,
      stdout: stdout.value,
      stderr: stderr.value,
      output: stdout.value,

View on GitHub (pinned to a179ffed5b)