Conversation
|
Automated review 🤖 Summary of Changes Key Changes & Positives
Potential Issues & Recommendations
Language/Framework Checks
Security & Privacy Build/CI & Ops Tests Approval Recommendation
|
There was a problem hiding this comment.
Pull request overview
This PR tightens Google tool/function parameter schema mapping by stripping schema keys that the Google GenAI FunctionDeclaration schema doesn’t support, preventing provider-side validation errors.
Changes:
- Add an allow-list based pruning step to
GoogleMapper.cleanSchemaForGoogle()so only supported schema keywords are sent to Google. - Add a unit test asserting that non-Google keys (e.g.,
optional,examples) are removed from tool parameter schemas. - Bump package version
1.11.3→1.11.4.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/core/mapping/google.mapper.ts |
Prunes cleaned JSON Schema objects down to Google-supported keys before building function declarations. |
tests/unit/core/mapping/google.mapper.spec.ts |
Adds coverage ensuring unsupported schema keys are stripped from tool parameter definitions. |
package.json |
Patch version bump for release. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| 'minLength', | ||
| 'minProperties', | ||
| 'minimum', | ||
| 'nullable', |
| const prunedSchema = Object.fromEntries( | ||
| Object.entries(cleanedSchema).filter(([key]) => GoogleMapper.ALLOWED_SCHEMA_KEYS.has(key)) | ||
| ) | ||
|
|
||
| visited.delete(schema); // Clean up visited set for this path | ||
|
|
||
| return cleanedSchema; | ||
| return prunedSchema; |
| { | ||
| "name": "@missionsquad/rosetta-ai", | ||
| "version": "1.11.3", | ||
| "version": "1.11.4", |
No description provided.