[GH-ISSUE #3495] [BUG]: Error: Providing empty 'slug' field returns error when creating a new workspace #2255

Closed
opened 2026-02-22 18:28:51 -05:00 by yindo · 3 comments
Owner

Originally created by @jaymeklein on GitHub (Mar 18, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3495

Originally assigned to: @timothycarambat on GitHub.

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

When creating a new workspace via Developer API (/v1/workspace/new), some fields are ignored (eg: queryRefusalResponse), while slug raises an error.

slug is not even a required field for this endpoint, shouldn't it just be ignored?

I'm not sure if that would be considered a bug, but I felt i was important to report.

Are there known steps to reproduce?

This will return an error:

curl -X 'POST' \
  'http://localhost:3001/api/v1/workspace/new' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "My New Workspace",
"slug": ""
  "similarityThreshold": 0.7,
  "openAiTemp": 0.7,
  "openAiHistory": 20,
  "openAiPrompt": "Custom prompt for responses",
  "queryRefusalResponse": "",
  "chatMode": "chat",
  "topN": 4
}'

While this will not:

curl -X 'POST' \
  'http://localhost:3001/api/v1/workspace/new' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "My New Workspace",
  "similarityThreshold": 0.7,
  "openAiTemp": 0.7,
  "openAiHistory": 20,
  "openAiPrompt": "Custom prompt for responses",
  "queryRefusalResponse": "",
  "chatMode": "chat",
  "topN": 4
}'
Originally created by @jaymeklein on GitHub (Mar 18, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3495 Originally assigned to: @timothycarambat on GitHub. ### How are you running AnythingLLM? AnythingLLM desktop app ### What happened? When creating a new workspace via Developer API (`/v1/workspace/new`), some fields are ignored (eg: `queryRefusalResponse`), while `slug` raises an error. `slug` is not even a required field for this endpoint, shouldn't it just be ignored? I'm not sure if that would be considered a bug, but I felt i was important to report. ### Are there known steps to reproduce? This will return an error: ```curl curl -X 'POST' \ 'http://localhost:3001/api/v1/workspace/new' \ -H 'accept: application/json' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "name": "My New Workspace", "slug": "" "similarityThreshold": 0.7, "openAiTemp": 0.7, "openAiHistory": 20, "openAiPrompt": "Custom prompt for responses", "queryRefusalResponse": "", "chatMode": "chat", "topN": 4 }' ``` While this will not: ```curl curl -X 'POST' \ 'http://localhost:3001/api/v1/workspace/new' \ -H 'accept: application/json' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "name": "My New Workspace", "similarityThreshold": 0.7, "openAiTemp": 0.7, "openAiHistory": 20, "openAiPrompt": "Custom prompt for responses", "queryRefusalResponse": "", "chatMode": "chat", "topN": 4 }' ```
yindo added the possible buginvestigating labels 2026-02-22 18:28:51 -05:00
yindo closed this issue 2026-02-22 18:28:51 -05:00
Author
Owner

@timothycarambat commented on GitHub (Mar 18, 2025):

Hm, queryRefusalResponse should for sure be able to be set. slug should not be settable since it is automatically managed though since that is a backend only thing for referencing workspaces uniquely.

@timothycarambat commented on GitHub (Mar 18, 2025): Hm, `queryRefusalResponse` should for sure be able to be set. `slug` should not be settable since it is automatically managed though since that is a backend only thing for referencing workspaces uniquely.
Author
Owner

@shatfield4 commented on GitHub (Mar 18, 2025):

In your JSON here

curl -X 'POST' \ 'http://localhost:3001/api/v1/workspace/new' \ -H 'accept: application/json' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "name": "My New Workspace", "slug": "" "similarityThreshold": 0.7, "openAiTemp": 0.7, "openAiHistory": 20, "openAiPrompt": "Custom prompt for responses", "queryRefusalResponse": "", "chatMode": "chat", "topN": 4 }'

There is a missing comma on the line where you are defining the slug. I have tested this and all works as it should, if a slug is defined we ignore this because our backend will automatically generate a unique slug for any new workspace created. If you add that comma after the slug line everything works as intended, including setting the queryRefusalResponse message.

@shatfield4 commented on GitHub (Mar 18, 2025): In your JSON here `curl -X 'POST' \ 'http://localhost:3001/api/v1/workspace/new' \ -H 'accept: application/json' \ -H 'Authorization: Bearer YOUR_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "name": "My New Workspace", "slug": "" "similarityThreshold": 0.7, "openAiTemp": 0.7, "openAiHistory": 20, "openAiPrompt": "Custom prompt for responses", "queryRefusalResponse": "", "chatMode": "chat", "topN": 4 }'` There is a missing comma on the line where you are defining the slug. I have tested this and all works as it should, if a slug is defined we ignore this because our backend will automatically generate a unique slug for any new workspace created. If you add that comma after the slug line everything works as intended, including setting the `queryRefusalResponse` message.
Author
Owner

@jaymeklein commented on GitHub (Mar 18, 2025):

Thanks for looking into it so fast, and sorry for that damn comma... 🤡

@jaymeklein commented on GitHub (Mar 18, 2025): Thanks for looking into it so fast, and sorry for that damn comma... 🤡
yindo changed title from [BUG]: Error: Providing empty 'slug' field returns error when creating a new workspace to [GH-ISSUE #3495] [BUG]: Error: Providing empty 'slug' field returns error when creating a new workspace 2026-06-05 14:45:28 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#2255