Skip to content

Conversation

@ishaan-jaff
Copy link
Contributor

@ishaan-jaff ishaan-jaff commented Nov 19, 2025

[Feat] Prompt Management - Add support for versioning prompts

The dotprompt integration now supports versioned prompts, allowing users to maintain and reference different versions of the same prompt using the prompt_version parameter.

Create versioned files like this

Relevant issue: #16233

prompts/
├── chat_prompt.prompt       # Base version
├── chat_prompt.v1.prompt    # Version 1
└── chat_prompt.v2.prompt    # Version 2

Usage

# Use version 1
curl -X POST 'http://0.0.0.0:4000/chat/completions' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer sk-1234' \
  -d '{
    "model": "gpt-4",
    "prompt_id": "chat_prompt",
    "prompt_version": 1,
    "prompt_variables": {"user_message": "Hello"}
  }'

# Use version 2
curl -X POST 'http://0.0.0.0:4000/chat/completions' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer sk-1234' \
  -d '{
    "model": "gpt-4",
    "prompt_id": "chat_prompt",
    "prompt_version": 2,
    "prompt_variables": {"user_message": "Hello"}
  }'

Relevant issues

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • I have added a screenshot of my new test passing locally
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🆕 New Feature
✅ Test

Changes

@vercel
Copy link

vercel bot commented Nov 19, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
litellm Ready Ready Preview Comment Nov 19, 2025 6:26pm

@ishaan-jaff ishaan-jaff merged commit 3ebe489 into main Nov 19, 2025
38 of 59 checks passed
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.

2 participants