-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Description
Check for existing issues
- I have searched the existing issues and checked that my issue is not a duplicate.
What happened?
Prompt Studio fails to load any prompt that was saved via the Prompt Studio UI "Update" button or the PUT /prompts/{id} API using prompt_data. The editor opens blank with a generic "New prompt" placeholder instead of the actual prompt content.
Root cause: The Prompt Studio save path writes prompt content to litellm_params.prompt_data.content (body only, no YAML frontmatter) and sets litellm_params.dotprompt_content = null. But the Prompt Studio load path (853e5f250e7a0af5.js, line 167) only reads from litellm_params.dotprompt_content:
let t = e?.prompt_spec?.litellm_params?.dotprompt_content || "";
if (!t) throw Error("No dotprompt_content found in API response");
When dotprompt_content is null, it throws and silently falls back to a blank editor. The prompt data is actually persisted correctly in prompt_data.content — it's just never read back.
Steps to Reproduce
Create a prompt by uploading a .prompt file via the UI "Upload .prompt File" button (this correctly populates dotprompt_content). Confirm Prompt Studio loads it — it works.
Open the prompt in Prompt Studio, make any edit (or no edit), and click "Update" to save.
Close Prompt Studio and re-open the same prompt in Prompt Studio.
Result: Prompt Studio shows a blank "New prompt" editor instead of the saved content. The browser console logs: Error parsing existing prompt: Error: No dotprompt_content found in API response.
Relevant log output
Browser console (debug level):
Error parsing existing prompt: Error: No dotprompt_content found in API response
at 853e5f250e7a0af5.js:167What part of LiteLLM is this about?
Proxy
What LiteLLM version are you on ?
v1.82.1
Twitter / LinkedIn details
No response