Ticket graphs

Every ticket as the root of its provenance graph — goal, patch, approval, runs and (as the ticket-class build lands) mandate, manifestations, guarantees, journey, artifacts and children. Rendered through the <<<TicketGraphList>>> tag.

← all ticket-graphs

DONE#411 jazz-agents

Route coder workers through Cerebras GLM 4.7 (litellm proxy worker model) — OpenAI-compat engine in ollama_agent

goal

The Cerebras GLM 4.7 provider is WIRED AND LIVE: the litellm proxy (localhost:4000) now routes model "worker" -> cerebras/zai-glm-4.7 (validated end-to-end: worker completions return clean code; reasoning on/off both work). The key comes from the wallet (CEREBRAS_LLM) via config/litellm/start.sh (restart-durable). What remains: make pair_loop's coder WORKERS actually run through GLM 4.7 instead of `claude -p`. The coder runner is checkouts/current/congruency/tools/ollama_agent.py. It currently speaks OLLAMA's native /api/chat at OLLAMA_URL (localhost:11434). The litellm proxy and Cerebras speak the OpenAI /v1/chat/completions shape. GOAL: add an OpenAI-COMPATIBLE engine path so a coder worker can target the litellm proxy's "worker" model (GLM 4.7), reusing ALL of ollama_agent's existing structured-output-enforcement + tool-extraction + registration machinery. REQUIREMENTS: 1. Add a way to select the OpenAI-compat backend (e.g. an env OPENAI_BASE / a --api-flavor openai flag, or a new `--engine cerebras` that rebinds pair_loop's spawn_claude exactly like --engine ollama does). Endpoint: POST <base>/v1/chat/completions (base defaults to http://localhost:4000, the litellm proxy). No auth needed for the local proxy; if a proxy master key is later set, read it from env. 2. Request shape: OpenAI {model, messages, max_tokens, response_format for JSON-schema-constrained output}. For GLM 4.7 use the migration-guide defaults already in the litellm config (temperature=1, top_p=0.95, max_tokens<=40000) and pass reasoning_effort/clear_thinking appropriately: clear_thinking:false for agentic/coding turns; reasoning_effort:"none" for cheap structured/deterministic turns. IMPORTANT: GLM 4.7 reasons by default and will spend the whole token budget on reasoning if max_tokens is tiny — size max_tokens generously and read choices[0].message.content (reasoning is in message.reasoning_content, not content). 3. Response parsing: OpenAI shape (choices[0].message.content) — map it onto whatever ollama_agent's existing parser expects. Keep the JSON-schema/validate-retry channel (#175) working over OpenAI response_format. 4. Preserve the same claude-p contract: prompt-in, deliverable file written, final-line JSON out; register the agent recording the model that ACTUALLY ran (cerebras/zai-glm-4.7). 5. Prove it with --selftest (offline: rebind takes, request/response mapping correct against a stub) AND a live run: a real documentation or small build ticket settled by a coder worker running GLM 4.7 through the proxy, deliverable verified. Deliverable: checkouts/current/congruency/tools/ollama_agent.py (extend it; do not break the existing Ollama path or its selftest). Gated on nothing — the proxy is live now.

patch

none

approval

unapproved

runs

no runs recorded

mandate (clauses)

not yet recorded — lands with the ticket-class build

manifestations

not yet recorded — lands with the ticket-class build

guarantees

not yet recorded — lands with the ticket-class build

journey (blunders & successes)

not yet recorded — lands with the ticket-class build

artifacts (forge)

not yet recorded — lands with the ticket-class build

source (forge tree)

browse congruency source (forge-parked tree)

children

not yet recorded — lands with the ticket-class build