RockteMQ-AI commented on issue #1929:
URL: 
https://github.com/apache/rocketmq-dashboard/issues/1929#issuecomment-5256322677

   **Issue Evaluation**
   
   Category: `bug` | Status: **Confirmed**
   
   The token precedence issue has been verified, though the root cause is in a 
different location than initially reported.
   
   **Root Cause:** `LlmConfigService.java:259-266` 
(`normalizeWithStoredApiKey`) — when the incoming config has no API key, it 
falls back to the persisted key first (`defaultString(storedKey, envToken())`). 
The environment variable is only used when the persisted key is blank, which 
inverts the expected precedence (env should win over persisted). Note: 
`buildLlmHeaders` does not exist in `SettingsService`; the actual method is 
`normalizeWithStoredApiKey` in `LlmConfigService`.
   **Impact:** LLM connection tests may use a stale persisted token instead of 
the current environment variable, causing confusing test results.
   **Severity:** medium
   
   An automated fix proposal can be generated. Reply `/approve` to proceed with 
PR generation.
   
   ---
   *Automated evaluation by github-manager-bot*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to