Commit Graph
814 Commits
Author SHA1 Message Date
Daniel Buckner 286a95ba04 feat: disconnect a custom endpoint (DELETE /api/custom-provider + Disconnect in its editor)
Connecting was one-way: POST could only replace the base URL, and the only
escape was hand-editing settings.json. DELETE now mirrors POST — drop the
stored section, delete the reserved key, unregister the provider from
piModels() — and the connect editor grows a Disconnect beside Connect,
following the stored-key rows' Delete pattern (quiet text, one click, no
confirm, only once there is an endpoint to remove).
2026-10-27 15:56:17 -07:00
Daniel Buckner 1b01919482 feat: thinking levels for custom models (reasoning detected from /models metadata)
Custom models were pinned reasoning:false, so every one of them offered a
single thinking level ("off") while built-in reasoning models offered the
standard ladder. The endpoint's /models metadata now decides:

- detectReasoning() trusts explicit metadata only — a boolean
  reasoning / supports_reasoning / thinking, or a reasoning token in
  supported_parameters (vLLM, OpenRouter), capabilities, tags or
  architecture.output_modalities. No name guessing: a false positive would
  send reasoning_effort to a server that rejects it.
- CustomModel carries the detected flag (persisted, sanitizer keeps it),
  toPiModel passes it through, and pi-ai does the rest — default
  off/minimal/low/medium/high set, reasoning_effort on the wire.

Verified in the browser against a local OpenAI-compatible mock: the
reasoning-capable model exposes off/minimal/low/medium/high, the plain one
stays at off, and a prompt with medium actually arrives as
reasoning_effort=medium.
2026-10-27 15:56:17 -07:00
Daniel Buckner 5b1fd81815 fix: vision slot filters to image-capable + custom models (was relaxing for all providers)
The prior change made the vision slot show every model (image-capable first),
which relaxed the filter for built-in providers too — built-in text-only models
became selectable for Vision. Centralize the vision rule in ModelMenuList:
built-ins must report image input; custom-endpoint models stay selectable (their
capability may be unreported). Image-capable still float first.
2026-10-27 15:56:17 -07:00
Daniel Buckner dbf80803cc refactor: trim custom-endpoint comments and share synthetic provider const
Review pass: shorten verbose doc comments across the custom-endpoint code,
merge duplicate imports, share one synthetic provider entry between the keys
section and setup dialog, collapse the duplicated connect-editor block, revert
an unrelated settings-route drive-by.
2026-10-27 15:56:17 -07:00
Daniel Buckner 870a1ad343 feat: custom endpoint as a first-class provider (add via dropdown, required key, vision ordering) 2026-10-27 15:50:51 -07:00
Daniel Buckner 07b6403d94 feat: custom OpenAI-compatible endpoint as a first-class provider (vision + context from /models) 2026-10-27 15:48:16 -07:00
amosblomqvist 8f6fd7cd29 Merge release test synchronization correction 2026-10-27 23:48:37 +02:00
amosblomqvist 4f4b5643d4 test: await completed ChatGPT sign-in and consent saves
Replace arbitrary event-loop budgets in two release-gate tests with fresh per-attempt sign-in notifications and the actual consent control reply, bounded by a clear watchdog. Retain all final-state assertions and explicitly verify successful connected/error-free completion.

Controlled token/save gates demonstrate both old 100-turn waits return before completion; the corrected waits remain pending and retain the final persistence/UI assertions after release. Add small watchdog result/error/timeout tests. No production, workflow or dependency changes.

