Skip to content

[Admin][API] Runtime kill switch for platform-paid AI (platform_settings override) #46

Description

@serge-ivo

Follow-up from #32 (PR #43). Today the only lever to stop platform-paid AI is editing PLATFORM_AI_ENABLED in wrangler.toml + redeploy.

Add GET/PUT /v1/admin/settings/platform-ai backed by a platform_settings row that overrides the env default at runtime, so the operator can toggle platform-paid AI without a deploy. Wire the runtime checks (agent-do.ts:72, routes/instances-translation.ts) to consult the override. Audit-log the toggle (recordAdminAction). Known side effect to warn on: OFF → embeddings/summaries/translation no-op (RAG goes dark until a BYOK-embedding path exists).

Part of the PAGS Admin Portal epic (#27). Depends on #28.

Metadata

Metadata

Assignees

No one assigned

    Labels

    admin-portalPAGS admin/operator portalenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions