fix(python): dereference $ref/$defs in Google provider - #4297
Merged
Alberto Schiabel (jkomyno) merged 3 commits intoSep 7, 2026
Merged
Conversation
CoralGarden52
requested a review
from Alberto Schiabel (jkomyno)
as a code owner
August 30, 2026 06:50
|
CoralGarden52 is attempting to deploy a commit to the Composio Team on Vercel. A member of the Team first needs to authorize it. |
Enumerate every Python provider package and require each one to be classified as either resolving internal $ref/$defs before schema translation or forwarding the schema whole to a vendor that resolves references natively. Mirrors the TypeScript contract test. Claude-Session: https://claude.ai/code/session_01Nk6kGs5SCq8T3eAxcwsyMk
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f07a288. Configure here.
json_schema_to_model types a referenced property as Any, so CrewAI exposed an untyped argument to the model. Inline internal $ref/$defs before building the args schema, add a regression test, and correct the cross-provider contract so json_schema_to_model no longer counts as a reference resolver. Claude-Session: https://claude.ai/code/session_01Nk6kGs5SCq8T3eAxcwsyMk
Alberto Schiabel (jkomyno)
approved these changes
Sep 7, 2026
Collaborator
|
Thanks! |
Alberto Schiabel (jkomyno)
merged commit Sep 7, 2026
85d4923
into
ComposioHQ:next
3 of 4 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
The Python Vertex AI Google provider rebuilt tool parameter schemas from
propertiesandrequiredwithout resolving internal$ref/$defsreferences first. As a result, referenced properties were sent as dangling references and could not be interpreted by Vertex AI.This change dereferences internal schema references before the existing Google-specific translation. It follows the provider behavior fixed in TypeScript PR #4288.
Changes
dereference_json_schemahelper.$ref/$defs.Type of change
How Has This Been Tested?
pytest tests/test_google_provider.py tests/test_json_schema.py tests/test_provider.py -q -k 'not TestLangchainReservedKeywords and not TestLangchainFreeFormObjectArguments'— 59 passed, 4 skipped, 5 deselected.ruff check --config config/ruff.toml providers/google/composio_google/provider.py tests/test_google_provider.py— passed.ruff format --check providers/google/composio_google/provider.py tests/test_google_provider.py— passed.mypy --config-file config/mypy.ini providers/google/composio_google/provider.py tests/test_google_provider.py— passed.Screenshots (if applicable)
Not applicable.
Checklist
Additional context
This is a Python-only provider fix; no TypeScript changeset is required. No existing issue was found for the Python provider, so this PR includes the minimal reproduction and regression test directly.