[AGE-2946] [Bug] Variables are not being escaped in input parameters in the playground
Describe the bug If you provide the completion or chat service an input that includes {{}}, agenta will attempt to swap the variables within the input. Additionally, the {{var}} will be shown as such in the input
Expected behavior Text within moustache {{text}} should not be considered any differently than other text in the inputs to the service, neither in the playground nor in the service iteself 3. Additional Information:
- Include any additional details, error messages, or observations that may be helpful.
Please make sure to provide all the requested information to expedite the debugging process. Thank you for helping us improve our project!
There isn't any documented mechanism in the core playground code to escape or bypass moustache variable substitution in input parameters. The frontend components and hooks that manage input rows and variables do not perform moustache interpolation or provide escaping, and the backend functions related to input formatting don't implement or reference such escaping either. If you're seeing moustache variables being swapped or interpreted, it's likely due to custom prompt logic or external adapters, not the default Agenta playground infrastructure. Implementing an escape mechanism would require changes to both frontend and backend handling of inputs. For now, literal {{var}} text should be preserved unless modified elsewhere in your stack.
See relevant code
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other