AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
refactor(platform): remove built-in Revid credential, require user-provided key (#13507)
Krzysztof Czerwinski5259ecc91645
diff --git a/autogpt_platform/backend/.env.default b/autogpt_platform/backend/.env.defaultindex fbfd2ecd94..5275b51c3e 100644--- a/autogpt_platform/backend/.env.default+++ b/autogpt_platform/backend/.env.default@@ -208,7 +208,6 @@ DID_API_KEY=FAL_API_KEY=IDEOGRAM_API_KEY=REPLICATE_API_KEY=-REVID_API_KEY=SCREENSHOTONE_API_KEY=UNREAL_SPEECH_API_KEY=ELEVENLABS_API_KEY=diff --git a/autogpt_platform/backend/backend/data/block_cost_config.py b/autogpt_platform/backend/backend/data/block_cost_config.pyindex 0c4fed6a16..e9fbbd46ad 100644--- a/autogpt_platform/backend/backend/data/block_cost_config.py+++ b/autogpt_platform/backend/backend/data/block_cost_config.py@@ -13,11 +13,6 @@ from backend.blocks.ai_condition import AIConditionBlockfrom backend.blocks.ai_image_customizer import AIImageCustomizerBlock, GeminiImageModelfrom backend.blocks.ai_image_generator_block import AIImageGeneratorBlock, ImageGenModelfrom backend.blocks.ai_music_generator import AIMusicGeneratorBlock-from backend.blocks.ai_shortform_video_block import (- AIAdMakerVideoCreatorBlock,- AIScreenshotToVideoAdBlock,- AIShortformVideoCreatorBlock,-)from backend.blocks.apollo.organization import SearchOrganizationsBlockfrom backend.blocks.apollo.people import SearchPeopleBlockfrom backend.blocks.apollo.person import GetPersonDetailBlock@@ -96,7 +91,6 @@ from backend.integrations.credentials_store import (open_router_credentials,openai_credentials,replicate_credentials,- revid_credentials,screenshotone_credentials,smartlead_credentials,unreal_credentials,@@ -626,42 +620,6 @@ BLOCK_COSTS: dict[Type[Block], list[BlockCost]] = {},),],- AIShortformVideoCreatorBlock: [- BlockCost(- cost_amount=307,- cost_filter={- "credentials": {- "id": revid_credentials.id,- "provider": revid_credentials.provider,- "type": revid_credentials.type,- }- },- )- ],- AIAdMakerVideoCreatorBlock: [- BlockCost(- cost_amount=714,- cost_filter={- "credentials": {- "id": revid_credentials.id,- "provider": revid_credentials.provider,- "type": revid_credentials.type,- }- },- )- ],- AIScreenshotToVideoAdBlock: [- BlockCost(- cost_amount=612,- cost_filter={- "credentials": {- "id": revid_credentials.id,- "provider": revid_credentials.provider,- "type": revid_credentials.type,- }- },- )- ],ReplicateFluxAdvancedModelBlock: [BlockCost(cost_amount=10,diff --git a/autogpt_platform/backend/backend/integrations/credentials_store.py b/autogpt_platform/backend/backend/integrations/credentials_store.pyindex 5e8fbb7064..ab42de3565 100644--- a/autogpt_platform/backend/backend/integrations/credentials_store.py+++ b/autogpt_platform/backend/backend/integrations/credentials_store.py@@ -55,13 +55,6 @@ ollama_credentials = APIKeyCredentials(expires_at=None,)-revid_credentials = APIKeyCredentials(- id="fdb7f412-f519-48d1-9b5f-d2f73d0e01fe",- provider="revid",- api_key=SecretStr(settings.secrets.revid_api_key),- title="Use Credits for Revid",- expires_at=None,-)ideogram_credentials = APIKeyCredentials(id="760f84fc-b270-42de-91f6-08efe1b512d0",provider="ideogram",@@ -258,7 +251,6 @@ elevenlabs_credentials = APIKeyCredentials(DEFAULT_CREDENTIALS = [ollama_credentials,- revid_credentials,ideogram_credentials,replicate_credentials,openai_credentials,@@ -370,8 +362,6 @@ class IntegrationCredentialsStore:all_credentials.append(ollama_credentials)# These will only be added if the API key is set- if settings.secrets.revid_api_key:- all_credentials.append(revid_credentials)if settings.secrets.ideogram_api_key:all_credentials.append(ideogram_credentials)if settings.secrets.groq_api_key:diff --git a/autogpt_platform/backend/backend/util/settings.py b/autogpt_platform/backend/backend/util/settings.pyindex a48158c00b..1b86c5e60a 100644--- a/autogpt_platform/backend/backend/util/settings.py+++ b/autogpt_platform/backend/backend/util/settings.py@@ -749,7 +749,6 @@ class Secrets(UpdateTrackingModel["Secrets"], BaseSettings):medium_api_key: str = Field(default="", description="Medium API key")medium_author_id: str = Field(default="", description="Medium author ID")did_api_key: str = Field(default="", description="D-ID API Key")- revid_api_key: str = Field(default="", description="revid.ai API key")discord_bot_token: str = Field(default="", description="Discord bot token")autopilot_bot_discord_token: str = Field(default="",diff --git a/autogpt_platform/backend/migrations/20260708130000_clear_revid_builtin_credential_refs/migration.sql b/autogpt_platform/backend/migrations/20260708130000_clear_revid_builtin_credential_refs/migration.sqlnew file mode 100644index 0000000000..7d33834a29--- /dev/null+++ b/autogpt_platform/backend/migrations/20260708130000_clear_revid_builtin_credential_refs/migration.sql@@ -0,0 +1,27 @@+-- The built-in "Use Credits for Revid" credential+-- (id fdb7f412-f519-48d1-9b5f-d2f73d0e01fe) has been removed. Revid blocks now+-- require a user-provided API key. Clear every stale reference to it so+-- affected graphs/presets show an empty "select a credential" state instead of+-- a dead built-in reference.++-- 1) Saved graph definitions: blank the node's credentials selection. `{}` is+-- how the app itself represents a cleared node credential (input_default = {}).+UPDATE "AgentNode"+SET "constantInput" = JSONB_SET(+ "constantInput"::jsonb,+ '{credentials}',+ '{}'::jsonb+ )+WHERE "constantInput"::jsonb->'credentials'->>'id'+ = 'fdb7f412-f519-48d1-9b5f-d2f73d0e01fe';++-- 2) Preset input overrides only (agentPresetId IS NOT NULL — never execution+-- history). Each preset credential is its own AgentNodeExecutionInputOutput row+-- whose `data` IS the credential meta, read back via+-- CredentialsMetaInput.model_validate(). Blanking to `{}` would fail that+-- validation and break preset loading, so DELETE the stale row instead — the+-- preset then prompts for a user-provided key.+DELETE FROM "AgentNodeExecutionInputOutput"+WHERE "agentPresetId" IS NOT NULL+ AND "data"::jsonb->>'id' = 'fdb7f412-f519-48d1-9b5f-d2f73d0e01fe'+ AND "data"::jsonb->>'provider' = 'revid';diff --git a/autogpt_platform/frontend/src/app/(platform)/profile/(user)/integrations/page.tsx b/autogpt_platform/frontend/src/app/(platform)/profile/(user)/integrations/page.tsxindex 5fabc44b56..bde831c535 100644--- a/autogpt_platform/frontend/src/app/(platform)/profile/(user)/integrations/page.tsx+++ b/autogpt_platform/frontend/src/app/(platform)/profile/(user)/integrations/page.tsx@@ -95,7 +95,6 @@ export default function UserIntegrationsPage() {const hiddenCredentials = useMemo(() => ["744fdc56-071a-4761-b5a5-0af0ce10a2b5", // Ollama- "fdb7f412-f519-48d1-9b5f-d2f73d0e01fe", // Revid"760f84fc-b270-42de-91f6-08efe1b512d0", // Ideogram"6b9fc200-4726-4973-86c9-cd526f5ce5db", // Replicate"53c25cb8-e3ee-465c-a4d1-e75a4c899c2a", // OpenAI