fix(evals): remove tool restrictions and add compile-time guards#23312
fix(evals): remove tool restrictions and add compile-time guards#23312SandyTao520 merged 3 commits intomainfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly improves the realism and consistency of evaluation tests by eliminating artificial constraints on tool availability. By removing explicit tool whitelists and blacklists from various evaluation files, agents are now tested in an environment that mirrors production, where all tools are accessible. Furthermore, compile-time type guards have been implemented to prevent these restrictions from being accidentally or intentionally reintroduced, ensuring that future evaluations maintain this realistic testing standard. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
| * tools are available — they must test against the full, default tool set | ||
| * to ensure realistic behavior. | ||
| */ | ||
| interface ForbiddenToolSettings { |
There was a problem hiding this comment.
If you haven't yet, can you try running it in GitHub actions to make sure the ones that previously passed still pass?
There was a problem hiding this comment.
There was a problem hiding this comment.
Code Review
This pull request effectively removes tool restrictions from evaluation tests to make them more realistic, and cleverly introduces compile-time guards using TypeScript's never type to prevent these restrictions from being reintroduced. The changes are well-targeted and align with the goal of improving eval quality. I have one suggestion to make the type guard for settings-based tool restrictions even more robust, aligning it with our established policies on tool availability.
|
Size Change: -4 B (0%) Total Size: 26.1 MB
ℹ️ View Unchanged
|
Summary
Remove tool restrictions (
tools.corewhitelists andexcludeToolsblacklists) from evals, and add compile-time type guards to prevent future evals from reintroducing them.Details
Evals were artificially constraining available tools via
settings.tools.core(whitelist) andconfigOverrides.excludeTools(blacklist). This makes evals less realistic — in production, the agent has access to all tools and must decide which to use. Removing these restrictions tests the agent's actual behavior.What changed:
save_memory.eval.ts: Removedtools: { core: ['save_memory'] }andtools: { core: ['save_memory', 'list_directory', 'read_file', 'run_shell_command'] }from all 11 test cases.model_steering.eval.ts: RemovedexcludeTools: ['run_shell_command', 'ls', 'google_web_search']from both test cases.generalist_delegation.eval.ts: RemovedexcludeTools: ['run_shell_command']from all 4 test cases.test-helper.ts: AddedForbiddenToolSettingstype that markstools.coreasneverinEvalCase.params.settings.app-test-helper.ts: AddedEvalConfigOverridestype that marksexcludeTools,coreTools,allowedTools, andmainAgentToolsasneverinAppEvalCase.configOverrides.Tool behavioral settings (e.g.,
tools.shell.enableShellOutputEfficiency) remain allowed — only tool availability restrictions are blocked.Related Issues
Closes #18007
How to Validate
Type guard verification
Any eval attempting to restrict tools will now fail at compile time:
Verify with
npx tsc --noEmit --project tsconfig.json.Eval pass rates
All 3 affected eval files were run on CI via
evals-nightly.ymlworkflow on branchsandytao/eval-remove-tool-restrictionsacross 6 models × 3 attempts = 54 total jobs:save_memory.eval.tsmodel_steering.eval.tsgeneralist_delegation.eval.tsAdditionally,
save_memory.eval.tswas run 3× locally with all 11 tests passing each time (33/33).Pre-Merge Checklist