refactor!: move LLM configuration from in-app settings to CLI/env vars

- Remove `api_endpoint` from Settings model and settings UI
- Add `--llm-endpoint` / `AETHERA_LLM_ENDPOINT` and `--llm-key` /
  `AETHERA_LLM_KEY` CLI flags (endpoint is required)
- Update client constructor to accept API key parameter
- Update tests and documentation to reflect new configuration approach

BREAKING CHANGE: LLM endpoint and key must now be provided via
`AETHERA_LLM_ENDPOINT` and `AETHERA_LLM_KEY` environment variables or
CLI flags instead of the Settings page.
This commit is contained in:
2026-05-01 23:30:34 -04:00
parent 54e24cb304
commit 74b8d43032
13 changed files with 47 additions and 71 deletions

View File

@@ -15,6 +15,8 @@ type cliParams struct {
DataDir string
StaticDir string
SettingsFile string
LLMEndpoint string
LLMKey string
}
// getEnvOrDefault returns the value of an environment variable or a default value
@@ -36,6 +38,11 @@ func getEnvIntOrDefault(key string, defaultValue int) int {
}
func (p *cliParams) Validate() error {
// Require LLM Configuration
if p.LLMEndpoint == "" {
return fmt.Errorf("LLM endpoint is required (set AETHERA_LLM_ENDPOINT)")
}
// Ensure Generated Directories
imgDir := path.Join(p.DataDir, "generated/images")
if err := os.MkdirAll(imgDir, 0755); err != nil {