DuckDuckGo web executor with circuit breaker and request handling logic.
// Source: https://github.com/diegosouzapw/OmniRoute | License: MIT | Copyright 2026 diegosouzapw
// Provided via justclaw.it.com; keep this notice with the code.
import { Buffer } from "node:buffer";
import { generateKeyPairSync, randomUUID } from "node:crypto";
import vm from "node:vm";
import { solveDuckDuckGoChallenge, makeDuckDuckGoFeSignals } from "./duckduckgo-web/challenge.ts";
import {
DUCKDUCKGO_DEFAULT_MODEL,
DUCKDUCKGO_MODEL_ALIASES,
FE_VERSION_PATTERN,
extractFreeDuckDuckGoModelIds,
normalizeDuckDuckGoModel,
pickDuckDuckGoModel,
} from "./duckduckgo-web/models.ts";
import { BaseExecutor, type ExecuteInput } from "./base.ts";
import { FETCH_TIMEOUT_MS } from "../config/constants.ts";
import { prepareToolMessages, buildToolAwareResult } from "../translator/webTools.t
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key