Files
yingqing/core/backend
seaislee1209andClaude Opus 4.8 4ce7e957d2 feat(admin): Phase 8 模型供应商管理 — provider/model CRUD + 启停 + 定价 + 设默认
后端:ModelConfig.is_default + migration;get_default_model 优先 is_default 否则回落最早 active(零回归);
adminpanel providers CRUD(api_key write-only 不回传)+ models CRUD(?provider/capability 筛)+ set-default(同 capability 清旧);
IsPlatformAdmin + 审计。
前端:adminApi providers/models/setDefault;Admin 模型供应商页(供应商表+模型表+启停+定价+设默认+供应商/模型弹窗)。
测试:adminpanel 51 单测过(api_key 隐藏+入库/CRUD/set-default 改 get_default_model);
apps.ai 仍仅 3 个进场前既有失败(零回归);无头 e2e _admin-p8.mjs 5 断言过 + 0 console error
(用一次性禁用 provider+model capability=export,无副作用,跑完删);tsc+build 绿。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 22:45:14 +08:00
..

AirShelf Backend

All backend code lives under AirShelf/core/backend by project decision.

Local bootstrap

cd /Users/maidong/Desktop/zyc/qiyuan_gitea/AirShelf/core/backend
python3.12 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
python manage.py migrate
python manage.py runserver 0.0.0.0:8000

Start workers in separate terminals:

cd /Users/maidong/Desktop/zyc/qiyuan_gitea/AirShelf/core/backend
source .venv/bin/activate
celery -A airshelf worker -l info -P threads -c 4   # 线程池 4 并发(出图/视频可并行;勿用 -P solo 串行)

ffmpeg must be available on PATH for Stage5 export jobs.

Runtime layout

  • Django project: airshelf
  • Domain apps: apps/*
  • Settings module: airshelf.settings.development
  • Celery app: airshelf.celery

Secrets must be supplied by environment variables or .env; never commit values from account.md.

Useful commands

python manage.py check
python manage.py makemigrations --check --dry-run
python manage.py migrate
python manage.py bootstrap_volcano_models
python manage.py test apps.accounts apps.projects apps.billing