8000 [pull] main from can1357:main by pull[bot] · Pull Request #127 · ericrihm/oh-my-pi · GitHub
[go: up one dir, main page]

Skip to content

[pull] main from can1357:main - #127

Merged
pull[bot] merged 29 commits into
ericrihm:mainfrom
can1357:main
Sep 27, 2026
Merged

pull[bot] merged 29 commits into
ericrihm:mainfrom
can1357:main

Conversation

@pull
@pull pull Bot commented Sep 27, 2026 •
Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

KamijoToma and others added 29 commits September 22, 2026 00:36
Port earendil-works/pi's prompt-cache warming (proposal in #12691):
the main agent loop replays its last request with a one-token output
budget shortly before the prompt-cache entry expires, so idle gaps do
not force a full-prefix cache re-write.

- session/cache-warmer.ts: cost-aware scheduler refreshing at 90% of
  the declared entry lifetime (>=10s margin) only when the expected
  avoided-miss cost clears the refresh cost by $0.05; streaming/idle
  phases with 15%/100% continuation probability; 30/60-minute safety
  windows; cache_warming_decision extension override event
- catalog: Model.promptCache per-retention-tier lifetimes; direct
  Anthropic rows annotated 5m/1h; models.yml promptCache opt-in
  plumbed through ModelPatch and custom-model builds; models.json
  regenerated with the annotation only (zero unrelated drift)
- providers.cacheWarming setting (off/streaming/idle, default idle)
  replaces the Anthropic-only fixed keep-alive refresh loop, which is
  removed along with its stream-level scheduling machinery

Resolves #12691
- models.yml promptCache now reaches models: ModelPatch carries the
  field, applyModelPatch copies it, and custom-model overlays/finalize
  pass it through (previously accepted by the schema and dropped)
- the warmer mirrors the Anthropic provider's OAuth retention default:
  OAuth requests on long-retention-capable models schedule against the
  1h tier instead of 5m
- extension decide calls race a 2s timeout so a slow extension cannot
  push the replay past the expiry margin
- session dispose cancels the warmer and detaches onWarmed before the
  drain windows; the mode-change subscription is unwound too
- arming no longer string-matches session ids: every request through
  the session's own streamFn is its main loop, and spawned/one-shot
  sessions (task subagents, standalone compaction, agentic commit) opt
  out via the new CreateAgentSessionOptions.cacheWarming flag
- prompt-cache lifetimes move to catalog rules (prompt-cache node in
  rules/providers/anthropic.kdl, applied through
  applyCatalogAssignments), replacing the generator-side TS pass
- isCurrent uses the upstream full-prefix identity check
- the TTL test scrubs PI_CACHE_RETENTION and new type assertions are
  removed (narrowed deps.stream contract, typed thinking fixture)

Ref #12691
# Conflicts:
#	docs/models.md
#	packages/ai/src/providers/anthropic.ts
#	packages/ai/test/anthropic-cache-refresh.test.ts
#	packages/catalog/src/compat/rules.json
#	packages/catalog/src/models.json
… fmaf on x86-64-v2

The baseline x64 addon (the only x64 build for win32 and darwin) targets
x86-64-v2, which has no FMA; f32::mul_add there compiles to a scalar fmaf
libcall per element and blocks vectorization. The Q8/f32 dot products, dot4,
RoPE and attention value accumulation now use plain multiply-add.
… strategy (@KamijoToma)

feat(coding-agent): port upstream pi's cache-warming strategy

Maintainer fixes applied while merging:
- stop warming after a refresh that misses the cache or fails
- cut each replay off at its first generated token (thinking lifts max_tokens to the budget)
- adopt the retention tier the response reports writing (resolver-keyed OAuth sessions)
- idle warming covers entries shorter than the 30-minute window only
- invalidate on model/system prompt/tools/thinking/retention changes
- register providers.cacheWarming in the settings registry; replay via primaryStreamFn
- changelog attribution, breaking-change section, merge-artifact cleanup
…g mul_add to libm fmaf on x86-64-v2 (@H4vC)

perf(pi-predict): stopped SmolLM CPU kernels lowering mul_add to libm fmaf on x86-64-v2
# Conflicts:
#	packages/catalog/src/compat/rules.json
#	packages/catalog/src/models.json
- Restore lazy loading for the OpenAI grounded provider
- Order API-billed openai/* after every openai-codex entry
- Surface structured OpenAI error type/code/param without the message body
- Hard-cap sources/citations at the requested result count
- Omit zero searchRequests; reject OAuth consistently
- Document ignored params and caps; add catalog/tui changelog entries
- Replace the tautological chain test with a billing-precedence contract test
…mp update

On Windows, Bun's rejected Bun.file().text() of a missing file holds no
event-loop handle, so the loop drained mid-await and the unsettled-entry
guard failed `omp update` with exit 1 when ~/.npmrc and ~/.bunfig.toml
were absent.
- Deferred the unsettled-entry verdict from beforeExit to exit, reporting only when the last beforeExit was final (an unref'd probe timer clears the mark if the loop turns again).
- Windows Bun emits beforeExit while omp update still has I/O in flight and then completes the command; it no longer exits 1 with a false diagnostic.
- Added regression tests for a loop resumed after beforeExit, completing or exiting explicitly.
- Isolated the test child from inherited XDG dirs.

Fixes #13470
…date path

- npm-registry.ts: switched to the async-only node:fs/promises import per AGENTS.md

- update-cli.ts: addBunCacheActualDir reads package.json via fs.promises so a missing manifest cannot drain the loop on Windows (#13470)

- CHANGELOG: moved the #13470 entry back to Unreleased after rebase and linked the issue on the readOptional entry
@pull pull Bot locked and limited conversation to collaborators Sep 27, 2026
@pull pull Bot added the ⤵️ pull label Sep 27, 2026
@pull
pull Bot merged commit 22269d6 into ericrihm:main Sep 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

0