Conversation
β¦fig incompatibility 1. Dereference $ref in JSON Schema before sending to Google/Vertex AI β the memory tool manifest (from neko's recent refactor) uses $ref which Vertex AI rejects. 2. Skip includeServerSideToolInvocations for Vertex AI β only Google AI supports it. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@sxjeru @nekomeowww - This fixes Vertex AI $ref schema errors and toolConfig incompatibility in the Google provider. Please take a look. |
There was a problem hiding this comment.
π‘ Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c04a5f786c
βΉοΈ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with π.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codecov Reportβ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## canary #13524 +/- ##
=========================================
Coverage 66.43% 66.44%
=========================================
Files 1977 1977
Lines 163655 163695 +40
Branches 18716 15769 -2947
=========================================
+ Hits 108724 108766 +42
+ Misses 54809 54807 -2
Partials 122 122
Flags with carried forward coverage won't be shown. Click here to find out more.
π New features to boost your workflow:
|
When a schema node has $ref plus sibling keys (e.g. description from allOf unwrapping), the resolved definition now merges with those siblings instead of dropping them. This preserves argument-level descriptions for fields like timeIntent, improving tool-call quality. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
β¦ Google tool schemas Google Gemini / Vertex AI rejects `additionalProperties` and `$ref` in function declaration schemas. The previous fix (PR #13524) resolved most `$ref` via `resolveRefs()` but missed two cases: 1. `additionalProperties` was never stripped 2. `$ref` survived when `resolveRefs` hit its depth limit (>10) on recursive schemas Add both keys to UNSUPPORTED_SCHEMA_KEYS so `sanitizeSchemaForGoogle()` strips them after ref resolution. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
β¦ Google tool schemas (#13613) Google Gemini / Vertex AI rejects `additionalProperties` and `$ref` in function declaration schemas. The previous fix (PR #13524) resolved most `$ref` via `resolveRefs()` but missed two cases: 1. `additionalProperties` was never stripped 2. `$ref` survived when `resolveRefs` hit its depth limit (>10) on recursive schemas Add both keys to UNSUPPORTED_SCHEMA_KEYS so `sanitizeSchemaForGoogle()` strips them after ref resolution. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
π» Change Type
π Related Issue
π Description of Change
Problem 1 β $ref schema error (160+ errors):
User tool schemas (specifically the memory tool manifest from recent refactor by neko in
6a2ca59592) contain$refreferences (#/definitions/...). Vertex AI does not support$refin function declaration schemas, causing requests to fail with:Unknown name "$ref" at tools[0].function_declarations[X].parameters.properties[Y].value.all_of[0].Fix: Added
resolveRefs()ingoogle.tscontext builder that inlines$refdefinitions before sending to Google/Vertex AI. Also unwraps single-elementallOfwrappers (common pattern:allOf: [{ $ref: '...' }]) and strips thedefinitionskey from output.Problem 2 β
includeServerSideToolInvocationsincompatibility (292 failures/24h):Google AI supports
toolConfig.includeServerSideToolInvocationsfor Gemini 3+ combined tools, but Vertex AI does not.Fix: Added
!this.isVertexAiguard before settingtoolConfig, so only Google AI instances send this parameter.π§ͺ How to Test
5 new unit tests added:
$refresolution from definitions$refinoneOfdefinitionsstripped from output$refhandled gracefullyincludeServerSideToolInvocationsπ Additional Information
Both issues stem from recent changes:
6a2ca59592(neko's memory search refactor) introduced$refin tool schemas7fd6d67fe3addedneedsServerSideToolInvocations()without Vertex AI exclusion