Conversation
…nk_size The rag_chunk_size setting is now DB-managed via system_settings, not in the Settings class. Use dict.get() with default value instead of falling back to a non-existent attribute.
PUT /v1/admin/settings requires PUT method to be allowed in CORS preflight responses for browser-based API clients.
Runtime treats limit <= 0 as 'unlimited' (allows all requests), but the admin settings validation was rejecting 0. This creates a configuration contradiction. Fix: Rate limit keys now accept 0 (disabled/unlimited) but still reject negative values. Other numeric settings still require positive values.
Fix naming mismatch between: - config.py expects: OPENAI_ADAPTER_API_KEY, OPENAI_ADAPTER_BASE_URL - docker-compose.yaml was using: ADAPTER_OPENAI_API_KEY (wrong order) - .env.example was using: OPENAI_API_KEY (different name) Now all files consistently use OPENAI_ADAPTER_API_KEY and OPENAI_ADAPTER_BASE_URL to match what config.py expects.
Both PUT and PATCH now perform partial updates (only provided keys are changed). PATCH is provided for REST convention compatibility since frontend clients may prefer PATCH for partial updates.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Implements minor API and config improvements with safer defaults and clearer env conventions.
PATCH /v1/admin/settings(alias of PUT) and enablesPUTin CORS; adds integration test for PATCH0for rate-limit integer settings (disabled/unlimited), rejects negatives; tightens int/float/boolean/string checksOPENAI_API_KEY/OPENAI_BASE_URLwithOPENAI_ADAPTER_API_KEY/OPENAI_ADAPTER_BASE_URL;VOICE_API_KEYnow uses adapter keyrag_chunk_sizewith explicit default400instead of env fallbackWritten by Cursor Bugbot for commit ab1d43e. This will update automatically on new commits. Configure here.