Commit graph

8 commits

Author SHA1 Message Date
Mario Zechner
f715a15c10 fix(ai,chord,durable,coding-agent): parse streamed tool-call arguments incrementally (fixes #9265)
- ai: StreamingJsonParser / ToolCallArgumentsStream read each argument delta once (tolerant,
  immutable snapshots, linear cost); every provider, pi-messages and the faux provider use it
  and keep stream state (partialJson, partialArgs, index, customInput, streamIndex, Bedrock
  reasoning bytes) off the content blocks; grammar tool input appends per delta
- agent: streamProxy uses the same parser
- chord: Delta append ops own their text (ownedSlice), so ops and replicas no longer keep the
  whole growing string alive
- durable, ai, mcp: bounded error excerpts and summaries own their characters
- coding-agent: tool calls render streamed arguments once per frame, not once per delta
2026-10-24 08:00:07 +00:00
Armin Ronacher
bc2d8dc1c4 fix(ai): drop mismatched item ids when replaying grammar tool calls
Foreign tool call ids are normalized to fc_*, but grammar tools such as
codemode replay as custom_tool_call, which requires ctc_* ids. This broke
switching OpenAI models through Radius after a codemode call
(earendil-works/radius#115).
2026-10-01 20:42:40 +02:00
Mario Zechner
cf8d5fac30 feat(agent): add Pico storage foundation 2026-09-18 12:32:00 +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
Armin Ronacher
8b5899dce2 fix(ai): restore stream compatibility 2026-09-03 13:53:57 +02:00
Armin Ronacher
7915cdac64 feat(ai): add strict tool schema conversion 2026-08-11 12:06:33 +02:00
Lucas Meijer
f9a49869c2
feat(ai): expose pending stop reason while streaming (#7151)
* feat(ai): expose pending streaming stop reason

Closes #7142

* manual tidy up of human facing copy
2026-07-27 11:56:15 +02:00
Armin Ronacher
24bace27cf
feat(ai): support constrained sampling (#6341)
Add the constrained sampling API and provider plumbing for OpenAI and Anthropic tool calls, including grammar sampling variants and model capability metadata.
2026-07-23 23:48:40 +02:00