diff --git a/mateclaw-server/src/main/java/vip/mate/llm/model/ModelInfoDTO.java b/mateclaw-server/src/main/java/vip/mate/llm/model/ModelInfoDTO.java index 0c421ce8..e840068c 100644 --- a/mateclaw-server/src/main/java/vip/mate/llm/model/ModelInfoDTO.java +++ b/mateclaw-server/src/main/java/vip/mate/llm/model/ModelInfoDTO.java @@ -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. + * + *
{@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();
}
}
diff --git a/mateclaw-server/src/main/java/vip/mate/llm/service/ModelProviderService.java b/mateclaw-server/src/main/java/vip/mate/llm/service/ModelProviderService.java
index 96c21718..8b148ad2 100644
--- a/mateclaw-server/src/main/java/vip/mate/llm/service/ModelProviderService.java
+++ b/mateclaw-server/src/main/java/vip/mate/llm/service/ModelProviderService.java
@@ -249,6 +249,8 @@ public class ModelProviderService {
List