Configuration Profiles¶
Profiles are named config presets for the core OpenMed config file. Today they mainly cover low-level settings such as log_level, timeout, and use_medical_tokenizer.
They are not a separate auth system, model catalog, or MCP profile mechanism.
Built-in profiles¶
| Profile | log_level |
timeout |
use_medical_tokenizer |
Intended use |
|---|---|---|---|---|
dev |
DEBUG |
600 |
true |
Development and debugging |
prod |
WARNING |
300 |
true |
Production-style defaults |
test |
DEBUG |
60 |
false |
Tests and CI |
fast |
WARNING |
120 |
false |
Faster local experiments |
Inspect and apply profiles¶
openmed config profiles
openmed config profile-show dev
openmed config profile-use prod
openmed config show --profile fast
Behavior:
openmed config profileslists built-in and custom profilesopenmed config profile-show <name>prints the stored profile valuesopenmed config profile-use <name>merges the profile into the saved config fileopenmed config show --profile <name>previews the effective config without saving it
Custom profiles¶
Create one from the current config:
openmed config set log_level DEBUG
openmed config set timeout 900
openmed config profile-save myprofile
Use or delete it later:
Built-in profiles cannot be overwritten or deleted.
Storage¶
Custom profiles are stored as TOML files under:
Environment variable¶
You can also set:
That sets the active profile name inside the config layer.
Resolution precedence¶
When multiple sources set the same value, higher sources win:
- Built-in defaults
- Environment variables (
OPENMED_PROFILE,OPENMED_LOG_LEVEL, etc.) - Config file (
~/.config/openmed/config.toml) - Active profile (merged on top of config)
- CLI flags (
--model,--agent,--phi-mode, etc.)
Boundary notes¶
The current profile system is deliberately small in scope:
- profiles cover the config keys defined in
openmed.core.config - they do not replace model selection in the TUI
- they do not replace auth commands such as
openmed login - they do not bundle MCP server lists or native service endpoint packages by themselves
For environment variables and path details, see Configuration.