Skip to content

PATCH /v3/settings: filterPrompt is accepted but stored and returned empty (shouldLLMFilter persists) #1698

Description

@johnmarktaylor91

Summary

PATCH /v3/settings accepts a filterPrompt but it is not stored. The response's updated.filterPrompt comes back empty, and a following GET /v3/settings also returns an empty filterPrompt. shouldLLMFilter: true in the same request is stored, so the org ends up with LLM filtering enabled and no filter instructions.

Steps to reproduce

  1. PATCH https://api.supermemory.ai/v3/settings with a JSON body such as:
    { "shouldLLMFilter": true, "filterPrompt": "<plain-English instructions, ~450 characters, no special characters beyond punctuation>" }
  2. Inspect the response.
  3. GET https://api.supermemory.ai/v3/settings.

Sending filterPrompt on its own (without shouldLLMFilter) behaves the same way.

Expected

updated.filterPrompt and the subsequent GET return the submitted prompt, as in the examples in the Customization and Update settings docs.

Actual

  • The PATCH returns 200 with orgId, orgSlug and updated, where updated.shouldLLMFilter is true and updated.filterPrompt is an empty string.
  • The GET returns shouldLLMFilter: true and an empty filterPrompt.
  • There is no error or validation message explaining why the prompt was dropped.

Questions

  • Is filterPrompt restricted by plan tier, length, or some other precondition that isn't documented? If so, could the API return an error rather than silently dropping it?
  • With shouldLLMFilter: true and an empty prompt, what does the filter do: pass everything, or apply a default?

Environment

  • REST API called directly (Python, JSON body, bearer API key), 2026-09-23.
  • Reproduced twice, with identical results.

Activity

  1. linear-code commented on Sep 23, 2026

    @linear-code
  2. 84dnnvbdvp-debug commented on Sep 23, 2026

    @84dnnvbdvp-debug

    One adjacent contract boundary seems worth pinning in the regression: the current customization guide documents filterPrompt as 1–750 characters, but the shared OrganizationSettingsSchema currently declares it as z.string().nullable().optional() with no min/max constraint (while workspacePrompt does carry an explicit max).

    So a persistence-only fix could make the reported ~450-character prompt round-trip while still leaving the documented input contract unenforced or silently coercing/dropping boundary values. I’d pair the main regression with boundary validation through the same public settings path: a valid prompt round-trips exactly (including 1 and 750 chars), while empty / >750 input follows the documented rejection contract rather than returning 200 with a different stored value.

    That also gives a clean invariant for the original bug: any 2xx PATCH response should reflect the value that will subsequently be returned by GET, unless the API explicitly documents a normalization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions