* 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>
* Write a real output limit for each custom model
OpenBot wrote `output: 0` into the OpenCode entry of a custom model. OpenCode
2.2.5 then asked for its own 32,000-token fallback, and an endpoint whose
model has a smaller output cap refused every turn.
- Add an optional `maxOutput` to each custom model, next to the context
window. It stays on this computer: the Team API list and save keep their
released model fields.
- OpenCode and Pi use one helper: the saved `maxOutput`, or else at most
16,384 tokens, or half a small window. Before, Pi had its own copy of this
default, and OpenCode had none.
- The OpenCode E2E script checks the request budget for a saved cap, a blank
cap on a 128K window, and a small window.
Based on #4238 by Muzhen2000.
Fixes#4234
Co-authored-by: Muzhen2000 <254800372+Muzhen2000@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Check the saved output limit in the Pi custom endpoint E2E
The Pi E2E now gives one model a saved max output, and checks that Pi
asks the endpoint for that budget.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Keep the saved max output on detected endpoints and in a transfer
- An edit of a detected endpoint (Ollama, LM Studio) opened with the max
output field empty, and a save then removed the saved value.
- A settings transfer dropped the max output of each custom model. The
manifest now has an optional `maxOutput` key, as for `contextWindow`.
An older app ignores the key.
- Name the OpenCode version of the 32,000 fallback.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Name the release notes after the branch
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Keep the token counts readable in the model row
With a max output column, the context window column was too narrow to
show a value such as 131072. Each token column now has a minimum width.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Name the Pi clamp that keeps a large max output inside the window
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Muzhen2000 <254800372+Muzhen2000@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Show a joined server's custom endpoint models on the Custom tab
The model picker of a joined server's agent used the custom endpoints of
this computer. The Custom tab was missing, and the server's custom models
showed on the OpenCode tab. The picker now uses the endpoints of the
active server: this computer's list for a local agent, and the host's
list for a joined server where the user is an owner or an admin.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Name the custom endpoint when it refuses its API key
OpenCode 2.2.5 reports an HTTP 401 from a custom endpoint as "provider
authentication required" (-32000), both when no key was sent and when the
endpoint refused the key. OpenBot showed that OpenCode had no sign-in and
asked for an OpenCode Go key, but the key of an endpoint is in Providers.
The ACP client option `providerName` becomes `customEndpoint`, which also
says whether the endpoint has a saved key. The OpenCode flavor uses it to
name the endpoint and to tell the user to enter its key again, or to add
one. The OpenCode custom model E2E now checks that a turn sends the saved
key, and that a refused key gives the new text.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Point the endpoint key error to Server settings
The custom provider list is in Server settings → Providers, not in
Settings. An endpoint can also sign in with a header and no API key, so
the refused text names the key or the headers, and a saved header counts
as a credential. The E2E now also checks the text for a missing key.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
OpenCode asks its small_model for a title on the first turn of each
session. On a llama-swap server, a small_model of the same server unloaded
the agent's model, and the next turn loaded it again. OpenBot does not use
these titles, so its OpenCode config layer now turns them off.
Add scripts/opencode-custom-model-e2e.ts. It runs the real OpenCode against
a fake endpoint with two models and checks that each request names the
agent's model. Without the fix, the title request named the other model.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>