Commit Graph
869 Commits
Author SHA1 Message Date
amosblomqvist dc4c398d51 release: prepare 0.4.0 2026-10-29 06:26:20 +02:00
amosblomqvist ee66a4b381 ui: polish custom endpoint authentication and model controls 2026-10-29 05:27:41 +02:00
amosblomqvist 6158723563 fix: fully redact custom credentials in key inventory 2026-10-29 04:59:07 +02:00
amosblomqvist b48821309b feat: finish donor-led custom endpoint integration 2026-10-29 04:43:53 +02:00
amosblomqvist 80662d3d3b Merge PR #62 contribution for donor-led integration 2026-10-29 02:25:19 +02:00
amosblomqvist b493403fc3 Merge occurrence-aware pending-question submission fix 2026-10-29 01:30:13 +02:00
amosblomqvist 3993122a4e fix: keep live question placeholders pending client-side 2026-10-28 23:41:24 +02:00
amosblomqvist ecbe117053 Merge streaming math preprocessing fix 2026-10-28 23:36:31 +02:00
amosblomqvist 6ff4924780 fix: align pending questions by native occurrence 2026-10-28 23:31:37 +02:00
amosblomqvist de9caf6bc4 Merge contributor foundation for pending-question authority 2026-10-28 23:23:46 +02:00
amosblomqvist 3c76930964 fix: preserve math through streaming HTML repair
Disable only Remend's incomplete-HTML stripping in message/tool content and reasoning rendering. Keep TeX, source data, and sanitization unchanged; unfinished HTML can display literally.

PR #266 identified the less-than comparison trigger. This uses an independently authored renderer configuration fix rather than its TeX-spacing workaround, with streaming, incremental, literal-code, and safety regressions.
2026-10-28 23:21:15 +02:00
d-buckner 6480f4bf4e Merge pull request #2 from d-buckner/review/manual-model-ids-must-fixes
fix: never lose custom endpoint models or pins on a failed probe
2026-10-28 14:20:48 -07:00
d-buckner 6ffeca07d9 Merge pull request #1 from iamabhishekt/feat/manual-model-ids
feat: manual model IDs when /models is unavailable
2026-10-28 14:18:52 -07:00
d-buckner ef37c26433 fix: never lose custom endpoint models or pins on a failed probe
A connect that fell back to typed model ids replaced the stored model list
with the typed ids alone, then pruned the user pins against it. A transient
/models failure (503, timeout) therefore deleted every discovered model, its
detected metadata, and its pins, and answered 200.

- DiscoverResult carries the endpoint's HTTP status. A 401/403 fails the
  connect even when ids are typed: a rejected key is not a missing model list.
- A failed probe keeps the stored snapshot for the SAME base URL, so the
  prune cannot delete pins for a probe that failed. A new base URL starts
  clean, so an older endpoint's models never follow the URL.
- Comment corrections: the route contract and the CustomProviderSettings
  fields described the behaviour from before the manual-ids change.
- tests/custom-provider-route.test.ts covers the four branches: transient
  failure, rejected key, new endpoint with no model list, working probe.

