Skip to content

Fix tool invocation, add NUnit constraints, wire attributes#1

Merged
clicky merged 3 commits into
mainfrom
callum/runner-and-constraint-fixes
May 18, 2026
Merged

Fix tool invocation, add NUnit constraints, wire attributes#1
clicky merged 3 commits into
mainfrom
callum/runner-and-constraint-fixes

Conversation

@clicky

@clicky clicky commented May 17, 2026

Copy link
Copy Markdown
Owner

Lots of stuff

clicky added 3 commits May 17, 2026 16:19
- AgentRunner now wraps the IChatClient in FunctionInvokingChatClient so
  the tools the model calls are actually executed. Previously the runner
  recorded FunctionCallContent but nothing fed results back, so against a
  real LLM the loop would spin until max turns with no progress.
- Add Ngentic.NUnit Constraint-based API: Did.CallTool, Did.NotCallTool,
  Did.CallToolsInOrder, Did.MakeToolCalls. Plays with NUnit's Assert.That,
  Assert.Multiple, and the rich failure formatter. WithArg/WithArgs lets
  tests assert on tool arguments, not just the name.
- AgenticTestBase now reads [MaxTurns] and [Model] from the current test
  method in [SetUp] and threads them into AgentBuilder so the attributes
  do something instead of being silent.
- Thread modelId through AgentRunner into ChatOptions.ModelId.
- Add ToolCall.CallId so calls and results are paired by id, not by
  index/best-effort.
- New Ngentic.Tests project covering constraints, the legacy Expect DSL,
  and the runner's tool-invocation + model-id + system-prompt plumbing.
@clicky clicky merged commit 9642ea5 into main May 18, 2026
3 checks passed
@clicky clicky deleted the callum/runner-and-constraint-fixes branch May 18, 2026 20:58
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