tramai-spring-boot-starter-local-provider-openai
Version: 0.6.0
Status: Preview
Role: Local (non-egress) provider starter for development, smoke tests and offline labs.
Purpose
This starter registers an OpenAI-compatible ModelProvider pointing at a local endpoint — Ollama, llama.cpp, vLLM or any OpenAI-compatible server on the machine — from a single YAML entry. It exists so a sovereign or offline deployment can run real inference without adding a cloud provider adapter.
It is deliberately narrow: only the local-lab-provider entry with type: openai triggers bean creation. Any other key, or a different type, is skipped silently.
What it provides
| Component | Detail |
|---|---|
OpenAiCompatibleProviderAutoConfiguration | Registered through META-INF/spring/...AutoConfiguration.imports |
TramaiProviderProperties | Binds tramai.providers.* entries (type, base-url, api-key, model) |
localLabModelProvider bean | An OpenAiCompatibleProvider with provider name local-lab-provider |
Behavior:
tramai.providers.local-lab-provider.base-urlis required; without it startup fails.api-keyfalls back tolocal-dev, which is enough for servers that do not check credentials.- The bean is
@ConditionalOnMissingBean(name = "localLabModelProvider"), so your own bean wins.
Dependencies
dependencies {
implementation(platform("dev.tramai:tramai-bom:0.6.0"))
implementation("dev.tramai:tramai-spring-boot-starter")
implementation("dev.tramai:tramai-spring-boot-starter-local-provider-openai")
}
tramai:
profile: sovereign
providers:
local-lab-provider:
type: openai
base-url: http://localhost:11434/v1
api-key: local-dev
model: qwen2.5:7b
sovereign:
allowed-models: [local-lab-model]
allowed-providers: [local-lab-provider]
provider-zones:
local-lab-provider: LOCAL
models:
local-lab-model: local-lab-provider
When to use this starter
- You want a real model on the loopback interface while developing or running an offline lab.
- You are exercising the sovereign runtime against a local OpenAI-compatible server.
- You need a provider that cannot accidentally reach the public internet.
When NOT to use this starter
- Production traffic — pin the provider you actually run against, through tramai-spring-provider-openai or tramai-spring-provider-ollama.
- You need more than one property-configured provider: only
local-lab-provideris wired by this starter (v1 scope), so additional providers need their own adapter module or bean. - You expect it to enforce no-egress guarantees: it points at a local URL, but network isolation is an infrastructure concern.
