Update CHANGELOG: Document runtime config bug fix
Browse files- CHANGELOG.md +23 -0
CHANGELOG.md
CHANGED
|
@@ -167,6 +167,29 @@
|
|
| 167 |
- ✅ No syntax errors in app.py
|
| 168 |
- ✅ UI components properly connected to function parameters
|
| 169 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 170 |
### Created Files
|
| 171 |
|
| 172 |
### Deleted Files
|
|
|
|
| 167 |
- ✅ No syntax errors in app.py
|
| 168 |
- ✅ UI components properly connected to function parameters
|
| 169 |
|
| 170 |
+
### [BUGFIX: UI Selection Not Applied - Runtime Config Reading]
|
| 171 |
+
|
| 172 |
+
**Problem:** UI dropdown selections weren't being applied. Selected "HuggingFace" but system still used "Gemini". Root cause: LLM_PROVIDER and ENABLE_LLM_FALLBACK were read at module import time, before UI could set environment variables.
|
| 173 |
+
|
| 174 |
+
**Modified Files:**
|
| 175 |
+
|
| 176 |
+
- **src/agent/llm_client.py** (~5 lines modified)
|
| 177 |
+
- Removed module-level constants `LLM_PROVIDER` and `ENABLE_LLM_FALLBACK` (line 48-50)
|
| 178 |
+
- Updated `_call_with_fallback()` to read config at runtime (lines 173-175)
|
| 179 |
+
- Now calls `os.getenv("LLM_PROVIDER", "gemini")` on every function call
|
| 180 |
+
- Now calls `os.getenv("ENABLE_LLM_FALLBACK", "false")` on every function call
|
| 181 |
+
- Changed variable references from constants to local variables
|
| 182 |
+
|
| 183 |
+
**Solution:**
|
| 184 |
+
- Config now read at runtime when function is called, not at module import
|
| 185 |
+
- UI can set environment variables before function execution
|
| 186 |
+
- Changes take effect immediately without module reload
|
| 187 |
+
|
| 188 |
+
**Verification:**
|
| 189 |
+
- ✅ UI dropdown selection "HuggingFace" correctly uses HuggingFace provider
|
| 190 |
+
- ✅ Logs show "Using primary provider: huggingface" matching UI selection
|
| 191 |
+
- ✅ Each test run can use different provider without restart
|
| 192 |
+
|
| 193 |
### Created Files
|
| 194 |
|
| 195 |
### Deleted Files
|