From 49c6e10574c2a3463e3a0f3ec70a351ab5b47285 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 19 May 2026 13:39:51 -0400 Subject: [PATCH] litellm: shadow gpt-4o-mini / gpt-4o / gpt-4-turbo aliases onto Claude backends paperless-ai's setup wizard validates the OpenAI provider by hardcoding model=gpt-4o-mini in the probe, regardless of the OPENAI_MODEL env. Without the alias LiteLLM 400s ("Invalid model name") and the wizard rejects the key. Shadow common OpenAI names onto our Claude backends so any client that probes gpt-* gets a healthy response (and routes to the Max sub). Co-Authored-By: Claude Opus 4.7 (1M context) --- vars/main.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/vars/main.yml b/vars/main.yml index f981a34..e714acb 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -43,15 +43,26 @@ litellm_port: 4000 litellm_host: "0.0.0.0" litellm_package_spec: "litellm[proxy]==1.55.10" # Models map onto Meridian's pinned Anthropic-shape backend on 127.0.0.1:3456. -# Add Sonnet/Opus aliases too so clients can pick cost vs quality without -# touching this config. +# Native Claude aliases AND OpenAI-named aliases — some clients (paperless-ai's +# setup wizard) hardcode `model=gpt-4o-mini` for validation regardless of +# what you set as the default model, so we shadow the common OpenAI names too. litellm_models: + # Native Claude aliases (preferred for new clients) - name: claude-haiku-4-5 backend: anthropic/claude-haiku-4-5 - name: claude-sonnet-4-6 backend: anthropic/claude-sonnet-4-6 - name: claude-opus-4-7 backend: anthropic/claude-opus-4-7 + # OpenAI-name shadows — for clients that probe gpt-* names regardless of + # config (paperless-ai wizard, Open WebUI defaults, etc.). All actually + # backed by Claude on the Max sub. + - name: gpt-4o-mini + backend: anthropic/claude-haiku-4-5 + - name: gpt-4o + backend: anthropic/claude-sonnet-4-6 + - name: gpt-4-turbo + backend: anthropic/claude-sonnet-4-6 # Master key is required by LiteLLM. Pulled at deploy time from Infisical # /meridian/vault_litellm_master_key and passed via -e on the playbook # (see deploy.sh).