Skip to content

chore(ai): formally include already supported onLanguageModelCallStart and onLanguageModelCallEnd in ToolLoopAgentSettings type - #20286

Merged
felixarntz merged 2 commits into
mainfrom
fa/chore-tool-loop-agent-language-model-lifecycle-callbacks
Sep 3, 2026
Merged

chore(ai): formally include already supported onLanguageModelCallStart and onLanguageModelCallEnd in ToolLoopAgentSettings type#20286
felixarntz merged 2 commits into
mainfrom
fa/chore-tool-loop-agent-language-model-lifecycle-callbacks

Conversation

@felixarntz

Copy link
Copy Markdown
Collaborator

Background

ToolLoopAgent already forwards onLanguageModelCallStart and onLanguageModelCallEnd to generateText and streamText, but ToolLoopAgentSettings did not declare them. This appears to be an oversight, given the other lifecycle callbacks were already explicitly included in the ToolLoopAgentSettings type.

Summary

  • Add both language model lifecycle callbacks to ToolLoopAgentSettings.
  • Add type regression coverage for both callbacks.

End-to-End Verification

N/A. This change formalizes existing runtime behavior.

Checklist

  • All commits are signed (PRs with unsigned commits cannot be merged)
  • Tests have been added / updated (for bug fixes / features)
  • Documentation has been added / updated (for bug fixes / features)
  • A patch changeset for relevant packages has been added (for bug fixes / features - run pnpm changeset in the project root)
  • I have reviewed this pull request (self-review)

@felixarntz
felixarntz enabled auto-merge (squash) September 3, 2026 17:39
@felixarntz
felixarntz merged commit 4f201cc into main Sep 3, 2026
58 checks passed
@felixarntz
felixarntz deleted the fa/chore-tool-loop-agent-language-model-lifecycle-callbacks branch September 3, 2026 17:48
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🚀 Published in:

Package Version
ai 7.0.93 github npm
@ai-sdk/amazon-bedrock 5.0.75 github npm
@ai-sdk/angular 3.0.93 github npm
@ai-sdk/azure 4.0.62 github npm
@ai-sdk/baseten 2.1.22 github npm
@ai-sdk/cerebras 3.0.44 github npm
@ai-sdk/code-mode 1.0.50 github npm
@ai-sdk/deepinfra 3.0.44 github npm
@ai-sdk/fireworks 3.0.47 github npm
@ai-sdk/gateway 4.0.75 github npm
@ai-sdk/gmicloud 3.0.15 github npm
@ai-sdk/google 4.0.64 github npm
@ai-sdk/google-vertex 5.0.76 github npm
@ai-sdk/harness 1.0.102 github npm
@ai-sdk/harness-acp 1.0.40 github npm
@ai-sdk/harness-claude-code 1.0.106 github npm
@ai-sdk/harness-cline 1.0.29 github npm
@ai-sdk/harness-codex 1.0.104 github npm
@ai-sdk/harness-cursor 1.0.15 github npm
@ai-sdk/harness-deepagents 1.0.102 github npm
@ai-sdk/harness-fx 1.0.15 github npm
@ai-sdk/harness-grok-build 1.0.39 github npm
@ai-sdk/harness-opencode 1.0.104 github npm
@ai-sdk/harness-pi 1.0.104 github npm
@ai-sdk/huggingface 2.0.44 github npm
@ai-sdk/langchain 3.0.93 github npm
@ai-sdk/llamaindex 3.0.93 github npm
@ai-sdk/mcp 2.0.45 github npm
@ai-sdk/open-responses 2.0.39 github npm
@ai-sdk/openai 4.0.59 github npm
@ai-sdk/openai-compatible 3.0.44 github npm
@ai-sdk/otel 1.0.93 github npm
@ai-sdk/policy-opa 1.0.93 github npm
@ai-sdk/react 4.0.96 github npm
@ai-sdk/rsc 3.0.93 github npm
@ai-sdk/sandbox-just-bash 1.0.102 github npm
@ai-sdk/sandbox-vercel 1.0.102 github npm
@ai-sdk/svelte 5.0.93 github npm
@ai-sdk/togetherai 3.0.45 github npm
@ai-sdk/tui 1.0.94 github npm
@ai-sdk/vue 4.0.93 github npm
@ai-sdk/workflow 2.0.24 github npm
@ai-sdk/workflow-harness 1.0.102 github npm
@ai-sdk/zai 3.0.6 github npm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants