Skip to content

Claude/read spec n6efu#168

Merged
yellowman merged 5 commits intomainfrom
claude/read-spec-n6efu
Dec 26, 2025
Merged

Claude/read spec n6efu#168
yellowman merged 5 commits intomainfrom
claude/read-spec-n6efu

Conversation

@yellowman
Copy link
Copy Markdown
Owner

@yellowman yellowman commented Dec 26, 2025

Note

Implements minor API and config improvements with safer defaults and clearer env conventions.

  • Admin settings: Adds PATCH /v1/admin/settings (alias of PUT) and enables PUT in CORS; adds integration test for PATCH
  • Validation: Allows 0 for rate-limit integer settings (disabled/unlimited), rejects negatives; tightens int/float/boolean/string checks
  • Env & Docker: Replaces OPENAI_API_KEY/OPENAI_BASE_URL with OPENAI_ADAPTER_API_KEY/OPENAI_ADAPTER_BASE_URL; VOICE_API_KEY now uses adapter key
  • Runtime defaults: Retrieves rag_chunk_size with explicit default 400 instead of env fallback

Written by Cursor Bugbot for commit ab1d43e. This will update automatically on new commits. Configure here.

…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.
@yellowman yellowman merged commit 4c8fe8c into main Dec 26, 2025
4 of 5 checks passed
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.

2 participants