Skip to content

feat(models)!: remove per-model gateway images — one shared gateway, models picked at runtime (#294) - #296

Open
elronbandel wants to merge 1 commit into
mainfrom
elron/shared-model-gateway-ae4531
Open

feat(models)!: remove per-model gateway images — one shared gateway, models picked at runtime (#294)#296
elronbandel wants to merge 1 commit into
mainfrom
elron/shared-model-gateway-ae4531

Conversation

@elronbandel

@elronbandel elronbandel commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Implementation half of #294 (doctrine half: #295). The model axis now has exactly one framework image kind: the shared generic gateway. EVAL_MODEL=<provider>/<model> is the only way to pick a model; EVAL_GATEWAY_IMAGE picks only the proxy flavor (bifrost default; litellm, portkey). models/replay stays as the sole in-tree pinned exception (models rule 17).

Removed

  • containers/models/{gpt-5, gpt-5.4, gpt-4.1-mini, claude-opus-4, claude-sonnet-4} — the five pinned per-model images.
  • containers/core/litellm — their only base, orphaned once they are gone (gateways/litellm is independent: FROM python:3.12-slim, its own eval_logger.py).
  • The litellmVersion chart knob + EVAL_LITELLM_VERSION plumbing (runtime override unimplemented since Delete dead eval-entrypoint.sh #50) and the model_missing_litellm_version_* rego gates, which matched exactly the five deleted Dockerfiles.

Retargeted guards

  • tests/static/model-paths.sweep.sh — asserts the single path: default flavor + flavor swap, with the EVAL_MODEL handle always reaching the gateway at runtime.
  • tests/static/check.rs::model_axis_generic_default_no_silent_model — new structural invariant: every containers/models/<name>/Dockerfile must be FROM a gateways/<flavor> image (replay excepted), so a per-model image cannot sneak back into the tree.

Custom images stay possible — downstream (models rule 1a)

docs/guides/add-a-model.md gains a "Custom gateway config (advanced, non-default)" section: teams that need a shared custom config (fixed endpoint, cost rates, alias table) mount their template on the published gateway image, or bake a template-only derivation FROM gateways/<flavor> in their own registry and select it via the untouched seams (EVAL_REGISTRY+EVAL_GATEWAY_IMAGE, or gatewayImageRef). This is the migration path for anyone who relied on a deleted pinned image: the old configs are in git history and rebuild 1:1 downstream. Already-published GHCR tags remain pullable for reproducing old runs; they just stop being rebuilt.

Fixed in passing

deploy/oc conflated the two meanings of "model" (--model bifrost, --set gatewayImage=$MODEL) and its handle plumbing (evalModel) was never read by the chart — so the gateway's EVAL_MODEL got the literal image name. Now --model is the <provider>/<model> handle (what the chart's model value actually is), --gateway is the flavor, and result paths key on the clean model label (last handle segment), matching the chart's eval.modelLabel.

Docs, PR/issue templates, and .env.example collapse to the single-path story; stale core/litellm pointers now name gateways/litellm.

Verification

  • cargo test -p eval-containers (29 tests, incl. bake-target conformance) — green
  • cargo test --test check (16) + --test dockerfile_inspection (6) — green
  • conftest verify on the dockerfile policies — 80/80
  • tests/static/model-paths.sweep.sh — green
  • tests/static/helm.sweep.sh — 102 benchmarks rendered + validated, 0 failed
  • cargo check --workspace --tests — clean

Rules checked against

models/RULES.md 1, 1a, 12–17 · gateways/RULES.md 16–17 · RULES.md 8–9, 15 · src/RULES.md 10, 12 · verification/RULES.md (static gates above) · contributing/RULES.md 1–3 (code-only; resolves #294 with #295).

BREAKING CHANGE: the five per-model images are no longer published; set EVAL_MODEL=<provider>/<model> on the shared gateway instead — or, if you depended on a pinned image's custom config, rebuild it downstream per the new "Custom gateway config" guide section.

Closes #294 (together with #295).

…models picked at runtime (#294)

Implementation half of #294 (doctrine: #295). The model axis now has exactly
one image kind: the shared generic gateway. EVAL_MODEL=<provider>/<model> is
the only way to pick a model; EVAL_GATEWAY_IMAGE picks only the proxy flavor
(bifrost default; litellm/portkey). models/replay stays as the sole pinned
exception (models rule 17).

Removed:
- containers/models/{gpt-5,gpt-5.4,gpt-4.1-mini,claude-opus-4,claude-sonnet-4}
  (the five pinned per-model images) and containers/core/litellm, their only
  base — orphaned once they are gone (gateways/litellm is independent).
- The litellmVersion chart knob + EVAL_LITELLM_VERSION env plumbing
  (unimplemented since #50) and the litellm-version rego gates, which matched
  exactly the five deleted Dockerfiles.

Retargeted guards:
- tests/static/model-paths.sweep.sh: asserts the single path — default flavor
  + flavor swap, with the handle always reaching the gateway at runtime.
- tests/static/check.rs::model_axis_generic_default_no_silent_model: every
  models/<name> image must be FROM a gateways/<flavor> image (replay
  excepted), so a per-model image cannot sneak back in.

deploy/oc scripts un-conflated: --model is now the <provider>/<model> handle
(what the chart's `model` value actually is) and --gateway the flavor; the
dead evalModel plumbing and the --bifrost-suffix-stripping handle derivation
are gone; result paths key on the clean model label.

Docs, PR/issue templates, and .env.example collapse to the single-path story;
stale core/litellm pointers now name gateways/litellm.

Checked against: models/RULES.md 1, 12-17; gateways/RULES.md 16-17;
RULES.md 8-9, 15; src/RULES.md 10, 12; verification/RULES.md (static gates
green: cargo test -p eval-containers + --test check + dockerfile_inspection,
conftest verify 80/80, helm sweep 102/102, model-paths sweep).

BREAKING CHANGE: the models/{gpt-5,gpt-5.4,gpt-4.1-mini,claude-opus-4,
claude-sonnet-4} images are no longer published; set
EVAL_MODEL=<provider>/<model> on the shared gateway instead.

Signed-off-by: Elron Bandel <elron.bandel@ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove per-model gateway images — one shared model gateway, models are runtime-only

1 participant