ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/missionmatch / ops/m4/gateway-backend.sh

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/missionmatch / ops/m4/gateway-backend.sh
DateNot specified in source
RepositoryJanady13/missionmatch
Revision1e9249840a4302ec82e123b9c9cb6f75badea3e4
Branchmaster
Path or archive memberops/m4/gateway-backend.sh
Original SHA-256a19fb06aaa488a39eec4a4e659e48025b9d2f0f8f98b90afe4eacf293cd3db0e
Git blob SHA0bdbc8bd3d3c8f0e7af39b7d9b59fbd7ef19e2ec
Reading-copy SHA-256a19fb06aaa488a39eec4a4e659e48025b9d2f0f8f98b90afe4eacf293cd3db0e

Original source ↗

Recovered source transcript

#!/bin/bash # Flip the missionMATCH generation runtime the MEGAMIND gateway proxies, then verify it. # # gateway-backend.sh ollama the local Ollama binary (default, no Python, Metal accelerated) # gateway-backend.sh mlx the external MLX server on 8081 (Apple Silicon, fastest on an M chip) # gateway-backend.sh megamind the MEGAMIND reasoning brain on 9999 (answers from its own learned corpus) # # Embeddings ALWAYS stay on Ollama's bge model so the stored vectors and the boot vector gate keep matching; # only generation is selectable. The running mm-api reads the gateway per request, so a flip is picked up with # no mm-api redeploy. If the selected backend fails at request time the gateway falls back to Ollama. set -u BACKEND=${1:-ollama} case "$BACKEND" in ollama|mlx|megamind) ;; *) echo "usage: $0 ollama|mlx|megamind"; exit 2 ;; esac # When flipping to MLX, make sure a known good small MLX server is up on 8081 first (a 4 bit 3B model that is # fast on an M chip and leaves room for the Ollama faithfulness model in 16GB). If it is not running, start it; # the gateway's ollama fallback covers requests while the model loads. if [ "$BACKEND" = "mlx" ]; then MLXBIN="$HOME/mlx-train-venv/bin/mlx_lm.server" MLXMODEL=mlx-community/Qwen2.5-3B-Instruct-4bit if pgrep -f "mlx_lm.server.*--port 8081" >/dev/null 2>&1; then echo "mlx server already up on 8081" elif [ -x "$MLXBIN" ]; then echo "starting mlx server ($MLXMODEL) on 8081" nohup "$MLXBIN" --model "$MLXMODEL" --host 0.0.0.0 --port 8081 > "$HOME/mlx-server.log" 2>&1 </dev/null & sleep 6 else echo "mlx server binary $MLXBIN missing; the mlx backend will fall back to ollama" fi fi pkill -f "megamind-gateway" 2>/dev/null sleep 1 MEGAMIND_ADDR=0.0.0.0:8090 MEGAMIND_GENERATE_BACKEND="$BACKEND" \ nohup "$HOME/megamind-gateway" > "$HOME/megamind-gateway.log" 2>&1 </dev/null & sleep 2 if ! curl -fsS -m 5 http://127.0.0.1:8090/healthz >/dev/null 2>&1; then echo "gateway did not come up on 8090, check $HOME/megamind-gateway.log" exit 1 fi echo "gateway restarted with generation backend=$BACKEND" head -1 "$HOME/megamind-gateway.log"

Search equations, builds, manuscript text, and recovered sources.