#!/bin/sh # SessionStart hook: tell the agent when the session runs against the self-hosted # vLLM gateway, where model aliases (sonnet, opus, haiku) do not exist. # Prints nothing on Anthropic/Vertex so the default rules apply. case "${ANTHROPIC_BASE_URL:-}" in *vllm*|*seibert.tools*) model="${ANTHROPIC_MODEL:-${CLAUDE_CODE_SUBAGENT_MODEL:-the configured model}}" printf '{"hookSpecificOutput":{"hookEventName":"SessionStart","additionalContext":"Self-hosted backend (%s): only %s is available. Never pass a model override to Agent calls; all subagents inherit this model."}}\n' "$ANTHROPIC_BASE_URL" "$model" ;; esac exit 0