Isolated checks: focused 87/87, full suite once 2517/2517, full ESLint and typecheck. The full run preceded three runtime-erased non-null array-index annotations; focused tests/typecheck/full ESLint passed again on final source.
2026-10-27 23:44:48 +02:00
amosblomqvist b577ec5453 Prepare 0.3.9 release 2026-10-27 23:12:39 +02:00
amosblomqvist 0348897eb1 Merge reviewed Deepgram dictation language feature for 0.3.9 2026-10-27 22:39:34 +02:00
amosblomqvist 8337836199 Use sans settings labels and link Deepgram key setup 2026-10-27 22:32:55 +02:00
amosblomqvist 27e277099f Align dictation controls with settings dropdowns and show setup guidance 2026-10-27 22:18:01 +02:00
amosblomqvist f5a655b2f9 Preserve native Enter activation on dictation language options 2026-10-27 22:01:16 +02:00
amosblomqvist fbafc5e53a Finish Deepgram language settings with shared searchable picker 2026-10-27 21:51:09 +02:00
amosblomqvist 88266eaaf4 Merge PR114 dictation foundation for approved provider-row finishing
Preserve original contributor commit 3bb28e5f29. Resolve only the settings-dialog conflict by retaining current General/update behavior: the donor General-only language placement is explicitly superseded by the human-approved row BELOW the full-width Deepgram key. The assigned implementation worker will implement that placement and approved shared dropdown finishing. Foundation only, not a checked candidate.
2026-10-27 21:33:40 +02:00
amosblomqvist 3e657523ef Merge reviewed PR216 and PR228 maintenance bundle for 0.3.9 2026-10-27 21:27:28 +02:00
amosblomqvist 00a7d1437c Merge accepted main probe baseline before maintenance checks 2026-10-27 21:13:59 +02:00
amosblomqvist 2b1343ab38 Merge reviewed bounded probe-completion correction for 0.3.9 2026-10-27 21:11:02 +02:00
amosblomqvistandaksalatdev f01fdf3260 fix: require a successful probe result before handoff
Adapt the bounded probe-completion foundation from PR #130 by aksalatdev (source commit 535202bebe038fa1e0648f5df809d5ccfc26d071), not its mixed stream-salvage implementation.

Require a non-failed call followed by a matching probe_done result with neither isError nor explicit details.ok:false. Preserve older clean acknowledgments, saved attempts, and all existing handoff/retry/provider policies. Share the native completion seam with phase detection and exclude explicit refusals from UI phases.

Verify retained failed-probe Retry recovery with real agent/tool composition and synthetic engines: one fresh conclusion, one handoff, then teacher selection, without stored-tool replay. Focused tests 58/58; full tests 2473/2473; typecheck and full ESLint pass in isolated storage with scrubbed provider credentials.

Co-authored-by: aksalatdev <73862605+aksalatdev@users.noreply.github.com>
2026-10-27 20:49:04 +02:00
amosblomqvist 27abb31219 Integrate approved PR #228 maintenance foundation 2026-10-27 20:37:01 +02:00
amosblomqvist 31ea0c9f52 Integrate approved PR #216 maintenance foundation 2026-10-27 20:37:01 +02:00
amosblomqvist 354bd34c0c Merge PR #184 test typing compatibility for combined send contract 2026-10-27 19:18:20 +02:00
amosblomqvist 3b97056d01 test: infer the session send return type in refusal coverage
Avoid hardcoding Promise<void> so the test also typechecks with PR154's Promise<boolean> admission result. Type-only correction; no product behavior changes.
2026-10-27 19:17:27 +02:00
amosblomqvist 320d5e4704 Merge PR #154 short opening URLs and recoverable prompt handoff 2026-10-27 19:13:19 +02:00
amosblomqvist 30f52990b1 Merge PR #184 preserved-history failed-turn retry 2026-10-27 19:10:19 +02:00
amosblomqvist 3b29b5e9e7 fix: retire stale composer recovery drafts before retry
A failed-response Retry submits no composer text. Retire the earlier accepted text send's recovery fallback synchronously so a Retry model/key refusal cannot restore it over the current unsent draft. Never clear a later ordinary send's fallback at async settlement.

Add key/model503, superseding-draft and ordinary-refusal coverage. Verified 183 focused tests, typecheck, full ESLint, production build, and a red/green live production regression plus ordinary-draft recovery; no external provider calls.
2026-10-27 18:56:55 +02:00
amosblomqvist 1ff60b4681 fix: recover opening refusals after view teardown 2026-10-27 18:39:42 +02:00
amosblomqvist 5984eb4914 fix: render failed-response retry refusals as readable text
Decode only Retry's HTTP 400 error field for the existing banner. Preserve raw model/key refusal envelopes and other submission-error handling.

