Skip to content

Restricted Mode

Overview

Restricted Mode is designed for deployment to serverless environments (such as Cloudflare) and for use on demo terminals. It disables write operations to ensure safe operation in environments where filesystem writes are not available, and substitutes read operations with static manifest data.

Environment Variables:

bash
# Enable/disable restricted mode (true/false)
NEXT_PUBLIC_RESTRICTED_MODE="false"

TIP

When deploying to Cloudflare, this is automatically set to true by the build script.

Available Features

The following features work normally even in restricted mode.

  • AI Chat: Conversations with all AI providers (OpenAI, Anthropic, Google, etc.)
  • Text-to-Speech (TTS): All TTS engines (VOICEVOX, ElevenLabs, Google TTS, etc.)
  • Speech Input (STT): Browser speech recognition, Whisper
  • Character Display: VRM, Live2D, PNGTuber display and animation
  • Character Selection: VRM/Live2D/PNGTuber model selection from presets
  • Background Selection: Background image selection from presets
  • Slide Playback: Browsing and playing preset slides
  • YouTube Integration: YouTube comment retrieval and streaming
  • Realtime API: Real-time conversation via OpenAI Realtime API
  • Settings Persistence: Saving settings to browser local storage
  • Theme Change: Color theme switching

Restricted Features

Basic Settings

FeatureRestriction
Background image uploadUpload button disabled
Background image selectionOnly preset images selectable (upload not available)

Character Settings

FeatureRestriction
VRM file upload"Open VRM" button disabled

INFO

VRM, Live2D, and PNGTuber model selection is available. You can choose from models registered as presets.

Voice Settings

FeatureRestriction
VOICEVOX speaker list updateUpdate button disabled
AivisSpeech speaker list updateUpdate button disabled

Slide Settings

FeatureRestriction
Slide conversion (PDF to slides)Conversion UI hidden
Slide editorText area, save, and undo buttons disabled

INFO

Slide selection, browsing, and playback are available. You can select from slide folders registered as presets.

Image Settings

FeatureRestriction
Image uploadUpload button disabled
Image deletionDelete button disabled

Memory Settings

FeatureRestriction
Memory data backup file selectionFile selection button disabled
Memory data restorationRestore button disabled

Other Settings

FeatureRestriction
Accept external instructions (Message Receiver)Toggle disabled, API and polling also stopped
External linkage mode (WebSocket)Toggle disabled, WebSocket connection also stopped

Pose Features

FeatureRestriction
Pose Y-axis rotation adjustment and saveAdjustment panel hidden

Technical Details

Read APIs

In restricted mode, since the filesystem is not accessible, the following APIs return responses from static manifest data (assetManifest.json). Because they return valid data, model and slide selection works without issues.

APIReturned Data
/api/get-vrm-listVRM model list
/api/get-background-listBackground image list
/api/get-live2d-listLive2D model list
/api/get-pngtuber-listPNGTuber model list
/api/get-pose-listPose list
/api/getSlideFoldersSlide folder list
/api/getSupplementSlide supplementary information
/api/convertMarkdownSlide HTML/CSS
/api/get-image-listImage list

Write APIs

The following APIs return 403 errors in restricted mode. Since the corresponding UI buttons and toggles are also disabled, you will not encounter these errors during normal operation.

APIOperation
/api/upload-vrm-listVRM file upload
/api/upload-backgroundBackground image upload
/api/upload-imageImage upload
/api/delete-imageImage deletion
/api/convertSlidePDF to slide conversion
/api/updateSlideDataSlide data update
/api/update-pose-rotationPose rotation save
/api/update-aivis-speakersAivisSpeech speaker update
/api/update-voicevox-speakersVOICEVOX speaker update
/api/save-chat-logChat log save
/api/messagesMessage send/receive (Message Receiver)

Customizing Preset Data

Preset data available in restricted mode is managed in src/constants/assetManifest.json. By editing this file before deployment, you can customize the models and background images available for selection in restricted mode.

json
{
  "vrm": ["model1.vrm", "model2.vrm"],
  "backgrounds": ["bg-1.png"],
  "live2d": [{ "path": "/live2d/model/model.model3.json", "name": "model", ... }],
  "pngtuber": [{ "path": "/pngtuber/model", "name": "model", ... }],
  "poses": [{ "name": "wave", "path": "/poses/wave.json" }],
  "slides": { "folders": ["demo"], ... }
}

TIP

You also need to place the corresponding asset files under public/.

This documentation corresponds tov2.42.0