Background
ModelConfig.OpenAISettings defines a baseUrl field, and OpenAIModelProvider (src/main/java/br/com/arquivolivre/myjavagenie/service/OpenAIModelProvider.java, ~line 57) already applies it (builder.baseUrl(...)). However, src/main/resources/application.yml does not define model.openai.base-url, so the only way to use a custom OpenAI-compatible endpoint with the OpenAI provider is the undocumented MODEL_OPENAI_BASE_URL env var via Spring relaxed binding.
Impact
- Users of OpenAI-compatible proxies/gateways (LM Studio, vLLM, OpenRouter, Ollama Cloud, etc.) cannot discover how to configure a custom base URL for the OpenAI provider.
- The config surface is incomplete relative to the code's capabilities.
- The self-hosted provider documents
base-url in YAML, but the OpenAI provider does not.
How to reproduce
- Set
model.provider: openai and point the app at an OpenAI-compatible endpoint.
- Search
application.yml and the README for base-url under the openai section — nothing documents it.
Where the fix should land
Add the missing property to src/main/resources/application.yml:
model:
openai:
api-key: ${OPENAI_API_KEY:}
base-url: ${OPENAI_BASE_URL:}
model-name: gpt-4
timeout-seconds: 300
Document the variable in the README configuration section.
Files touched
src/main/resources/application.yml
README.md
- Optionally
src/test/java/.../OpenAIModelProviderTest.java asserting the custom base URL is applied to the builder.
Acceptance criteria
Background
ModelConfig.OpenAISettingsdefines abaseUrlfield, andOpenAIModelProvider(src/main/java/br/com/arquivolivre/myjavagenie/service/OpenAIModelProvider.java, ~line 57) already applies it (builder.baseUrl(...)). However,src/main/resources/application.ymldoes not definemodel.openai.base-url, so the only way to use a custom OpenAI-compatible endpoint with the OpenAI provider is the undocumentedMODEL_OPENAI_BASE_URLenv var via Spring relaxed binding.Impact
base-urlin YAML, but the OpenAI provider does not.How to reproduce
model.provider: openaiand point the app at an OpenAI-compatible endpoint.application.ymland the README forbase-urlunder the openai section — nothing documents it.Where the fix should land
Add the missing property to
src/main/resources/application.yml:Document the variable in the README configuration section.
Files touched
src/main/resources/application.ymlREADME.mdsrc/test/java/.../OpenAIModelProviderTest.javaasserting the custom base URL is applied to the builder.Acceptance criteria
model.openai.base-url(and theOPENAI_BASE_URLenv var) is documented in YAML and README.model.provider: openaiand a custombase-url, requests are sent to that endpoint (verifiable via a WireMock test).base-urlset) is unchanged — falls back to the OpenAI default endpoint.