Skip to content

feat(cli,desktop,mobile): provider + thinking-level settings; fix an empty-run row - #1599

Merged
huichen merged 4 commits into
mainfrom
pr/huichen
Nov 13, 2026
Merged

huichen merged 4 commits into
mainfrom
pr/huichen

Conversation

@huichen

@huichen huichen commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

Adds a model-settings surface to the CLI, lets any client (a phone, a second desktop) probe a provider's thinking levels on the host that owns it, and stops a settled run that never wrote anything from leaving a one-line "Completed" card in a thread.

Commits

  • feat(cli,agent,host,desktop,mobile): model settings and thinking-level probe — future models providers|provider set|remove|model set|remove read and write every provider and model setting through the Agent (keys are never printed, only hasApiKey); future models probe <provider>/<model> asks the endpoint which thinking levels it accepts, calibration level first so a wrong base URL, key or model id fails instead of reading as "no level offered". probe_thinking_level joins the shared remote provider commands so the phone and a second desktop probe on the host that owns the provider, reached from the desktop through a Tauri command with a probe-sized deadline; the mobile provider editor gains the same detect control. The skills pointer moves to future-self 1.13.0.
  • fix(mobile,remote): a run that wrote nothing leaves no "Completed" row — a settled assistant bubble with no prose, rows, clock, token count or verdict is no longer drawn, and the projector drops that run's bubble. A live run keeps its empty bubble (it is the generating indicator) and a verdict counts as content.

Verification

Local self-test on a detached worktree at 5244a61 with the pinned Rust 1.99.1 toolchain and ulimit -n 8192:

  • cargo fmt --all -- --check → clean
  • cargo clippy --all-targets -- -D warnings → future-cli, future-agent, future-host, future-remote-protocol, futureos: clean
  • cargo test -p future-cli --lib → 1617 passed
  • cargo test -p future-remote-protocol → 31 passed
  • cargo test -p future-agent --lib → 3065 passed, 5 failed in agent/src/sandbox (no file this branch touches): the same 5 fail on origin/main 3903edc in the same full-parallel run and pass when run alone, so they are pre-existing and environmental
  • desktop: tsc --noEmit clean, eslint clean on the touched files, vitest 83 files / 1342 tests pass
  • mobile: tsc --noEmit clean, jest ProvidersSettings 27 passed
  • packages/remote-protocol: check:generated in sync, tsc clean, 63 tests pass
  • packages/remote-client: tsc clean, 706 tests pass

Notes

  • No migration and no default value changes. probe_thinking_level is a new host-side command: an older host answers unsupported for it.
  • The generated remote-protocol files were regenerated with the schema change (check:generated is clean).

User-visible changes

  • New CLI surface: future models providers | provider set | remove | model set | remove | probe. Before: model settings could only be written from a GUI. Revert: 3d93121.
  • The mobile provider editor gains a "detect" control for a model's thinking levels, and the desktop's remote-peer provider panel now supplies the probe its own dialog already had. Revert: 3d93121.
  • A settled run that produced no output no longer shows a one-line "Completed" card in a mobile or remote thread. Revert: 647f73b.

Reported from a phone (2026-11-13): a "Completed" line sat between the prompt
and the reply being written below it, as if that reply had already finished.

It was a reply bubble with nothing in it. The live lane materializes a bubble
from the run's projector on every event, so an accumulator exists for any run
an envelope named — including a run that never wrote a word of its own before
it settled. While the run is live that empty bubble is the footer's generating
indicator, which is worth drawing. Settled, it has no prose, no rows, no clock,
no token count and no verdict, so its footer falls back to its own label and
the card is one line reading "Completed".

`buildLiveAssistantItem` now reports a blank settled reply instead of a card,
and `upsertLiveAssistantItem` removes that run's bubble rather than drawing it.
An unfinished reply keeps its bubble: emptiness while a run is live is the
indicator, not a defect. A verdict is content even without words, so a failed,
stopped or truncated run still draws its bubble.

Tests (remote-client/timeline): a session-scoped frame folded into a run bucket
of its own and a run whose only frame is its terminal both leave no card; an
unfinished reply keeps its; and the reported transcript — prompt, blank card,
streaming reply — now reads as prompt then reply.
…l probe

The thinking-level probe existed only in the desktop's own provider dialog, and
a provider's model settings could only be written from a GUI. This makes the
probe work for a remote host's clients too, and gives the CLI the whole model
settings surface.

CLI (`future models`):

- `providers [--json]` reads every provider and model setting through the
  Agent (`list_providers`); keys never appear, only `hasApiKey`.
- `provider set|remove` writes a provider: a built-in accepts only
  `--key/--clear-key` and `--base-url/--clear-base-url` (its models come from
  the catalog), a custom one also takes `--name`/`--api` and is created with
  create-only semantics when it does not exist yet. The account provider
  `future` is refused (it is signed in).
- `model set|remove` edits one model of a custom provider: name, context
  window, max output, image input, thinking levels and per-1M prices. Settings
  the caller does not name keep their value (including a thinking-level list
  inherited from the provider level), and a missing model is added with the
  editors' defaults.
- `probe <provider>/<model>` asks the Agent which thinking levels the endpoint
  accepts, one level per call. The calibration level (`default`, no thinking
  parameter) comes first and stops the run when it fails, so a wrong base URL,
  key or model id cannot read as "no level is offered".

Agent: `probe_thinking_level` fills `api`/`base_url` from the registered model
when the caller leaves them out, which is what lets `provider/model` be probed
without restating how it is addressed. An unsaved provider still has to carry
them.

Remote: `probe_thinking_level` joins the shared provider commands, so a phone
or another desktop probes on the host that owns the provider (the request is
built by the host's Agent, from the request that host will send). The desktop
client reaches it through a dedicated Tauri command with a probe-sized deadline,
since the ordinary 10 s command budget would report a slow provider as a
transport failure; the phone uses the settings lane's 60 s.

Clients: the phone's provider editor gains the same "detect" control, and the
desktop's remote-peer provider panel now supplies the probe its dialog already
had.

The `skills` pointer moves to future-self 1.13.0, which documents this surface.
@huichen
huichen enabled auto-merge (squash) November 13, 2026 11:33
@huichen
huichen merged commit 57b118b into main Nov 13, 2026
35 checks passed
auto-merge was automatically disabled November 13, 2026 11:57

Pull Request is not mergeable

@huichen
huichen deleted the pr/huichen branch November 13, 2026 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant