The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix: sync Helm chart version with LiteLLM release version (#19438)
Cesar Garcia7515f179e72e
diff --git a/.github/workflows/ghcr_deploy.yml b/.github/workflows/ghcr_deploy.ymlindex aa032972b80..f67538a4272 100644--- a/.github/workflows/ghcr_deploy.yml+++ b/.github/workflows/ghcr_deploy.yml@@ -320,72 +320,36 @@ jobs:run: |echo "REPO_OWNER=`echo ${{github.repository_owner}} | tr '[:upper:]' '[:lower:]'`" >>${GITHUB_ENV}- - name: Get LiteLLM Latest Tag- id: current_app_tag- shell: bash- run: |- LATEST_TAG=$(git describe --tags --exclude "*dev*" --abbrev=0)- if [ -z "${LATEST_TAG}" ]; then- echo "latest_tag=latest" | tee -a $GITHUB_OUTPUT- else- echo "latest_tag=${LATEST_TAG}" | tee -a $GITHUB_OUTPUT- fi-- - name: Get last published chart version- id: current_version- shell: bash- run: |- CHART_LIST=$(helm show chart oci://${{ env.REGISTRY }}/${{ env.REPO_OWNER }}/${{ env.CHART_NAME }} 2>/dev/null || true)- if [ -z "${CHART_LIST}" ]; then- echo "current-version=1.0.0" | tee -a $GITHUB_OUTPUT- else- # Extract version and strip any prerelease suffix (e.g., 1.0.5-latest -> 1.0.5)- VERSION=$(printf '%s' "${CHART_LIST}" | grep '^version:' | awk 'BEGIN{FS=":"}{print $2}' | tr -d " " | cut -d'-' -f1)- echo "current-version=${VERSION}" | tee -a $GITHUB_OUTPUT- fi- env:- HELM_EXPERIMENTAL_OCI: '1'-- # Automatically update the helm chart version one "patch" level- - name: Bump release version- id: bump_version- uses: christian-draeger/[email protected]- with:- current-version: ${{ steps.current_version.outputs.current-version || '1.0.0' }}- version-fragment: 'bug'-- # Add suffix for non-stable releases (semantic versioning)+ # Sync Helm chart version with LiteLLM release version (1-1 versioning)+ # This allows users to easily map Helm chart versions to LiteLLM versions+ # See: https://codefresh.io/docs/docs/ci-cd-guides/helm-best-practices/- name: Calculate chart and app versionsid: chart_versionshell: bashrun: |- BASE_VERSION="${{ steps.bump_version.outputs.next-version || '1.0.0' }}"- RELEASE_TYPE="${{ github.event.inputs.release_type }}"INPUT_TAG="${{ github.event.inputs.tag }}"+ RELEASE_TYPE="${{ github.event.inputs.release_type }}"- # Chart version (independent Helm chart versioning with release type suffix)- if [ "$RELEASE_TYPE" = "stable" ]; then- echo "version=${BASE_VERSION}" | tee -a $GITHUB_OUTPUT- else- echo "version=${BASE_VERSION}-${RELEASE_TYPE}" | tee -a $GITHUB_OUTPUT- fi+ # Chart version = LiteLLM version without 'v' prefix (Helm semver convention)+ # v1.81.0 -> 1.81.0, v1.81.0.rc.1 -> 1.81.0.rc.1+ CHART_VERSION="${INPUT_TAG#v}"- # App version (must match Docker tags)- # stable/rc releases: Docker creates main-{tag}, so use the tag- # latest/dev releases: Docker only creates main-{release_type}, so use release_type- if [ "$RELEASE_TYPE" = "stable" ] || [ "$RELEASE_TYPE" = "rc" ]; then- APP_VERSION="${INPUT_TAG}"- else- APP_VERSION="${RELEASE_TYPE}"+ # Add suffix for 'latest' releases (rc already has suffix in tag)+ if [ "$RELEASE_TYPE" = "latest" ]; then+ CHART_VERSION="${CHART_VERSION}-latest"fi+ # App version = Docker tag (keeps 'v' prefix to match Docker image tags)+ APP_VERSION="${INPUT_TAG}"++ echo "version=${CHART_VERSION}" | tee -a $GITHUB_OUTPUTecho "app_version=${APP_VERSION}" | tee -a $GITHUB_OUTPUT- uses: ./.github/actions/helm-oci-chart-releaserwith:name: ${{ env.CHART_NAME }}repository: ${{ env.REPO_OWNER }}- tag: ${{ github.event.inputs.chartVersion || steps.chart_version.outputs.version || '1.0.0' }}+ tag: ${{ steps.chart_version.outputs.version }}app_version: ${{ steps.chart_version.outputs.app_version }}path: deploy/charts/${{ env.CHART_NAME }}registry: ${{ env.REGISTRY }}diff --git a/.github/workflows/ghcr_helm_deploy.yml b/.github/workflows/ghcr_helm_deploy.ymlindex f78dc6f0f3f..21b2eaafe19 100644--- a/.github/workflows/ghcr_helm_deploy.yml+++ b/.github/workflows/ghcr_helm_deploy.yml@@ -1,10 +1,12 @@-# this workflow is triggered by an API call when there is a new PyPI release of LiteLLM+# Standalone workflow to publish LiteLLM Helm Chart+# Note: The main ghcr_deploy.yml workflow also publishes the Helm chart as part of a full releasename: Build, Publish LiteLLM Helm Chart. New Releaseon:workflow_dispatch:inputs:- chartVersion:- description: "Update the helm chart's version to this"+ tag:+ description: "LiteLLM version tag (e.g., v1.81.0)"+ required: true# Defines two custom environment variables for the workflow. Used for the Container registry domain, and a name for the Docker image that this workflow builds.env:@@ -31,24 +33,22 @@ jobs:run: |echo "REPO_OWNER=`echo ${{github.repository_owner}} | tr '[:upper:]' '[:lower:]'`" >>${GITHUB_ENV}- - name: Get LiteLLM Latest Tag- id: current_app_tag- uses: WyriHaximus/[email protected]-- - name: Get last published chart version- id: current_version+ # Sync Helm chart version with LiteLLM release version (1-1 versioning)+ - name: Calculate chart and app versions+ id: chart_versionshell: bash- run: helm show chart oci://${{ env.REGISTRY }}/${{ env.REPO_OWNER }}/litellm-helm | grep '^version:' | awk 'BEGIN{FS=":"}{print "current-version="$2}' | tr -d " " | tee -a $GITHUB_OUTPUT- env:- HELM_EXPERIMENTAL_OCI: '1'+ run: |+ INPUT_TAG="${{ github.event.inputs.tag }}"- # Automatically update the helm chart version one "patch" level- - name: Bump release version- id: bump_version- uses: christian-draeger/[email protected]- with:- current-version: ${{ steps.current_version.outputs.current-version || '0.1.0' }}- version-fragment: 'bug'+ # Chart version = LiteLLM version without 'v' prefix+ # v1.81.0 -> 1.81.0+ CHART_VERSION="${INPUT_TAG#v}"++ # App version = Docker tag (keeps 'v' prefix)+ APP_VERSION="${INPUT_TAG}"++ echo "version=${CHART_VERSION}" | tee -a $GITHUB_OUTPUT+ echo "app_version=${APP_VERSION}" | tee -a $GITHUB_OUTPUT- name: Lint helm chartrun: helm lint deploy/charts/litellm-helm@@ -57,8 +57,8 @@ jobs:with:name: litellm-helmrepository: ${{ env.REPO_OWNER }}- tag: ${{ github.event.inputs.chartVersion || steps.bump_version.outputs.next-version || '0.1.0' }}- app_version: ${{ steps.current_app_tag.outputs.tag || 'latest' }}+ tag: ${{ steps.chart_version.outputs.version }}+ app_version: ${{ steps.chart_version.outputs.app_version }}path: deploy/charts/litellm-helmregistry: ${{ env.REGISTRY }}registry_username: ${{ github.actor }}