Venice's API doesn't support certain OpenAI-compatible parameters that Clawdbot sends by default: - `store`: Venice returns HTTP 400 with no body when this is present - `developer` role: Not supported by Venice's API This adds VENICE_COMPAT settings (supportsStore: false, supportsDeveloperRole: false) to all Venice model definitions, both from the static catalog and dynamically discovered models. Fixes issues reported in PR #1666 where users experienced silent failures (HTTP 400, no body) when using Venice models. Co-authored-by: jonisjongithub <jonisjongithub@users.noreply.github.com> Co-authored-by: Clawdbot <bot@clawd.bot>
66 lines
1.9 KiB
Bash
Executable File
66 lines
1.9 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
INSTALL_URL="${CLAWDBOT_INSTALL_URL:-https://clawd.bot/install.sh}"
|
|
SMOKE_PREVIOUS_VERSION="${CLAWDBOT_INSTALL_SMOKE_PREVIOUS:-}"
|
|
SKIP_PREVIOUS="${CLAWDBOT_INSTALL_SMOKE_SKIP_PREVIOUS:-0}"
|
|
|
|
echo "==> Resolve npm versions"
|
|
if [[ -n "$SMOKE_PREVIOUS_VERSION" ]]; then
|
|
LATEST_VERSION="$(npm view clawdbot version)"
|
|
PREVIOUS_VERSION="$SMOKE_PREVIOUS_VERSION"
|
|
else
|
|
VERSIONS_JSON="$(npm view clawdbot versions --json)"
|
|
versions_line="$(node - <<'NODE'
|
|
const raw = process.env.VERSIONS_JSON || "[]";
|
|
let versions;
|
|
try {
|
|
versions = JSON.parse(raw);
|
|
} catch {
|
|
versions = raw ? [raw] : [];
|
|
}
|
|
if (!Array.isArray(versions)) {
|
|
versions = [versions];
|
|
}
|
|
if (versions.length === 0) {
|
|
process.exit(1);
|
|
}
|
|
const latest = versions[versions.length - 1];
|
|
const previous = versions.length >= 2 ? versions[versions.length - 2] : latest;
|
|
process.stdout.write(`${latest} ${previous}`);
|
|
NODE
|
|
)"
|
|
LATEST_VERSION="${versions_line%% *}"
|
|
PREVIOUS_VERSION="${versions_line#* }"
|
|
fi
|
|
|
|
if [[ -n "${CLAWDBOT_INSTALL_LATEST_OUT:-}" ]]; then
|
|
printf "%s" "$LATEST_VERSION" > "$CLAWDBOT_INSTALL_LATEST_OUT"
|
|
fi
|
|
|
|
echo "latest=$LATEST_VERSION previous=$PREVIOUS_VERSION"
|
|
|
|
if [[ "$SKIP_PREVIOUS" == "1" ]]; then
|
|
echo "==> Skip preinstall previous (CLAWDBOT_INSTALL_SMOKE_SKIP_PREVIOUS=1)"
|
|
else
|
|
echo "==> Preinstall previous (forces installer upgrade path)"
|
|
npm install -g "clawdbot@${PREVIOUS_VERSION}"
|
|
fi
|
|
|
|
echo "==> Run official installer one-liner"
|
|
curl -fsSL "$INSTALL_URL" | bash
|
|
|
|
echo "==> Verify installed version"
|
|
INSTALLED_VERSION="$(clawdbot --version 2>/dev/null | head -n 1 | tr -d '\r')"
|
|
echo "installed=$INSTALLED_VERSION expected=$LATEST_VERSION"
|
|
|
|
if [[ "$INSTALLED_VERSION" != "$LATEST_VERSION" ]]; then
|
|
echo "ERROR: expected clawdbot@$LATEST_VERSION, got clawdbot@$INSTALLED_VERSION" >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo "==> Sanity: CLI runs"
|
|
clawdbot --help >/dev/null
|
|
|
|
echo "OK"
|