Commit graph

21 commits

Author SHA1 Message Date
David Brailovsky
d192bd6dca
fix(coding-agent): avoid Fable split-turn summary refusals (#9908)
Separate conversation content from instructions and replace prefix/suffix wording with continuation-oriented summarization guidance.

Hopefully this avoids the refusals.

Fixes #9652
2026-09-22 16:52:07 +02:00
Armin Ronacher
9e05370b29
Mid conversation system messages (#9548)
This change makes system prompt text and tool changes part of the transcript rather than silently rewriting its starting conditions. This lets Pi record when instructions changed or tools became available, restore that state after resuming or navigating branches, and preserve cached prompt prefixes where the upstream supports it.
2026-09-16 15:54:07 +02:00
Vegard Stikbakke
6b36eb5927 fix(coding-agent): remove explicit tool choice from compaction calls
Fixes #8649\n\nFixes #8638
2026-08-26 11:20:44 +02:00
Vegard Stikbakke
97fa14e39c fix(coding-agent): reject truncated compaction summaries closes #7048 2026-08-24 13:08:30 +02:00
Cristina Poncela Cubeiro
ed867e9094
fix(ai): fallback cost not via stream options (#8352)
* fix(ai): fallback cost not via stream options

* fix: always pass beta header, remove fallback from stream options
2026-08-19 11:30:26 +02:00
Vegard Stikbakke
8dab70281b Revert "feat(coding-agent): add cache-friendly compaction primitives"
This reverts commit cff1cf52c6.
2026-08-19 09:52:26 +02:00
Cristina Poncela Cubeiro
4809c2abca
fix(ai): anthropic fallback usage (#8319)
* fix: anthropic fallback usage

* small cleanup
2026-08-19 09:11:45 +02:00
Vegard Stikbakke
cff1cf52c6 feat(coding-agent): add cache-friendly compaction primitives
Add provider-context prefix preparation and optional summary request settings needed by cache-friendly compaction. Existing AgentSession callers continue to pass undefined, so standalone summarization remains the default until the feature is wired in.
2026-08-18 14:52:06 +02:00
Vegard Stikbakke
ef8dc7385b feat(coding-agent): centralize compaction summary requests 2026-08-18 14:19:01 +02:00
Vegard Stikbakke
90305d90a0 fix(coding-agent): disable tools during summarization 2026-08-18 09:19:40 +02:00
Cristina Poncela Cubeiro
eb1f87fa9a
fix(coding-agent/ai): anthropic refusal error and fallbacks (#8258) 2026-08-17 20:04:49 +02:00
Vegard Stikbakke
58302d34e7 feat(coding-agent): support compaction routing sessions 2026-08-17 07:34:52 +02:00
Armin Ronacher
9b3a205917 fix(coding-agent): isolate summarization requests 2026-07-22 23:54:57 +02:00
Mario Zechner
f8b74a4507 fix: complete extension usage accounting
closes #6509
2026-07-20 17:06:22 +02:00
David Brailovsky
2fd3868401
add usage info to branch summary, compaction and tool result entries (#6671)
* add usage info to branch summary entries

* add usage to compaction entries

* allow custom tools to report llm usage in tool results

* allow observing and patching usage in tool_result hooks

* agent-harness: save usage in entries

for compaction, branch summaries and tool results
2026-07-20 16:41:43 +02:00
Mario Zechner
8a0903ebf2 feat(ai): compat entrypoint, core-only root barrel (phase 5)
The root barrel is now core-only and side-effect free: types,
createModels/createProvider, auth substrate, lazyStream/lazyApi, faux,
utils. Generated catalogs, api-registry, env-api-keys, images, global
stream functions, and per-API lazy wrappers leave the root.

New @earendil-works/pi-ai/compat preserves the old surface verbatim as
a strict superset of the root: api-dispatch stream/complete with env
key injection, the builtin registration side effect (skip-if-present so
it cannot clobber earlier overrides), deprecated getModel/getModels/
getProviders aliases of the new getBuiltin* reads in providers/all,
lazy api wrappers + setBedrockProviderModule, and image generation.
Compat dies with the coding-agent ModelManager migration.

Packaging: exports map gains ./compat, ./providers/*, ./api/*;
sideEffects array lists only the effectful modules.

Old-global imports across agent/coding-agent/examples and pi-ai tests
switch to /compat (path-only; compat is a superset). The coding-agent
extension loader resolves the pi-ai ROOT specifier to compat, so
existing user extensions using the old global API keep working at
runtime until compat is removed. vitest configs alias /compat to src;
browser smoke imports old globals from /compat.
2026-06-10 21:17:12 +02:00
Mario Zechner
2e02c74dcb chore: pin dependencies and use native TypeScript 2026-05-20 12:46:17 +02:00
Armin Ronacher
3d9e14d748 fix(compaction): clamp summary output tokens
Fixes #4390.
2026-05-11 16:36:27 +02:00
Mario Zechner
3e5ad67e0f chore: migrate pi packages to earendil works scope 2026-05-07 15:59:42 +02:00
Mario Zechner
da6a81d398 fix(coding-agent): reuse session thinking for compaction closes #3438 2026-04-20 15:09:50 +02:00
Matteo Collina
d35935200f
fix(coding-agent): avoid compaction reasoning for non-reasoning models (#1793) 2026-03-04 08:53:33 +01:00