Increase toolCallBudget of some hosted-copilot-sdk invocation tests - #1935
Conversation
There was a problem hiding this comment.
Pull request overview
This PR increases the allowed “early tool calls” window for the azure-hosted-copilot-sdk integration tests so the agent can scan the workspace (via tool calls) before being required to invoke the expected skill.
Changes:
- Extend
shouldEarlyTerminateForSkillInvocationto accept an optionaltoolCallBudgetoverride. - Update the
azure-hosted-copilot-sdkintegration tests to use a higher budget (10) for scenarios that rely on codebase scanning.
Show a summary per file
| File | Description |
|---|---|
tests/utils/evaluate.ts |
Adds an optional toolCallBudget parameter to control the early-termination threshold per test. |
tests/azure-hosted-copilot-sdk/integration.test.ts |
Increases the early-termination tool call threshold to 10 for the “existing SDK app” scenarios. |
Copilot's findings
Comments suppressed due to low confidence (1)
tests/azure-hosted-copilot-sdk/integration.test.ts:116
- Same as above: consider using a named constant instead of repeating the
10tool-call budget literal, so the value can be tuned in one place.
const rate = await measureInvocationRate(agent, SKILL_NAME, {
setup: setupCopilotSdkApp,
prompt: "Add a new feature to this app that summarizes pull requests",
shouldEarlyTerminate: (agentMetadata) => shouldEarlyTerminateForSkillInvocation(agentMetadata, SKILL_NAME, 10),
}, "existing-sdk-modify", RUNS_PER_PROMPT);
- Files reviewed: 2/2 changed files
- Comments generated: 2
Jon Gallant (jongio)
left a comment
There was a problem hiding this comment.
Clean test tuning. The optional toolCallBudget keeps the default behavior for every other callsite, and raising to 10 matches the two setupCopilotSdkApp scenarios where the agent has to scan the workspace before it can reasonably invoke the skill. The other three tests in the same file don't need the bump, so the targeted split is right.
Agree with your call on keeping 10 inline until there's a third usage, and on skipping input validation for a 2-callsite internal helper.
Description
The modified tests expect the agent to view the codebase to find out it needs to invoke the azure-hosted-copilot-sdk skill. Reading files in the workspace uses tool calls. The default 3 tool call budget is not enough for the agent to read the files and invoke the skill. Extending it to 10.
Checklist
cd tests && npm test)npm run test:skills:integration -- <skill>)USE FOR/DO NOT USE FOR/PREFER OVERclauses: confirmed no routing regressions for competing skillsRelated Issues