Skip to content

Remove deprecated response_type parameter from query settings UI#2345

Merged
danielaskdd merged 1 commit intoHKUDS:mainfrom
danielaskdd:remove-response-type
Nov 12, 2025
Merged

Remove deprecated response_type parameter from query settings UI#2345
danielaskdd merged 1 commit intoHKUDS:mainfrom
danielaskdd:remove-response-type

Conversation

@danielaskdd
Copy link
Collaborator

Remove response_type Parameter from Query Settings UI

Summary

The query parameter response_type is deprecated, as it can no longer effectively control the query output. Output behavior can now be guided through the user_prompt. In the future, full output customization will be achieved by modifying the prompt templates.

This PR removes the response_type parameter from the query settings interface and fixes it to "Multiple Paragraphs" for all queries. The parameter is no longer configurable by users through the UI.

Changes Made

1. Frontend UI (lightrag_webui/src/components/retrieval/QuerySettings.tsx)

  • Removed the entire "Response Format" section including:
    • Select dropdown for choosing response format
    • Reset button for response_type
    • Tooltip and label components
  • Removed response_type from defaultValues object

2. Query Execution (lightrag_webui/src/features/RetrievalTesting.tsx)

  • Hardcoded response_type: 'Multiple Paragraphs' in the queryParams object
  • All queries now consistently use "Multiple Paragraphs" format regardless of stored settings

3. Settings Store (lightrag_webui/src/stores/settings.ts)

  • Removed response_type: 'Multiple Paragraphs' from initial querySettings state
  • Incremented storage version from 18 to 19
  • Added migration for version 19 that automatically removes deprecated response_type from localStorage

Migration Strategy

The implementation includes automatic migration for existing users:

  • Users with response_type in localStorage will have it automatically removed on next app load
  • Storage version bump ensures migration runs exactly once
  • No manual intervention required from users

Testing

  • ✅ Frontend builds successfully with no compilation errors
  • ✅ Linting passes with no warnings or errors
  • ✅ All queries will use "Multiple Paragraphs" format consistently
  • ✅ No breaking changes to the API (response_type remains optional in QueryRequest interface)

Breaking Changes

None - This is a UI-only change. The backend API still accepts response_type as an optional parameter, ensuring backward compatibility with other clients.

- Bump API version to 0254
- Remove response format UI controls
- Hard-code response_type in query params
- Add migration for version 19
- Clean up settings store structure
@danielaskdd
Copy link
Collaborator Author

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Hooray!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielaskdd danielaskdd merged commit 477c3f5 into HKUDS:main Nov 12, 2025
1 check passed
@danielaskdd danielaskdd deleted the remove-response-type branch November 12, 2025 04:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant