Skip to content

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 profiles lists built-in and custom profiles
  • openmed config profile-show <name> prints the stored profile values
  • openmed config profile-use <name> merges the profile into the saved config file
  • openmed 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:

openmed config profile-use myprofile
openmed config profile-delete myprofile

Built-in profiles cannot be overwritten or deleted.

Storage

Custom profiles are stored as TOML files under:

~/.config/openmed/profiles/<name>.toml

Environment variable

You can also set:

export OPENMED_PROFILE=prod

That sets the active profile name inside the config layer.

Resolution precedence

When multiple sources set the same value, higher sources win:

  1. Built-in defaults
  2. Environment variables (OPENMED_PROFILE, OPENMED_LOG_LEVEL, etc.)
  3. Config file (~/.config/openmed/config.toml)
  4. Active profile (merged on top of config)
  5. 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.