Skip to content

Thinking effort API - level options #220

Description

@sushraja-msft

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions