Skip to content

[Bug]: Prompt Studio fails to load prompts saved via UI — dotprompt_content null after UI save, only prompt_data.content populated #23935

@phanisarman

Description

@phanisarman

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:167

What part of LiteLLM is this about?

Proxy

What LiteLLM version are you on ?

v1.82.1

Twitter / LinkedIn details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingproxy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions