Skip to content

feat: add db-backed OpenAI-compatible model management#93

Open
yjing86 wants to merge 4 commits intosugarlabs:mainfrom
yjing86:gsoc2026
Open

feat: add db-backed OpenAI-compatible model management#93
yjing86 wants to merge 4 commits intosugarlabs:mainfrom
yjing86:gsoc2026

Conversation

@yjing86
Copy link
Copy Markdown

@yjing86 yjing86 commented Mar 24, 2026

Summary

This PR now includes several commits on the same branch, with the main change being the introduction of database-backed OpenAI-compatible model management for Sugar-AI.

Main change

  • replace embedded Hugging Face runtime inference with an OpenAI-compatible provider layer
  • persist model configuration in the database
  • support runtime activation and switching of the active model
  • add admin APIs and UI for model management
  • update Docker, env examples, and README for Ollama/vLLM or external OpenAI-compatible backends
  • add an API smoke test script

Additional branch commits

This PR branch also currently includes a few smaller commits that landed before the main feature commit:

  • refine the GSoC 2026 AI optimization proposal
  • restore Jinja TemplateResponse compatibility
  • fix loading DEV_MODE from environment settings

Why

Sugar-AI was previously tightly coupled to local in-process model loading. This change moves the app toward a provider-oriented architecture and makes model configuration and switching easier to operate.

Testing

  • ./.venv/bin/python scripts/test_api.py --internal

Notes

@yjing86 yjing86 marked this pull request as draft March 27, 2026 07:23
@yjing86 yjing86 marked this pull request as ready for review March 27, 2026 07:23
@yjing86 yjing86 changed the title docs: refine gsoc 2026 ai optimization proposal feat: add db-backed OpenAI-compatible model management Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant