📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

ti fs update-file-system-extract-configuration



Updates optional image, audio, or video extraction configuration for one Filesystem. Enabling or replacing a provider performs a real provider validation request that can incur a small provider charge. After enablement, Filesystem media is sent to the selected provider for extraction.

Syntax

ti fs update-file-system-extract-configuration --file-system-id <string> --media-type <string> [--dry-run] [--enabled <boolean>] [--help] [--prompt <string>] [--provider-api-base <string>] [--provider-model <string>] [--provider-protocol <string>] [--version]

Options

  • --file-system-id <string>: Set the immutable Filesystem ID. [required]
  • --media-type <string>: Select image, audio, or video. [required]
  • --dry-run: Validate the request without contacting the Filesystem backend or AI provider.
  • --enabled <boolean>: Explicitly enable or disable extraction. Enter true or false.
  • --prompt <string>: Set a prompt of at most 8 KiB. Pass an empty string to restore backend default prompt behavior.
  • --provider-api-base <string>: Set a valid HTTPS provider base URL.
  • --provider-model <string>: Set the provider model name.
  • --provider-protocol <string>: Set openai, or qwen-asr for audio only. The default is openai.
  • --help: Display help information.
  • --version: Display version information.

For options shared by all commands, see Global options.

The provider API key is accepted only from TI_FS_AI_PROVIDER_API_KEY. It is sent to the Filesystem backend for validation and encrypted storage, is never stored locally by ti, and is returned only in masked form. openai supports image, audio, and video. Alibaba Cloud Model Studio Qwen ASR is supported for audio through qwen-asr. Other services work only when they implement the exact required OpenAI-compatible contract. Native Anthropic, Gemini, Vertex AI, Bedrock, and Azure OpenAI interfaces are not supported.

Do not retry an update blindly after a timeout or lost response. The provider might already have charged for validation and the backend might have saved the configuration. Run the matching describe command first.

Before enabling a provider in an interactive shell, read and export its API key without placing it in shell history:

printf 'Provider API key: ' >&2 read -r -s TI_FS_AI_PROVIDER_API_KEY printf '\n' >&2 export TI_FS_AI_PROVIDER_API_KEY

In CI, inject TI_FS_AI_PROVIDER_API_KEY from a masked secret. Unset the variable after the command finishes.

Examples

  • Enable image extraction with an OpenAI-compatible provider:

    # Configure extraction using the provider key from TI_FS_AI_PROVIDER_API_KEY. ti fs update-file-system-extract-configuration \ --file-system-id <file-system-id> \ --media-type image \ --enabled true \ --provider-api-base https://api.openai.com/v1 \ --provider-model <vision-model>
  • Enable Alibaba Cloud Model Studio Qwen ASR for audio:

    # Use the DashScope OpenAI-compatible endpoint with the qwen-asr protocol. ti fs update-file-system-extract-configuration \ --file-system-id <file-system-id> \ --media-type audio \ --enabled true \ --provider-api-base https://dashscope.aliyuncs.com/compatible-mode/v1 \ --provider-model qwen3-asr-flash \ --provider-protocol qwen-asr
  • Change only the prompt of an enabled image configuration:

    # Keep the existing provider credentials and update only extraction instructions. ti fs update-file-system-extract-configuration \ --file-system-id <file-system-id> \ --media-type image \ --prompt "Describe the image and return searchable attributes."
  • Disable image extraction:

    # Remove the custom image provider configuration without changing normal file access. ti fs update-file-system-extract-configuration \ --file-system-id <file-system-id> \ --media-type image \ --enabled false

Was this page helpful?