fix: remove process.env fallbacks — Sanity is single source of truth#618
Merged
codercatdev merged 3 commits intodevfrom Mar 5, 2026
Merged
fix: remove process.env fallbacks — Sanity is single source of truth#618codercatdev merged 3 commits intodevfrom
codercatdev merged 3 commits intodevfrom
Conversation
…for immediate invalidation
Prod release
…Sanity schema descriptions Task 1: Remove redundant env var fallbacks — Sanity is now the single source of truth - lib/services/elevenlabs.ts: remove process.env.ELEVENLABS_VOICE_ID fallback - lib/services/remotion.ts: remove REMOTION_AWS_REGION, REMOTION_SERVE_URL, REMOTION_FUNCTION_NAME fallbacks - lib/services/gcs.ts: remove GCS_BUCKET, GCS_PROJECT_ID fallbacks - lib/gemini.ts: replace process.env.GEMINI_MODEL with getConfigValue (make generateWithGemini async-aware) - lib/sponsor/gemini-intent.ts: replace process.env.GEMINI_MODEL with getConfigValue - lib/youtube-upload.ts: replace process.env.YOUTUBE_UPLOAD_VISIBILITY with getConfigValue Task 2: Add clear description fields to all Sanity config schemas - pipelineConfig, remotionConfig, contentConfig, sponsorConfig, distributionConfig, gcsConfig
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
codercatdev
added a commit
that referenced
this pull request
Mar 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes redundant
process.env.Xfallbacks fromgetConfigValue()calls across the codebase. Sanity config singletons are now the single source of truth for all runtime configuration — env vars are only used for secrets/credentials (API keys, private keys, etc.).Also adds clear
descriptionfields to all 6 Sanity config schemas so editors understand what each value does.Task 1: Remove env var fallbacks (9 env vars across 6 files)
lib/services/elevenlabs.tsELEVENLABS_VOICE_IDgetConfigValue("pipeline_config", "elevenLabsVoiceId", "pNInz6obpgDQGcFmaJgB")lib/services/remotion.tsREMOTION_AWS_REGIONgetConfigValue("remotion_config", "awsRegion", "us-east-1")lib/services/remotion.tsREMOTION_SERVE_URLgetConfigValue("remotion_config", "serveUrl", undefined)lib/services/remotion.tsREMOTION_FUNCTION_NAMEgetConfigValue("remotion_config", "functionName", "remotion-render-4-0-431-mem2048mb-disk2048mb-240sec")lib/services/gcs.tsGCS_BUCKETgetConfigValue("gcs_config", "bucketName", "codingcatdev-content-engine")lib/services/gcs.tsGCS_PROJECT_IDgetConfigValue("gcs_config", "projectId", "codingcatdev")lib/gemini.tsGEMINI_MODELgetConfigValue("pipeline_config", "geminiModel", "gemini-2.0-flash")lib/sponsor/gemini-intent.tsGEMINI_MODELgetConfigValue("pipeline_config", "geminiModel", "gemini-2.0-flash")lib/youtube-upload.tsYOUTUBE_UPLOAD_VISIBILITYgetConfigValue("pipeline_config", "youtubeUploadVisibility", "private")Notable changes:
lib/gemini.ts:generateWithGemini()was already async — movedprocess.env.GEMINI_MODELinside the function body and replaced withgetConfigValue()calllib/youtube-upload.ts:getDefaultPrivacyStatus()converted from sync to async, callers updated withawaitlib/services/remotion.ts: Updated error messages to reference Sanity config instead of env varslib/services/remotion-deploy.ts: NOT touched — deploy helpers use env vars directly (not getConfigValue)Task 2: Sanity schema descriptions (6 files, 30+ fields)
Added
descriptionfields to every config field across all 6 singleton schemas:pipelineConfig.ts— 8 fieldsremotionConfig.ts— 6 fieldscontentConfig.ts— 6 fieldssponsorConfig.ts— 4 fieldsdistributionConfig.ts— 4 fieldsgcsConfig.ts— 2 fieldsWhat stays as env vars (secrets only)
These are NOT managed in Sanity (they're secrets):
ELEVENLABS_API_KEY,GEMINI_API_KEYAWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEYGCS_CLIENT_EMAIL,GCS_PRIVATE_KEYYOUTUBE_CLIENT_ID,YOUTUBE_CLIENT_SECRET,YOUTUBE_REFRESH_TOKENCRON_SECRET,NOTEBOOKLM_AUTH_JSONTesting