Tracking issue for the MVP of the AI Engine Back-end Redesign work-track.
Scope (MVP)
Implement the design in docs/superpowers/specs/2026-05-24-admin-ai-oauth-design.md:
services/llm/ provider-agnostic dispatch gateway
- Three connector types:
- OpenAI API key
- Anthropic API key (replaces hardcoded
ANTHROPIC_API_KEY env var)
- Custom OpenAI-compatible endpoint URL (for DJs to point at Hermes Agent / LiteLLM / Ollama)
- Per-DJ
/settings/ai UI + admin /admin/ai UI
- Recommendation engine (
services/recommendation/llm_client.py) migrated to the gateway with zero observable behavior change
- Alembic migration creates
llm_connectors, llm_call_log, llm_audit_event + 3 new system_settings columns + data-migrates the env-var key into a default connector
- Test suites: gateway, adapters, tool translation, URL validation, API endpoints, recommendation regression
- Frontend tests for both new pages
Out of scope
All deferred work is filed as separate issues under this milestone. See §11 of the spec.
Implementation directive
Per spec §10.1, the implementer agent should:
- Read the spec in full
- Confirm working on a feature branch (
worktree-feat+admin-ai-oauth or similar — never main)
- Read
CLAUDE.md and related memory ([[llm-oauth-gateway]], [[feedback-litellm-avoid]])
- Use
superpowers:writing-plans to produce a phased plan from the spec
- Use
superpowers:subagent-driven-development to dispatch parallel sub-agents (see spec §10.1 for the 7 suggested slots)
- Run full local CI (the "push to testing" workflow from
MEMORY.md) before pushing
- Open the PR with this issue linked
Acceptance criteria
Per spec §9. Move this issue to In Review when the PR opens, and to Complete when it merges.
Integration branch (updated 2026-05-25)
This work-track merges into the long-lived integration branch epic/ai-engine, not main.
- Branch this task off the epic:
git fetch origin && git checkout -b feat/issue-329 origin/epic/ai-engine
- Open its PR with base =
epic/ai-engine (gh pr create --base epic/ai-engine)
- Full CI + CodeRabbit review + manual testing still gate every sub-PR into the epic
epic/ai-engine → main is a single final merge after end-to-end validation
See spec §10.0 (Branching & Integration Strategy) for details.
Tracking issue for the MVP of the AI Engine Back-end Redesign work-track.
Scope (MVP)
Implement the design in
docs/superpowers/specs/2026-05-24-admin-ai-oauth-design.md:services/llm/provider-agnostic dispatch gatewayANTHROPIC_API_KEYenv var)/settings/aiUI + admin/admin/aiUIservices/recommendation/llm_client.py) migrated to the gateway with zero observable behavior changellm_connectors,llm_call_log,llm_audit_event+ 3 newsystem_settingscolumns + data-migrates the env-var key into a default connectorOut of scope
All deferred work is filed as separate issues under this milestone. See §11 of the spec.
Implementation directive
Per spec §10.1, the implementer agent should:
worktree-feat+admin-ai-oauthor similar — nevermain)CLAUDE.mdand related memory ([[llm-oauth-gateway]],[[feedback-litellm-avoid]])superpowers:writing-plansto produce a phased plan from the specsuperpowers:subagent-driven-developmentto dispatch parallel sub-agents (see spec §10.1 for the 7 suggested slots)MEMORY.md) before pushingAcceptance criteria
Per spec §9. Move this issue to In Review when the PR opens, and to Complete when it merges.
Integration branch (updated 2026-05-25)
This work-track merges into the long-lived integration branch
epic/ai-engine, notmain.git fetch origin && git checkout -b feat/issue-329 origin/epic/ai-engineepic/ai-engine(gh pr create --base epic/ai-engine)epic/ai-engine→mainis a single final merge after end-to-end validationSee spec §10.0 (Branching & Integration Strategy) for details.