Skip to content

Promote: native function-calling + svg/canvas recovery - #360

Merged
slaveofcode merged 4 commits into
mainfrom
develop
Aug 29, 2026
Merged

Promote: native function-calling + svg/canvas recovery#360
slaveofcode merged 4 commits into
mainfrom
develop

Conversation

@slaveofcode

Copy link
Copy Markdown
Owner

Promotes native function-calling for cloud providers (#359) and the svg/canvas content-recovery fix (#358) to production.

…ction

Generative tools carry a big SVG/code arg that rarely survives JSON-escaping, so
models (e.g. GLM) emit the <svg> or js code block directly and parseAction fails
-> 'I didn't quite catch that'. Add recoverContentAction: when parseAction fails
and a scoped generative tool matches raw output (an <svg> or a js fence), run that
tool on the raw content (the executor already extracts/sanitizes it).
fix(agent): recover svg/canvas artifacts when the model skips the JSON action
…ol use)

Add provider.chatTools using the real OpenAI tools/tool_calls and Anthropic
tool_use APIs — so big/complex args (SVG, code, multi-step plans) are encoded by
the provider, not hand-formatted by the model as fragile JSON-in-prose. useAgentChat
now runs a NATIVE tool loop for cloud providers (proper assistant/tool messages),
falling back to the prompt-based JSON loop for on-device WebLLM. Executor running
(file/param collection, chaining, param prompting) extracted into a shared
runExecutor used by both loops.
feat(agent): native function-calling for cloud providers
@slaveofcode
slaveofcode merged commit 617861d into main Aug 29, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant