From af5cb4df2a8dde98a9543f3268ad511ae3adfe20 Mon Sep 17 00:00:00 2001 From: Seth Freiberg Date: Fri, 20 Mar 2026 21:37:36 -0400 Subject: [PATCH] Semver rename: mortdecai:0.4.0, mortdecai:0.5.0 Co-Authored-By: Claude Opus 4.6 (1M context) --- README.md | 4 ++-- gateway.py | 4 ++-- setup.sh | 6 +++--- update-model.sh | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 53aac87..fb53964 100644 --- a/README.md +++ b/README.md @@ -157,12 +157,12 @@ Response: ```bash curl -X POST http://gateway:8434/admin/update-model \ -H "Authorization: Bearer $KEY" \ - -d '{"url": "https://mortdec.ai/dl/v5/mortdecai-v5.gguf", "name": "mortdecai-v5"}' + -d '{"url": "https://mortdec.ai/dl/v5/mortdecai-0.5.0.gguf", "name": "mortdecai:0.5.0"}' ``` **Manual update**: Run the update script: ```bash -./update-model.sh https://mortdec.ai/dl/v5/mortdecai-v5.gguf mortdecai-v5 +./update-model.sh https://mortdec.ai/dl/v5/mortdecai-0.5.0.gguf mortdecai:0.5.0 ``` ## Response Metadata diff --git a/gateway.py b/gateway.py index e00a636..ef1882e 100644 --- a/gateway.py +++ b/gateway.py @@ -216,7 +216,7 @@ def _calc_marginal_cost(duration_seconds): return marginal_watts, energy_wh, cost -def _track_request(tokens_in, tokens_out, duration_seconds, model="mortdecai-v4"): +def _track_request(tokens_in, tokens_out, duration_seconds, model="mortdecai:0.4.0"): """Track a completed inference request and record in ledger.""" marginal_watts, energy_wh, cost = _calc_marginal_cost(duration_seconds) @@ -461,7 +461,7 @@ class GatewayHandler(BaseHTTPRequestHandler): def _handle_model_update(self, body): """Download a new GGUF from a URL and reload the model. - Request: {"url": "https://mortdec.ai/dl/...", "name": "mortdecai-v5"} + Request: {"url": "https://mortdec.ai/dl/...", "name": "mortdecai:0.5.0"} This is opt-in — the gateway operator must enable ALLOW_MODEL_UPDATES=true. """ if os.environ.get("ALLOW_MODEL_UPDATES", "false").lower() != "true": diff --git a/setup.sh b/setup.sh index 043db6f..e64e553 100755 --- a/setup.sh +++ b/setup.sh @@ -5,8 +5,8 @@ set -e -MODEL_URL="${MODEL_URL:-https://mortdec.ai/dl/m4gguf/mortdecai-v4.gguf}" -MODEL_NAME="mortdecai-v4" +MODEL_URL="${MODEL_URL:-https://mortdec.ai/dl/m4gguf/mortdecai-0.4.0.gguf}" +MODEL_NAME="mortdecai:0.4.0" echo "=== Mortdecai Gateway Setup ===" echo "" @@ -70,7 +70,7 @@ else # Create Modelfile cat > models/Modelfile << 'MEOF' -FROM /models/mortdecai-v4.gguf +FROM /models/mortdecai:0.4.0.gguf TEMPLATE """{{- if .Messages }} {{- if or .System .Tools }}<|im_start|>system {{- if .System }} diff --git a/update-model.sh b/update-model.sh index 36197d2..d5625c6 100755 --- a/update-model.sh +++ b/update-model.sh @@ -1,12 +1,12 @@ #!/bin/bash # Update Mortdecai model to a new version # Usage: ./update-model.sh [url] [name] -# Example: ./update-model.sh https://mortdec.ai/dl/m5gguf/mortdecai-v5.gguf mortdecai-v5 +# Example: ./update-model.sh https://mortdec.ai/dl/m5gguf/mortdecai-0.5.0.gguf mortdecai:0.5.0 set -e -URL="${1:-https://mortdec.ai/dl/m4gguf/mortdecai-v4.gguf}" -NAME="${2:-mortdecai-v4}" +URL="${1:-https://mortdec.ai/dl/m4gguf/mortdecai-0.4.0.gguf}" +NAME="${2:-mortdecai:0.4.0}" echo "=== Mortdecai Model Update ===" echo " URL: $URL"