mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-13 03:13:41 +08:00
feat(llm): expose supportsReasoningEffort on ModelInfoDTO
This commit is contained in:
parent
84370566de
commit
c249dbcb17
@ -22,8 +22,22 @@ public class ModelInfoDTO {
|
||||
/** Reason text when probeOk=false (short, suitable for UI badge tooltip) */
|
||||
private String probeError;
|
||||
|
||||
/**
|
||||
* RFC-049 PR-1-UI: whether this model's {@code ModelFamily} accepts the
|
||||
* {@code reasoning_effort} parameter. Derived from the model name on the
|
||||
* server side so the frontend can gray out the "thinking depth" selector
|
||||
* for chat-type models that don't support thinking — a product contract,
|
||||
* not a runtime toggle.
|
||||
*
|
||||
* <p>{@code true} only for the OpenAI reasoning family (gpt-5*, o1*, o3*, o4*).
|
||||
*/
|
||||
private boolean supportsReasoningEffort;
|
||||
|
||||
public ModelInfoDTO(String id, String name) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
// RFC-049 PR-1-UI: derived from id (the model name) so every construction
|
||||
// site populates the capability consistently.
|
||||
this.supportsReasoningEffort = ModelFamily.detect(id).supportsReasoningEffort();
|
||||
}
|
||||
}
|
||||
|
||||
@ -249,6 +249,8 @@ public class ModelProviderService {
|
||||
List<ModelInfoDTO> extraModels = new ArrayList<>();
|
||||
if (models != null) {
|
||||
for (ModelConfigEntity model : models) {
|
||||
// RFC-049 PR-1-UI: ModelInfoDTO(id, name) derives supportsReasoningEffort
|
||||
// from id via ModelFamily — no extra wiring needed here.
|
||||
ModelInfoDTO info = new ModelInfoDTO(model.getModelName(), model.getName());
|
||||
if (Boolean.TRUE.equals(model.getBuiltin())) {
|
||||
builtinModels.add(info);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user