Following up on the recent addition to support thinking effort
#217
Is it better to expose constants or static methods on the LanguageModel ?
LanguageModel.minThinkingEffort
LanguageModel.maxThinkingEffort
where they are integer values
minThinkingEffort=0
maxThinkingEffort=0 for UA with models that dont support thinking.
and
maxThinkingEffort=4 for UA with models that have the 4 levels of thinking mode.
This mitigates concerns for interop between models where
-
some models may only have /nothink, /think and no graduation in between.
-
some models may have different graduation of thinking levels
Models like qwen have https://huggingface.co/Qwen/Qwen3.8-27B#api-usage
xhigh, medium, low which does map to your enum today but may not in the future.
additionally the current API will require developers to call availability
const status = await LanguageModel.availability({
thinking: { effort: "high" }
});
four times to discover all the possible thinking modes. The constant on languageModel simplifies discovery.
Following up on the recent addition to support thinking effort
#217
Is it better to expose constants or static methods on the LanguageModel ?
LanguageModel.minThinkingEffort
LanguageModel.maxThinkingEffort
where they are integer values
minThinkingEffort=0
maxThinkingEffort=0 for UA with models that dont support thinking.
and
maxThinkingEffort=4 for UA with models that have the 4 levels of thinking mode.
This mitigates concerns for interop between models where
some models may only have /nothink, /think and no graduation in between.
some models may have different graduation of thinking levels
Models like qwen have https://huggingface.co/Qwen/Qwen3.8-27B#api-usage
xhigh, medium, low which does map to your enum today but may not in the future.
additionally the current API will require developers to call availability
four times to discover all the possible thinking modes. The constant on languageModel simplifies discovery.