Bridgex stores exactly one configuration file on disk:Documentation Index
Fetch the complete documentation index at: https://mintlify.com/dev2forge/bridgex/llms.txt
Use this file to discover all available pages before exploring further.
llm_settings.json. This file holds the LLM provider credentials that Bridgex needs to generate text descriptions for JPEG images. All other aspects of the application — window size, last opened file, editor state, and theme — are not persisted between sessions. The sections below document the file’s location on each platform, its JSON schema, what each field controls, and how Bridgex reads and writes it at runtime.
File location
Theconfig_path() function in llm_config.rs resolves the configuration file location using a priority chain of environment variables:
- Windows
- Linux and macOS
- Fallback
On Windows, Bridgex reads the Example resolved path:
APPDATA environment variable (typically C:\Users\<username>\AppData\Roaming) and stores the file at:Bridgex creates any missing parent directories automatically via
fs::create_dir_all when saving the configuration for the first time. You do not need to create the Bridgex or bridgex directory manually.File format
llm_settings.json is a UTF-8 JSON object with three string fields. Bridgex uses serde_json::to_string_pretty when writing, so the file is human-readable and easy to edit manually.
If the file does not exist or cannot be parsed,
LLMConfig::load() silently returns the Default implementation, which sets all three fields to empty strings. Bridgex will function normally for all non-image conversions in this state.Field reference
llm_api_key
| Property | Value |
|---|---|
| Type | string |
| Required | No — an empty string disables LLM for image conversion |
| Example | "sk-proj-abc123..." |
OPENAI_API_KEY, GEMINI_API_KEY, or DEEPSEEK_API_KEY depending on llm_client. It is stored in plain text on disk; treat this file like any other credential file and restrict its permissions on shared systems.
llm_client
| Property | Value |
|---|---|
| Type | string |
| Required | No — an empty string disables LLM |
| Valid values | "openai", "gemini", "deepseek" |
| Example | "openai" |
converter.rs matches this value with a match statement to determine which environment variable to set and which API endpoint Markitdown-rs contacts. Any value that does not match the three recognised strings is silently ignored and LLM features are disabled for that conversion.
llm_model
| Property | Value |
|---|---|
| Type | string |
| Required | No — an empty string disables LLM |
| Example | "gpt-4o", "gemini-2.0-flash" |
ConversionOptions::llm_model. Bridgex does not validate this string; any value accepted by the chosen provider’s API can be used. Common examples by provider:
- OpenAI
- Gemini
- DeepSeek
How Bridgex uses the configuration
Load at startup
app() calls LLMConfig::load() once when the application starts. The three fields are placed into Freya use_state hooks (llm_api_key, llm_client, llm_model) that drive the rest of the UI.Edit via the LLM Settings popup
Opening Help → LLM API Key (or
Ctrl+K / ⌘+K) displays the LLM Settings popup. The text fields in the popup are bound directly to the three state values.Save when the user clicks Done
When the user confirms the popup, the
save_llm_config closure constructs a new LLMConfig from the current state values and calls config.save(), which serialises the struct to JSON and writes it to the platform-appropriate path.What is not persisted
Manual editing
You can editllm_settings.json directly with any text editor while Bridgex is not running. Bridgex reads the file only at startup, so changes made while the application is open will not take effect until you restart.