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:
@@ -141,7 +141,6 @@ func TestInMemoryStore_SaveSettings(t *testing.T) {
|
||||
store := NewInMemoryStore()
|
||||
|
||||
settings := &Settings{
|
||||
APIEndpoint: "http://example.com",
|
||||
ImageEditSelector: ".image-edit",
|
||||
ImageGenerationSelector: ".image-gen",
|
||||
TextGenerationSelector: ".text-gen",
|
||||
@@ -161,7 +160,6 @@ func TestInMemoryStore_GetSettings(t *testing.T) {
|
||||
|
||||
// Set some settings
|
||||
settings = &Settings{
|
||||
APIEndpoint: "http://example.com",
|
||||
ImageEditSelector: ".image-edit",
|
||||
ImageGenerationSelector: ".image-gen",
|
||||
TextGenerationSelector: ".text-gen",
|
||||
@@ -172,5 +170,5 @@ func TestInMemoryStore_GetSettings(t *testing.T) {
|
||||
// Get the settings
|
||||
settings, err = store.GetSettings()
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, "http://example.com", settings.APIEndpoint)
|
||||
assert.Equal(t, ".image-edit", settings.ImageEditSelector)
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@ var _ Store = (*FileStore)(nil)
|
||||
|
||||
// Settings represents the application settings
|
||||
type Settings struct {
|
||||
APIEndpoint string `json:"api_endpoint,omitempty"`
|
||||
ImageEditSelector string `json:"image_edit_selector,omitempty"`
|
||||
ImageGenerationSelector string `json:"image_generation_selector,omitempty"`
|
||||
TextGenerationSelector string `json:"text_generation_selector,omitempty"`
|
||||
|
||||
@@ -209,7 +209,6 @@ func TestFileStore_SaveSettings(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
|
||||
settings := &Settings{
|
||||
APIEndpoint: "http://example.com",
|
||||
ImageEditSelector: ".image-edit",
|
||||
ImageGenerationSelector: ".image-gen",
|
||||
TextGenerationSelector: ".text-gen",
|
||||
@@ -237,7 +236,6 @@ func TestFileStore_GetSettings(t *testing.T) {
|
||||
|
||||
// Set some settings
|
||||
settings = &Settings{
|
||||
APIEndpoint: "http://example.com",
|
||||
ImageEditSelector: ".image-edit",
|
||||
ImageGenerationSelector: ".image-gen",
|
||||
TextGenerationSelector: ".text-gen",
|
||||
@@ -248,5 +246,5 @@ func TestFileStore_GetSettings(t *testing.T) {
|
||||
// Get the settings
|
||||
settings, err = store.GetSettings()
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, "http://example.com", settings.APIEndpoint)
|
||||
assert.Equal(t, ".image-edit", settings.ImageEditSelector)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user