Conversation
…t OpenAI fallback
|
Follow-up on the verification I said I still owed: ran the request path from this branch live
{"model": "wire-scratch-model", "temperature": 0.7, "stream": true,
"stream_options": {"include_usage": true}, "messages": [...]}
{"model": "wire-scratch-model", "temperature": 0.3, "stream": true,
"stream_options": {"include_usage": true}, "messages": [...]}So the configured value does reach the body and the built-in default still applies when it is And for an unknown To be precise about scope: this drove the Spring AI request path directly, not the packaged |
What's changed?
Closes #4391.
LlmConfigfixestemperatureat0.3for every provider andModelProviderConfighas no fieldthat could change it. When
baseUrlis empty, acodeoutsideopenai/zhipu/zaifallsthrough to
https://api.openai.com/v1withgpt-5and nothing is logged, so the only signal is anerror coming back from a host the operator never entered.
ModelProviderConfiggets an optionaltemperaturefield.LlmConfigreads it and still uses0.3when it is not set, so existing configurations behaveexactly as before.
LlmConfiglogs a warning whencodematches none of the built-in defaults andbaseUrlormodelwere left empty.LlmConfig#buildChatOptionsso it can be unit tested; thevalues it produces are unchanged.
LlmConfigTest, 7 cases.LlmConfighad 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) andmvn checkstyle:checkoverhertzbeat-common-coreandhertzbeat-ai. The capture in #4391 is whatshowed
temperaturegoing out today; I have not yet replayed the same capture against this branchto watch the configured value come through, and will post that here once I do.
Checklist
Add or update API
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 notreproduced it. This PR does not fix #3971, it makes the request parameters configurable and the
fallback visible, which is what I can demonstrate.