Context
PR #8248 registers Ollama, llama.cpp, LocalAI, vLLM, LM Studio and Red Hat AI Inference Server as chat-only providers in the agent selector dropdown, and flips on Groq / OpenRouter / Open WebUI which had been sitting unregistered. Each provider reads its own URL env var at startup (OLLAMA_URL, LLAMACPP_URL, LOCALAI_URL, VLLM_URL, LM_STUDIO_URL, RHAIIS_URL, GROQ_BASE_URL, OPENROUTER_BASE_URL, OPEN_WEBUI_URL).
Today operators must set those env vars in the shell that launches kc-agent. The Settings → API Keys modal lists the new providers but only lets the operator edit the API key, not the base URL.
What to do
Add an expandable "Advanced" section to each row in web/src/components/agent/APIKeySettings.tsx that:
- accepts a base URL override per provider
- writes the override to
~/.kc/config.yaml under a new agents[<provider>].baseURL field
- surfaces a "restart kc-agent to apply" hint on save
- validates that the URL is syntactically well formed
Backend changes:
- Extend
ConfigManager in pkg/agent/config.go with GetBaseURL(provider) and SetBaseURL(provider, url), mirroring GetAPIKey / SetAPIKey. Env-var precedence stays.
- The
LocalOpenAICompatProvider in pkg/agent/provider_local_openai_compat.go already resolves its URL at request time; extend localOpenAICompatBaseURL() to consult ConfigManager.GetBaseURL as a fallback between env var and compiled-in default.
- Extend
provider_groq.go, provider_openrouter.go, provider_openwebui.go similarly.
Acceptance
- User can configure
OLLAMA_URL=http://my-lan-server.local:11434 from the Settings modal without setting an env var.
- After saving, the restart hint is visible, and after restarting kc-agent, the dropdown shows Ollama as Available and chat works against the configured endpoint.
- Existing env var overrides still win if set.
- Existing APIKeySettings tests continue to pass, with new tests covering the Advanced expansion and base-URL field.
Relationship to #8248
PR #8248 is the registration + validation-URL fix. This issue is the UI polish that closes out the "operators must touch env vars" experience. The docs page at https://docs.kubestellar.io/console/local-llm-strategy/ already describes the env-var path as the working default.
Context
PR #8248 registers Ollama, llama.cpp, LocalAI, vLLM, LM Studio and Red Hat AI Inference Server as chat-only providers in the agent selector dropdown, and flips on Groq / OpenRouter / Open WebUI which had been sitting unregistered. Each provider reads its own URL env var at startup (
OLLAMA_URL,LLAMACPP_URL,LOCALAI_URL,VLLM_URL,LM_STUDIO_URL,RHAIIS_URL,GROQ_BASE_URL,OPENROUTER_BASE_URL,OPEN_WEBUI_URL).Today operators must set those env vars in the shell that launches kc-agent. The Settings → API Keys modal lists the new providers but only lets the operator edit the API key, not the base URL.
What to do
Add an expandable "Advanced" section to each row in
web/src/components/agent/APIKeySettings.tsxthat:~/.kc/config.yamlunder a newagents[<provider>].baseURLfieldBackend changes:
ConfigManagerinpkg/agent/config.gowithGetBaseURL(provider)andSetBaseURL(provider, url), mirroringGetAPIKey / SetAPIKey. Env-var precedence stays.LocalOpenAICompatProviderinpkg/agent/provider_local_openai_compat.goalready resolves its URL at request time; extendlocalOpenAICompatBaseURL()to consultConfigManager.GetBaseURLas a fallback between env var and compiled-in default.provider_groq.go,provider_openrouter.go,provider_openwebui.gosimilarly.Acceptance
OLLAMA_URL=http://my-lan-server.local:11434from the Settings modal without setting an env var.Relationship to #8248
PR #8248 is the registration + validation-URL fix. This issue is the UI polish that closes out the "operators must touch env vars" experience. The docs page at https://docs.kubestellar.io/console/local-llm-strategy/ already describes the env-var path as the working default.