Verified on the accepted-main integration: 2424 full-suite tests, typecheck, full ESLint, production build and isolated synthetic production-browser Retry/Submit smoke. No real provider calls.
2026-10-27 18:35:31 +02:00
amosblomqvist f24fda926a fix: finish new-session opening-message handoff 2026-10-27 18:19:38 +02:00
amosblomqvist 282f01e1f4 Merge accepted local main into PR #184 working branch 2026-10-27 18:12:09 +02:00
amosblomqvist 8ca291526c Merge accepted local main into PR #154 working branch 2026-10-27 17:13:15 +02:00
amosblomqvist 82c6999a63 fix: preserve failed responses when retrying model calls
Keep failed attempts in the saved transcript and omit only trailing failures from Retry's temporary agent history. Use the matching temporary prefix length when persisting genuinely new output.

Preserve the error notice across plan/compaction markers, refuse Retry after later compaction, and avoid synthesizing results for tool calls inside failed generations while retaining Pi's native filtering.

Verified: 173 focused Retry/session/compaction-projection/practice-record tests, typecheck, changed-file lint, and diff --check. No app launch or real provider calls.
2026-10-27 16:49:29 +02:00
amosblomqvist 2049998ed7 Merge reviewed provider-first setup recovery and session-identity correction 2026-10-27 16:35:06 +02:00
amosblomqvist 06714e5998 Keep unresolved session identity separate from Strong fallback 2026-10-27 16:21:54 +02:00
Martin 8ad17a4fe4 docs: fix relative links in development guide 2026-10-27 15:18:44 +01:00
amosblomqvist 419dcf1ba2 Restore exclusive provider-first setup recovery 2026-10-27 16:12:13 +02:00
amosblomqvist c1ef6d6822 Merge PR #211 dynamic dock sizing with reviewed viewport corrections 2026-10-27 15:47:15 +02:00
amosblomqvist d30acd4fdd fix: finish measured dock sizing and short-window scrolling 2026-10-27 15:27:08 +02:00
amosblomqvist ae380b156b Merge model-label, OpenCode key-row and setup initialization fixes 2026-10-27 15:01:44 +02:00
amosblomqvist d6ae6f3256 Merge compaction summary projection and incomplete-checkpoint guard 2026-10-27 14:57:36 +02:00
amosblomqvist 03e379c3e7 Merge provider-independent model-slot repair after disconnect 2026-10-27 14:57:36 +02:00
Casimir ArlabosseandClaude Opus 5.5 cb7e719e92 test: resolve golden fixture path with import.meta.dirname
new URL(import.meta.url).pathname keeps percent-encoding, so the test
failed with ENOENT when the checkout path contains a space. Use
import.meta.dirname like the other tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 15:46:28 +08:00
anikam13 42814ba6a6 fix: budget dock height for answer controls and toolbar 2026-10-26 23:03:09 -07:00
amosblomqvist 683eb93bcc Fix model labels and catalog-backed setup initialization 2026-10-26 19:43:09 +02:00
amosblomqvist b81f0a3455 fix: avoid replaying superseded compaction summaries 2026-10-26 19:08:15 +02:00
amosblomqvist 88ba42fd37 fix: allow repairing model slots after subscription disconnect 2026-10-26 18:50:54 +02:00
Evangelos Stavropoulos a572675900 fix: let the learner retry a turn whose model call failed 2026-10-26 14:31:51 +02:00
amosblomqvist 3dc88472ee chore: prepare 0.3.8 2026-10-26 06:08:04 +02:00
amosblomqvist 8c277f8320 Merge source-preserving math content presentation 2026-10-26 05:26:13 +02:00
amosblomqvist d3c8709bd2 fix: preserve source data and recover tool math at presentation 2026-10-26 04:49:47 +02:00