fix: confusing prompt name error messages#1805
fix: confusing prompt name error messages#1805aditya-mitra wants to merge 1 commit intospeakeasy-api:mainfrom
Conversation
|
|
@aditya-mitra is attempting to deploy a commit to the Speakeasy Team on Vercel. A member of the Team first needs to authorize it. |
walker-tx
left a comment
There was a problem hiding this comment.
Thank you for your PR @aditya-mitra!
It looks like the prompt name regex was modified to shorten the allowable input length. Would you explain why you've done this, or revert it back to 128 chars please?
| export const TOOL_NAME_PATTERN = "^[a-zA-Z]+(?:[_][a-zA-Z0-9]+)*$"; | ||
| export const TOOL_NAME_REGEX = new RegExp(TOOL_NAME_PATTERN); | ||
| export const PROMPT_NAME_PATTERN = "^[a-z0-9_-]{1,128}$"; | ||
| export const PROMPT_NAME_PATTERN = "^[a-z0-9_-]{1,40}$"; |
There was a problem hiding this comment.
Would you share a bit about why the character limit has been changed here?
There was a problem hiding this comment.
Sure. body.Name has validation of limit 40 here
gram/server/gen/http/templates/server/types.go
Lines 2747 to 2751 in 67c2464
body.name seems confusing as it can also mean the prompt body - updated it to show a more useful error message