Skip to content

Conversation

@kiloconnect
Copy link
Contributor

@kiloconnect kiloconnect bot commented Dec 19, 2025

Changes

This PR updates the model settings schema to use z.string() instead of z.enum(toolNames) for tool name validation.

What changed:

  • Replaced z.enum(toolNames) with z.string() for included_tools and excluded_tools fields
  • Removed unused toolNames import from @roo-code/types

Why:

This change allows for more flexible tool name validation, removing the strict enum constraint and allowing any string value for tool names.

Files modified:

  • src/api/providers/kilocode/model-settings.ts

- Replace z.enum(toolNames) with z.string() for included_tools and excluded_tools
- Remove unused toolNames import from @roo-code/types
- Allows more flexible tool name validation
@changeset-bot
Copy link

changeset-bot bot commented Dec 19, 2025

⚠️ No Changeset found

Latest commit: 46359f4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor Author

@kiloconnect kiloconnect bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No Issues Found

1 file reviewed | Confidence: 95% | Recommendation: Merge

Review Details

Files: src/api/providers/kilocode/model-settings.ts

Checked: Security, bugs, type compatibility, schema consistency

Analysis:

  • The change from z.enum(toolNames) to z.string() aligns ModelSettingsSchema with the existing ModelInfo type in packages/types/src/model.ts, which already defines includedTools and excludedTools as z.array(z.string())
  • The parseModelSettings function correctly maps these fields to Partial<ModelInfo>, so type compatibility is maintained
  • Removing the unused toolNames import is appropriate cleanup
  • This is a valid relaxation of validation that provides more flexibility for tool name configuration

@chrarnoldus
Copy link
Collaborator

chrarnoldus commented Dec 19, 2025

This is necessary for tool aliases to be accepted.

@chrarnoldus chrarnoldus merged commit 7b842ad into main Dec 22, 2025
12 checks passed
@chrarnoldus chrarnoldus deleted the fix/model-settings-tool-names-to-string branch December 22, 2025 12:20
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.

3 participants