xyy45 opened a new pull request, #4392: URL: https://github.com/apache/hertzbeat/pull/4392
## What's changed? Closes #4391. `LlmConfig` fixes `temperature` at `0.3` for every provider and `ModelProviderConfig` has no field that could change it. When `baseUrl` is empty, a `code` outside `openai` / `zhipu` / `zai` falls through to `https://api.openai.com/v1` with `gpt-5` and nothing is logged, so the only signal is an error coming back from a host the operator never entered. - `ModelProviderConfig` gets an optional `temperature` field. - `LlmConfig` reads it and still uses `0.3` when it is not set, so existing configurations behave exactly as before. - `LlmConfig` logs a warning when `code` matches none of the built-in defaults and `baseUrl` or `model` were left empty. - The default resolution moved into `LlmConfig#buildChatOptions` so it can be unit tested; the values it produces are unchanged. - Added `LlmConfigTest`, 7 cases. `LlmConfig` had no tests before. No new provider names are hardcoded and no endpoint or DTO contract used by the UI changes. Tested locally: `mvn test -pl hertzbeat-ai` (69 cases, including the 7 new ones) and `mvn checkstyle:check` over `hertzbeat-common-core` and `hertzbeat-ai`. The capture in #4391 is what showed `temperature` going out today; I have not yet replayed the same capture against this branch to watch the configured value come through, and will post that here once I do. ## Checklist - [x] I have read the [Contributing Guide](https://hertzbeat.apache.org/docs/community/code_style_and_quality_guide) - [x] I have written the necessary doc or comment. - [x] I have added the necessary unit tests and all cases have passed. ## Add or update API - [ ] I have added the necessary [e2e tests](https://github.com/apache/hertzbeat/tree/master/e2e) and all cases have passed. No API added or changed, so the box is left unchecked on purpose. ## Note The issue this closes deliberately does not claim anything about the DeepSeek 400 in #3971. That report has an explicit `baseUrl`, so it never reaches the fallback branch, and I have not reproduced it. This PR does not fix #3971, it makes the request parameters configurable and the fallback visible, which is what I can demonstrate. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
