Configuration Reference
This page documents the Spring Boot property surface that exists in TramAI 0.6.0. Every key below is bound by a @ConfigurationProperties class in the release; nothing is aspirational.
The Spring binding lives in tramai-spring-core (framework-level keys), the provider adapter modules (tramai-spring-provider-openai, tramai-spring-provider-anthropic, tramai-spring-provider-ollama), the secret backends (tramai-spring-secrets-file, -vault, -aws), and the sovereign modules (tramai-spring-sovereign, tramai-spring-boot-starter-sovereign-*).
tramai.profile
Selects the runtime profile. This is the sole runtime selector.
| Value | Runtime |
|---|---|
| (missing) | standard |
standard | standard |
sovereign | sovereign |
- Matching is case-insensitive.
- Any other value fails at startup with
Unsupported tramai.profile '<value>'. Supported values: standard, sovereign.There is never a silent fallback. - Exactly one runtime authority is active; standard and sovereign never coexist.
tramai.sovereign.enabled: falseis rejected at startup. The compatibility switch is retained but can only betrue(or absent); select the standard runtime withtramai.profile: standardinstead.
tramai:
profile: sovereign
Standard Runtime Keys
Bound by TramaiProperties (@ConfigurationProperties("tramai")):
| Key | Default | Meaning |
|---|---|---|
tramai.default-provider | null | Provider used when no model mapping applies |
tramai.models.<logical-model> | – | Maps a logical model name to a registered provider name |
tramai.fallbacks.<model>[].provider / .model | – | Ordered fallback routes for a requested model |
tramai.resilience.circuit-breaker.enabled | false | Engine-owned provider health protection |
tramai.resilience.circuit-breaker.failure-threshold | 3 | Failures before the route opens |
tramai.resilience.circuit-breaker.open-duration-millis | 30000 | How long an open route stays open |
tramai.resilience.retry.max-retry-after-millis | 30000 | Cap applied to provider-supplied Retry-After |
tramai.resilience.retry.jitter-ratio | 0.2 | Positive jitter added to scheduled retry delays |
tramai.cost.token-budget.hard-max-tokens-per-attempt | null | Fails a single provider attempt when reported usage exceeds it |
tramai.cost.token-budget.hard-max-tokens-per-operation | null | Fails a logical operation when cumulative reported usage exceeds it |
tramai.cost.token-budget.soft-max-tokens-per-operation | null | Emits an engine event without failing the call |
tramai.cache.in-memory.enabled | false | In-memory cache for cacheable non-streaming operations |
tramai.cache.in-memory.max-entries | 1000 | Cache capacity |
tramai.security.classification.enabled | false | Data-classification rules |
tramai.security.classification.default-classification | INTERNAL | Classification applied when no rule matches |
tramai.security.classification.max-text-length | 100000 | Text length considered for classification |
tramai.security.classification.rules[].id / .classification / .priority / .pattern / .metadata-equals | – | Declarative classification rules |
tramai.security.model-registry.enabled | false | Approved-model registry enforcement |
Provider names in models and in fallback routes must match registered provider names. A fallback route for a model requires an explicit primary route for that model; a duplicate primary route for the same model is a configuration error, not a silent replacement.
Provider Properties
Each Spring provider adapter binds its own namespace and registers a provider under the matching name.
OpenAI (tramai-spring-provider-openai)
| Key | Default | Meaning |
|---|---|---|
tramai.providers.openai.api-key | null | Static API key |
tramai.providers.openai.api-key-secret-ref | null | Secret reference resolved instead of api-key |
tramai.providers.openai.bearer-token | null | Explicit bearer token |
tramai.providers.openai.bearer-token-secret-ref | null | Secret reference for the bearer token |
tramai.providers.openai.base-url | https://api.openai.com/v1 | API base URL |
tramai.providers.openai.organization | null | Organization header |
tramai.providers.openai.project | null | Project header |
tramai.providers.openai.codex-auth.enabled | false | Experimental local Codex auth-file token source |
tramai.providers.openai.codex-auth.auth-file | null | Path to the Codex auth.json |
tramai:
providers:
openai:
api-key-secret-ref: env:OPENAI_API_KEY
base-url: https://api.openai.com/v1
OpenAI-compatible (tramai-spring-provider-openai)
Binds tramai.providers.openai-compatible.* with the same fields as OpenAI plus provider-name (default openai-compatible), and registers the provider under that name. base-url is required here — without it the adapter produces no provider. The same applies to tramai.providers.ollama.base-url.
tramai:
providers:
openai-compatible:
provider-name: compatible
bearer-token-secret-ref: env:COMPATIBLE_API_TOKEN
base-url: https://compatible.example.com/v1
Anthropic (tramai-spring-provider-anthropic)
tramai.providers.anthropic.api-key, .api-key-secret-ref, .base-url (default https://api.anthropic.com).
Ollama (tramai-spring-provider-ollama)
tramai.providers.ollama.base-url. The base URL is required for the adapter to produce a provider — without it, startup fails under sovereign validation with no provider available.
tramai:
providers:
ollama:
base-url: http://localhost:11434
Gemini, Bedrock, Azure OpenAI, and DeepSeek ship as standalone adapters. Register them as ModelProvider beans in Spring; there is no property namespace for them in 0.6.0. See Providers.
Secrets
| Key | Meaning |
|---|---|
tramai.secrets.file.allowed-directory | Directory that file: secret references are confined to |
tramai.secrets.vault.enabled | Enables the Vault resolver |
tramai.secrets.vault.base-url / .token / .token-secret-ref / .namespace / .mount-path / .kv-version / .default-field | Vault connection and read shape (mount-path default secret, kv-version default 2, default-field default value) |
tramai.secrets.aws-secrets-manager.enabled | Enables the AWS Secrets Manager resolver |
tramai.secrets.aws-secrets-manager.region / .endpoint / .access-key-id / .access-key-id-secret-ref / .secret-access-key / .secret-access-key-secret-ref / .session-token / .session-token-secret-ref / .default-field | AWS connection and read shape |
Reference schemes resolved by the bundled resolvers:
| Scheme | Resolver |
|---|---|
env:NAME | Environment variable (always available) |
file:path | Local file; requires tramai.secrets.file.allowed-directory, and paths outside it are rejected |
vault:path#field | Requires tramai-spring-secrets-vault + tramai.secrets.vault.* |
aws-secretsmanager:secret-id#field | Requires tramai-spring-secrets-aws + tramai.secrets.aws-secrets-manager.* |
A field cannot be configured with a direct value and its *-secret-ref at the same time — that combination fails fast, as does a reference no resolver can resolve.
Complete Standard Example
tramai:
profile: standard
default-provider: openai
models:
gpt-4o: openai
gpt-4o-mini: openai
claude-sonnet-4-20250514: anthropic
llama3.2: ollama
fallbacks:
gpt-4o:
- provider: openai
model: gpt-4o-mini
- provider: ollama
model: llama3.2
resilience:
circuit-breaker:
enabled: true
failure-threshold: 3
open-duration-millis: 30000
retry:
max-retry-after-millis: 20000
jitter-ratio: 0.1
cost:
token-budget:
hard-max-tokens-per-attempt: 4000
hard-max-tokens-per-operation: 12000
soft-max-tokens-per-operation: 8000
cache:
in-memory:
enabled: true
max-entries: 1000
security:
classification:
enabled: false
default-classification: INTERNAL
max-text-length: 100000
model-registry:
enabled: false
secrets:
file:
allowed-directory: /etc/tramai/secrets
vault:
enabled: false
base-url: https://vault.example.com
token-secret-ref: env:VAULT_TOKEN
mount-path: secret
kv-version: 2
default-field: value
aws-secrets-manager:
enabled: false
region: eu-west-1
access-key-id-secret-ref: env:AWS_ACCESS_KEY_ID
secret-access-key-secret-ref: env:AWS_SECRET_ACCESS_KEY
default-field: value
providers:
openai:
api-key-secret-ref: env:OPENAI_API_KEY
base-url: https://api.openai.com/v1
openai-compatible:
provider-name: compatible
bearer-token-secret-ref: env:COMPATIBLE_API_TOKEN
base-url: https://compatible.example.com/v1
anthropic:
api-key-secret-ref: env:ANTHROPIC_API_KEY
base-url: https://api.anthropic.com
ollama:
base-url: http://localhost:11434
Sovereign Runtime
The sovereign runtime is selected with tramai.profile: sovereign and configured under tramai.sovereign.*. The allowlists are mandatory: missing allowed models, missing allowed providers, a provider without a trust zone, a model without a route, or a route that points at a non-allowed provider all fail startup.
| Key | Meaning |
|---|---|
tramai.sovereign.enabled | Compatibility switch; may only be true |
tramai.sovereign.allowed-models | Models whose invocation is permitted; each must appear as a key in models |
tramai.sovereign.allowed-providers | Providers that may be used; each must have a provider-zones entry |
tramai.sovereign.allowed-tools | Tools whose execution is permitted |
tramai.sovereign.allowed-permissions | Tool permissions that are granted |
tramai.sovereign.provider-zones.<provider> | Trust zone: LOCAL, EU_CLOUD, or GLOBAL_CLOUD |
tramai.sovereign.models.<logical-model> | Provider route for each allowed model |
tramai:
profile: sovereign
providers:
ollama:
base-url: http://localhost:11434
sovereign:
allowed-models:
- llama3.2
allowed-providers:
- ollama
allowed-tools:
- schedule-payment
allowed-permissions:
- payment.schedule
provider-zones:
ollama: LOCAL
models:
llama3.2: ollama
Sovereign Persistence
tramai-spring-boot-starter-sovereign-persistence-file and -jdbc bind the same prefix:
| Key | Meaning |
|---|---|
tramai.sovereign.persistence.type | memory (default), file, or jdbc |
tramai.sovereign.persistence.base-dir | Base directory for the file-backed store |
tramai.sovereign.persistence.jdbc.claim-lease-duration | Claim lease duration (default 5m) |
tramai.sovereign.persistence.jdbc.max-claim-limit | Maximum claims per poll (default 500) |
tramai.sovereign.persistence.encryption.key-env | Environment variable holding the base64 256-bit key |
tramai.sovereign.persistence.encryption.key-file | File holding the key |
tramai.sovereign.persistence.encryption.key-id | Key identifier (default default) |
tramai:
sovereign:
persistence:
type: file
base-dir: ./data/tramai-sovereign
encryption:
key-env: TRAMAI_SOVEREIGN_STORE_KEY
Sovereign Ops
Bound by tramai-spring-boot-starter-sovereign-ops (the worker-status endpoint property is owned by tramai-spring-boot-starter-sovereign-ops-actuator):
| Key | Meaning |
|---|---|
tramai.sovereign.ops.enabled | Enables the ops surfaces (default true) |
tramai.sovereign.ops.mutations-enabled | Allows administrative mutations such as denying an approval (default false) |
tramai.sovereign.ops.max-page-size | Page size cap (default 100) |
tramai.sovereign.ops.outbox.worker.* | Audit outbox worker: enabled, initial-delay, interval, batch-size, recover-prepared, dispatch-pending, fail-on-missing-dispatcher, lease-enabled, lease-name, worker-id, lease-duration, lease-heartbeat-interval |
tramai.sovereign.ops.approved-resume-worker.* | Approved-continuation resume worker: enabled, lifecycle-enabled, worker-id, batch-size, interval, lease-duration, lease-heartbeat-interval, retry-delay, conflict-retry-delay |
tramai.sovereign.ops.actuator.worker-status.enabled | Actuator worker status endpoint (default false) |
tramai:
sovereign:
ops:
outbox:
worker:
enabled: true
lease-enabled: true
approved-resume-worker:
enabled: true
What Is Not Configurable In 0.6.0
These do not exist as properties, in either profile:
- provider-level timeout or retry-policy configuration — timeouts and retries are per operation via
@Operation(timeoutMillis = ..., providerRetries = ...) - framework-level default max tokens or temperature
- streaming configuration — streaming is inferred from the return type
- preflight token estimation before a provider call is sent
