Files
openbot/scripts
Aleksander DygońandClaude Opus 5.5 0ced348d93 Let each custom provider model set its reasoning efforts (#5138)
* Let each custom provider model set its reasoning efforts

A custom model on OpenCode always showed Low, Medium and High, and a custom
model on Pi could not reason, because Pi got `reasoning: false`. The form had
no field for the efforts that an endpoint accepts.

- Add an optional `reasoningEfforts` list to each custom model (none, minimal,
  low, medium, high, xhigh, max). It stays on this computer, like the context
  window: the Team API save and list keep their released model fields.
- OpenCode gets the list as `variants`. OpenCode 2.2.5 drops a `reasoning`
  key from this config shape, and listed variants replace its own set.
- Pi gets `reasoning: true` and a `thinkingLevelMap` that sets each level that
  the list does not have to null, so Pi offers only the listed levels.
- The form shows the efforts under each model row. With none selected, the
  harness keeps its own behavior.
- Instance transfer keeps the list.
- The OpenCode and Pi custom endpoint E2E scripts check the listed efforts and
  the `reasoning_effort` that a turn sends.

Input kinds (images, PDF) from the same issue are not in this change.

Refs #4154

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix review findings on custom model efforts

- Send the invalid efforts error with `sourceText`, in all 14 languages.
- Keep the efforts of a found model when the user clears and checks it again.
- Make the preview list the saved efforts, as OpenCode and Pi do.
- Change the efforts list in place, and give each row its index as an
  accessor, so that a removed row does not rebuild the rows after it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 12:35:25 +01:00
..