tsc and eslint clean. Suite: 2554 tests, 2 failures, both also failing on
6959482 (render-sidebar date drift, subscription-auth install artifact).
2026-10-28 13:56:53 -07:00
iamabhishekt b4a13f5c3b feat: manual model IDs when /models is unavailable
Hosted OpenAI-compatible APIs often serve chat but not GET /models
(Volcengine Ark Agent Plan returns 404), so connect failed. Accept a
typed list of model IDs: merged into discovered models when /models
works, used alone when it does not. The typed list is stored as
customProvider.manualModels so reconnects and pin saves keep it.
2026-10-28 16:16:30 -04:00
amosblomqvist f69fa354cc fix: reserve native Claude Code provider namespace 2026-10-28 21:52:48 +02:00
amosblomqvist 8883fe1f5f Merge native Claude Code integration with explicit opt-in
# Conflicts:
#	src/agent/teacher-agent.ts
#	src/server/keys.ts
2026-10-28 21:45:50 +02:00
amosblomqvist c9c8cead57 feat: require explicit opt-in for Claude Code use 2026-10-28 21:37:03 +02:00
amosblomqvist ab76e4ff50 fix: clarify Claude CLI billing and compact status copy 2026-10-28 21:13:43 +02:00
amosblomqvist 074ba7afe4 feat: use session-reported Claude CLI context windows 2026-10-28 20:36:42 +02:00
amosblomqvist 17c94be327 fix: show native Claude CLI usage as unpriced 2026-10-28 19:58:07 +02:00
amosblomqvist eeaa147565 Merge model-visible image processing and desktop file-path attachments 2026-10-28 19:54:32 +02:00
amosblomqvist 1750dd8a24 fix: keep successful file path attachments silent 2026-10-28 19:52:07 +02:00
amosblomqvist 9fbd0598f1 Merge declarative custom and local providers 2026-10-28 19:27:28 +02:00
amosblomqvist 5093809ea0 fix: authorize CLI probes and preserve executable identity 2026-10-28 19:26:36 +02:00
amosblomqvist c5a756d707 feat: report Claude CLI installation and gate unsupported versions 2026-10-28 19:10:47 +02:00
amosblomqvist 0b576d5973 fix: preserve native word and line deletion around file chips 2026-10-28 19:07:25 +02:00
amosblomqvist c4e934c9dc feat: attach desktop file paths as editable learner chips 2026-10-28 18:54:57 +02:00
amosblomqvist 32ef9e84fe Merge Next upgrade fixing gzip drain listener accumulation 2026-10-28 18:31:40 +02:00
amosblomqvist c0de3f968d fix: preserve native Claude CLI authentication provenance 2026-10-28 18:17:50 +02:00
amosblomqvist 84f93999c5 fix: normalize model-visible images with Pi processing 2026-10-28 18:16:04 +02:00
amosblomqvist 64a36bebd2 fix: scope held Claude processes and honor MCP cancellation 2026-10-28 17:19:51 +02:00
amosblomqvist 6ca431644d fix: enforce Claude CLI MCP admission and safe continuation 2026-10-28 08:01:50 +02:00
amosblomqvist 812ea23419 Merge current main into PR61 finishing branch 2026-10-28 07:08:36 +02:00
Hadrien Cornier 82f0b59355 Keep the question dock aligned with the native pending call 2026-10-27 22:58:00 -05:00
amosblomqvist 3dd52110bb docs: add Discord link to README navigation 2026-10-28 05:24:27 +02:00
amosblomqvist 313a3c88a3 Recompute custom thinking preferences for each model request 2026-10-28 05:07:55 +02:00
amosblomqvist fb7341d82b Keep native Bedrock implementation in standalone traces 2026-10-28 04:54:57 +02:00
amosblomqvist f84bef1f91 Add declarative custom providers through native Pi AI 2026-10-28 04:42:46 +02:00
Daniel Buckner 695948271f feat: user pins for local model limits (context, max output, thinking)
A local endpoint that publishes no limits — LM Studio's /models says nothing —
left every model on the 8192/4096 defaults with no way to say "this one has a
131k window". Each discovered model now gets three optional pins in the
endpoint editor: context window, max output tokens, thinking (auto/on/off).

A pin always wins: user pin → what the endpoint published → compiled default.
Blank means no opinion, so discovery keeps ruling wherever you don't pin. Pins
live in customProvider.overrides keyed by model id, stored apart from the
discovery snapshot: a reconnect refreshes the models and prunes the pins of
models that vanished while keeping the rest.

Pins are written by PATCH /api/custom-provider, which never probes — the whole
point is configuring a server that isn't answering /models correctly. Connect
still probes and still fails loudly when the endpoint is down. A pin under 2048
tokens is rejected on the write side and clamped up on the read path, matching
the compaction-floor discipline.
2026-10-27 16:25:03 -07:00
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 59f389d0a6 fix: upgrade Next to bound gzip drain listeners 2026-10-28 00:20:49 +02: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