Skip to content

feat(agent): native function-calling for cloud providers - #359

Merged
slaveofcode merged 1 commit into
developfrom
feat/agent-native-fc
Aug 29, 2026
Merged

feat(agent): native function-calling for cloud providers#359
slaveofcode merged 1 commit into
developfrom
feat/agent-native-fc

Conversation

@slaveofcode

Copy link
Copy Markdown
Owner

The reliability fix from v2 testing. Cloud providers now use their real tools API (OpenAI tool_calls / Anthropic tool_use) via provider.chatTools, so big args (SVG/code) and multi-step plans are encoded by the provider — not the fragile JSON-in-prose protocol that failed on GLM. useAgentChat runs a native tool loop for cloud, prompt-based loop for on-device WebLLM; shared runExecutor for file/param/chaining. Provider parsing unit-tested (openai+anthropic, mocked fetch); live loop is build+smoke.

…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.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
⚠️ Deployment skipped
View logs
goodwebtools d2ca939 Aug 29 2026, 12:12 AM

@slaveofcode
slaveofcode merged commit d22ca06 into develop Aug 29, 2026
1 of 2 checks passed
@slaveofcode
slaveofcode deleted the feat/agent-native-fc branch August 29, 2026 00:16
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