Skip to content

PLTF-4: Automate LiteLLM setup#253

Merged
jlav merged 4 commits into
mainfrom
jl/PLTF-4/automate-litellm-setup
Jan 23, 2026
Merged

PLTF-4: Automate LiteLLM setup#253
jlav merged 4 commits into
mainfrom
jl/PLTF-4/automate-litellm-setup

Conversation

@jlav

@jlav jlav commented Jan 20, 2026

Copy link
Copy Markdown
Member

Description

Closes #251

Configuring LiteLLM requires manually configuring a team, then populating the helm values with the ID of that team that was created. We need this process to be automated to facilitate using Replicated for managed installations.

This PR adds an init container which automatically provisions a new team if the teamId set in the values doesn't exist. The default teamId is openhands.

Helm Chart Checklist

  • I have updated the version field in Chart.yaml for each modified chart
  • I have tested the chart upgrade path from the previous version
  • I have verified backwards compatibility with existing values.yaml configurations
  • I have updated the chart's README.md if there are any breaking changes or new required values

Additional Notes

I've added a couple of comments already to explain some of the changes I made.

Comment on lines -6 to -7
# This var will cause the openhands deploy to create the LLM team name if it doesn't exist already
LITE_LLM_TEAM_NAME: openhands

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment was misleading, and as far as I can tell LITE_LLM_TEAM_NAME isn't used anywhere within this chart or the entire OpenHands github org. I've removed it.

# NOTE: We recommend using the provided LiteLLM instance for simplicity and
# because it is the most extensively tested scenario. Our automation uses an
# admin key to do user management for the LiteLLM instance.
enabled: false

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little confused on the purpose of this flag - without it set to true, LITE_LLM_API_URL is never configured at all, regardless of whether you're using the provided LiteLLM instance or not.

In this PR, I've used it to gate off LiteLLM configuration in general, but let me know if I'm misinterpreting.

labels:
app: openhands
annotations:
checksum/keycloak-config: {{ include (print $.Template.BasePath "/keycloak-config-script.yaml") . | sha256sum }}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a missing checksum for keycloak while I'm here.

With the check sum in place, pods will rollover whenever the config script is updated.

Comment on lines +50 to +51
\"team_id\": \"$LITE_LLM_TEAM_ID\",
\"team_alias\": \"$LITE_LLM_TEAM_ID\"

@jlav jlav Jan 20, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a callout that team_alias is what we're referring to as Team Name in our documentation. It's the same model name you see in the LiteLLM UI.

I've had this script explicitly set an ID rather than a name because IDs are unique while aliases are not. If we really want to lean on resolving the team by name, we'd have to add some sort of locking mechanism to this script to prevent creating duplicate teams.

@raymyers

raymyers commented Jan 20, 2026

Copy link
Copy Markdown
Contributor

Thanks for this. @neubig and @xingyaoww might be the best to help look at this?

@jlav jlav requested review from neubig and xingyaoww January 20, 2026 18:40

@neubig neubig left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looked reasonable to me! I assume this means that then argocd will manage the litellm configuration, so we can test this on staging next right?

One question: where do we get the version of litellm? Is this inherited from the other infra files in some way? I didn't see it in the PR.

@jlav

jlav commented Jan 21, 2026

Copy link
Copy Markdown
Member Author

Yep, we can test this in staging. I believe we're installing the OpenHands helm chart via https://github.com/OpenHands/deploy rather than through argo now, though?

The LiteLLM version is set through the litellm-helm chart. According to their chart, the LiteLLM version matches the app version set in the chart by default.

@jlav

jlav commented Jan 22, 2026

Copy link
Copy Markdown
Member Author

I was able to validate that the upgrade path works on the staging GKE cluster through this preview PR, where I deployed 0.1.35 followed by deploying the upgrade to 0.2.0: https://github.com/OpenHands/deploy/pull/2792

I can see logs indicating that the config script ran as intended. @raymyers or @neubig, you mind swinging back for an approval?

@jlav jlav requested a review from neubig January 23, 2026 16:19

@neubig neubig left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, now that this is confirmed to be working!

@jlav jlav merged commit b004cdd into main Jan 23, 2026
9 checks passed
@jlav jlav deleted the jl/PLTF-4/automate-litellm-setup branch January 23, 2026 18:04
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.

Automate LiteLLM setup for single-shot installation (Replicated support)

3 participants