Files
ttstd-infinite-canvas/docker-compose.local.yml
dingxin150015-commits ea236b5956 feat(provider): add plugin system for service-specific model discovery
Model discovery currently assumes every provider exposes all models via
GET {baseURL}/models. Providers like Alibaba Cloud Bailian serve video,
3D and some image models through dedicated endpoints, so 21 models across
5 families (HappyHorse / Wan / Kling / PixVerse / Vidu / Tripo) are never
discoverable - a functional blocker for a video creation workbench.

This introduces a ModelDiscovery plugin interface with a registry that
matches vendor plugins by base URL and falls back to the standard OpenAI
implementation, keeping core discovery logic vendor-agnostic.

- add provider.ModelDiscovery interface and plugin registry
- add openai plugin (standard behaviour, default fallback)
- add bailian plugin (standard + 21 extended multimodal models)
- gate behind ENABLE_PROVIDER_PLUGINS, default false
- register plugins lazily from service layer to avoid import cycle

Verified locally: flag off -> 238 models (unchanged); flag on -> 257
models (238 + 19 net new after dedup). OpenAI and Gemini channels
unaffected in both modes.
2026-08-17 13:47:27 +08:00

63 lines
1.7 KiB
YAML

services:
backend:
image: open-ai-canvas-backend:local
build:
context: .
dockerfile: backend/Dockerfile
args:
GOPROXY: ${GOPROXY:-https://goproxy.cn,direct}
environment:
CANVAS_BACKEND_ADDR: ":8080"
CANVAS_BACKEND_DATA_DIR: /data
CANVAS_DATABASE_DRIVER: ${CANVAS_DATABASE_DRIVER:-sqlite}
DATABASE_URL: ${DATABASE_URL:-}
REDIS_URL: ${REDIS_URL:-}
CANVAS_WORKER_CONCURRENCY: ${CANVAS_WORKER_CONCURRENCY:-3}
CANVAS_CHANNEL_CONCURRENCY: ${CANVAS_CHANNEL_CONCURRENCY:-3}
CANVAS_REGISTRATION_ENABLED: ${CANVAS_REGISTRATION_ENABLED:-false}
CANVAS_ALLOW_PRIVATE_UPSTREAMS: ${CANVAS_ALLOW_PRIVATE_UPSTREAMS:-false}
CANVAS_ALLOWED_PRIVATE_UPSTREAM_HOSTS: ${CANVAS_ALLOWED_PRIVATE_UPSTREAM_HOSTS:-}
CANVAS_CORS_ORIGINS: ${CANVAS_CORS_ORIGINS:-http://localhost:3000}
ENABLE_PROVIDER_PLUGINS: ${ENABLE_PROVIDER_PLUGINS:-false}
GIN_MODE: release
volumes:
- backend-data:/data
restart: unless-stopped
develop:
watch:
- action: rebuild
path: ./backend
ignore:
- data/
web:
image: open-ai-canvas-web:local
build:
context: .
dockerfile: Dockerfile
ports:
- "3000:3000"
depends_on:
backend:
condition: service_healthy
restart: unless-stopped
develop:
watch:
- action: rebuild
path: ./web
ignore:
- node_modules/
- dist/
- tsconfig.tsbuildinfo
- action: rebuild
path: ./Dockerfile
- action: rebuild
path: ./nginx.conf
- action: rebuild
path: ./VERSION
- action: rebuild
path: ./CHANGELOG.md
volumes:
backend-data: