Bridgex integrates with large language model providers to generate natural-language descriptions of JPEG images during conversion. When you open aDocumentation 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.
.jpg or .jpeg file with a configured LLM, the AI-generated description is appended to the Markdown output automatically — no extra steps required beyond setting up your API key once. This page explains exactly what the LLM integration does, which providers and models are supported, how to configure it, and where the settings are stored on disk.
What the LLM Integration Does
LLM integration in Bridgex is used exclusively for JPEG image files (
.jpg / .jpeg). Opening any other file format — Excel, Word, PDF, HTML, CSV, PowerPoint, ZIP, or RSS/XML — does not trigger any LLM call, regardless of your configuration.converter.rs works as follows:
- Markitdown-rs performs its standard JPEG conversion (typically minimal text output).
- If the result does not already contain a
# Description:heading, Bridgex synchronously calls the configured LLM provider to generate a description of the image (the call blocks until a response is received or the request fails). - The description is appended to the editor content under the heading
# Description:.
Supported Providers and Models
Bridgex supports three LLM providers. Each has a set of suggested models available as quick-select buttons in the LLM Settings popup, but the model field accepts any free-text string — you can enter any model identifier your provider supports.- OpenAI
- Gemini
- Deepseek
Provider key:
openaiEnvironment variable set: OPENAI_API_KEYSuggested models:gpt-4ogpt-4o-minigpt-3.5-turbo
gpt-4-turbo) can be entered manually in the model field.Environment Variables
When a JPEG conversion with LLM is triggered, Bridgex sets the appropriate environment variable for the active provider at runtime from the saved configuration. You do not need to set these manually in your shell — Bridgex handles it:| Provider | Environment variable |
|---|---|
| OpenAI | OPENAI_API_KEY |
| Gemini | GEMINI_API_KEY |
| Deepseek | DEEPSEEK_API_KEY |
How to Configure LLM Settings
Open LLM Settings
Press
Ctrl+K or go to Help → LLM API Key in the menu bar. The LLM Settings popup opens with the API key input auto-focused.Enter your API key
Type or paste your API key into the API Key text field. The placeholder text shows the names of the relevant environment variables (
OPENAI_API_KEY, GEMINI_API_KEY, DEEPSEEK_API_KEY) as a reminder.Select a provider
Click one of the three provider buttons: OpenAI, Gemini, or Deepseek. When you switch providers, the model field is automatically updated to the first suggested model for that provider if your current model string is not in that provider’s suggested list.
Choose or enter a model
Either click one of the suggested model quick-select buttons to fill the model field, or type a model name directly into the free-text Model input. The model field accepts any valid provider model string.
Configuration File
Bridgex persists your LLM settings in a JSON file on disk. The file is read at startup and updated each time you click Done in the LLM Settings popup. File location:- Windows
- Linux / macOS
C:\Users\<username>\AppData\Roaming\Bridgex\llm_settings.json.APPDATA (Windows) nor HOME (Linux/macOS) environment variables are set, Bridgex falls back to writing llm_settings.json in the current working directory.
File format:
| Field | Type | Description |
|---|---|---|
llm_api_key | string | Your API key for the selected provider |
llm_client | string | Provider identifier: "openai", "gemini", or "deepseek" |
llm_model | string | Model name string, e.g. "gpt-4o" or "gemini-2.0-flash" |
Error Handling
LLM Scope Reminder
To be explicit: the LLM setting has no effect on any non-JPEG file. Theconvert_from_path() function checks the file extension and only enables LLM mode when:
- The extension is
.jpgor.jpeg(.jpegis normalised to.jpginternally). - The
llm_api_keyfield is non-empty after trimming whitespace. - Both
llm_clientandllm_modelare set and non-empty.