OpenConceptLab/ocl_issues#2383 | saving prompt template url#866
OpenConceptLab/ocl_issues#2383 | saving prompt template url#866snyaggarwal wants to merge 3 commits intomasterfrom
Conversation
paynejd
left a comment
There was a problem hiding this comment.
Review
Small, focused PR — does what it says. Two items to address before merge:
1. Naming: reconsider prompt_template_url
The ticket discussion settled on storing the template without the version — so what we're actually persisting is just the prompt template key (e.g. match-recommend), not a full URI (/prompts/match-recommend/v1/) or URL. Storing a key in a field called _url is misleading.
Suggest renaming to prompt_template_key (or just prompt_template) to match what's actually stored. The full URI is only needed when capturing the AI Assistant response (which includes the version used), not for the project-level config. Better to get the name right now than do a rename migration later.
2. Add a test
PR #862 added MapProjectConfigurationsViewTest — please add an assertion there (or a new test) that prompt_template_url (or whatever it gets renamed to) round-trips through the configurations endpoint and is included in create/update.
Everything else looks clean. The encoder_model AlterField in the migration is a harmless Django artifact (settings reference baked as literal) — no action needed.
Linked Issue
Refs: OpenConceptLab/ocl_issues#2383