Prod's Gemini prepayment credits are depleted (429 on every refine
attempt). Switching to Anthropic Claude Opus 4.8 for the mission
Refine flow — ANTHROPIC_API_KEY is already set in prod for ZeroClaw's
provider config, so no new secret plumbing.
- crates/cm-api/src/mission_refiner.rs:
* DEFAULT_MODEL: gemini-2.5-flash → claude-opus-4-8
* call_gemini → call_anthropic against
https://api.anthropic.com/v1/messages with the standard
x-api-key + anthropic-version headers
* Response parser reads content[type='text'].text (Messages API
block shape) instead of Gemini's candidates path
* Timeout raised 60s → 90s (Opus can be slower than Flash on
long briefs; still bounded so a stuck call fails fast)
- deploy/compose/.env.example: doc block rewritten. Refine now
reuses ANTHROPIC_API_KEY; Level-Up keeps GEMINI_API_KEY because
it needs JSON-mode structured output.
Level-Up is NOT switched in this commit — it uses Gemini's JSON mode
which has no drop-in Anthropic equivalent (needs tool-use rewrite).
Filed as a separate concern; Refine is what was actively broken.
Verified: SQLX_OFFLINE=true cargo check -p cm-api clean;
cargo fmt --all clean.
61 lines
3.0 KiB
Bash
61 lines
3.0 KiB
Bash
# Copy to .env and set real values before `docker compose up`.
|
|
# These are overlaid onto clawmates.toml at runtime (CLAWMATES_* env wins).
|
|
|
|
# --- Required ---------------------------------------------------------------
|
|
# Postgres superuser password (also used in the server/broker DSN).
|
|
POSTGRES_PASSWORD=change-me
|
|
|
|
# Image tag to run. `latest` after a local `docker compose build`, or the
|
|
# release version (e.g. 0.1.0) when installing from a signed bundle.
|
|
CLAWMATES_VERSION=latest
|
|
|
|
# --- First-owner bootstrap (local auth) -------------------------------------
|
|
# A fresh install has no users and no public signup. Set a password here and
|
|
# the server provisions this Owner + workspace ONCE on first boot, then never
|
|
# again (safe to leave set across restarts). Remove/blank to disable.
|
|
CLAWMATES_BOOTSTRAP_OWNER_EMAIL=[email protected]
|
|
CLAWMATES_BOOTSTRAP_OWNER_PASSWORD=
|
|
CLAWMATES_BOOTSTRAP_WORKSPACE=My Workspace
|
|
CLAWMATES_BOOTSTRAP_CREDITS=1250
|
|
|
|
# --- LLM --------------------------------------------------------------------
|
|
# Default config (clawmates.toml) uses an OpenAI-compatible endpoint at
|
|
# http://local-llm:8000/v1 — point base_url at your vLLM/Ollama/llama.cpp.
|
|
# To use Anthropic instead, set llm.provider = "anthropic" in clawmates.toml
|
|
# and provide the key here (uncomment):
|
|
# ANTHROPIC_API_KEY=sk-ant-...
|
|
|
|
# --- Refine + Level-Up LLM providers ----------------------------------------
|
|
# Refine (mission description rewrites) calls Anthropic Claude Opus 4.8 by
|
|
# default. The existing ANTHROPIC_API_KEY (used by ZeroClaw providers) is
|
|
# reused — no separate key needed. Override model with CLAWMATES_REFINER_MODEL.
|
|
#
|
|
# Level-Up (per-agent + per-team improvement proposals) still calls Gemini
|
|
# 2.5 Flash because it needs JSON-mode structured output. If Gemini credits
|
|
# lapse, set CLAWMATES_LEVEL_UP_MODEL to another supported Gemini model
|
|
# with quota — or plan to swap this to Anthropic tool-use in a later slice.
|
|
# GEMINI_API_KEY=AIza...
|
|
# CLAWMATES_REFINER_MODEL=claude-opus-4-8
|
|
# CLAWMATES_LEVEL_UP_MODEL=gemini-2.5-flash
|
|
|
|
# --- Auth mode (optional) ---------------------------------------------------
|
|
# clawmates.toml defaults to mode = "local". For Clerk, set mode = "clerk"
|
|
# and auth.issuer_url there, then supply the frontend keys (see docs/clerk.md):
|
|
# AUTH_MODE=clerk
|
|
# CLERK_PUBLISHABLE_KEY=pk_live_...
|
|
# CLERK_SECRET_KEY=sk_live_...
|
|
|
|
# --- Observability (optional) -----------------------------------------------
|
|
# Export traces to an OTLP/HTTP collector. Unset = logs only, no network.
|
|
# CLAWMATES_TELEMETRY__OTLP_ENDPOINT=http://otel-collector:4318
|
|
|
|
# --- Outbound email delivery (optional) -------------------------------------
|
|
# The §15 door's email_send queues to `outbox`; the server's drainer delivers
|
|
# over SMTP when these are set (otherwise it logs "outbox delivery DISABLED"
|
|
# and rows stay queued). Use an SMTP submission account (host + app password).
|
|
# CLAWMATES_SMTP_HOST=smtp.migadu.com
|
|
# CLAWMATES_SMTP_PORT=587
|
|
# [email protected]
|
|
# CLAWMATES_SMTP_PASS=<smtp app password>
|
|
# [email protected]
|