Skip to content

fix: remove $schema and additionalProperties recursively in to_google_format#460

Merged
mikehostetler merged 1 commit into
agentjido:mainfrom
jfpedroza:jp/google-format-remove-schema
Feb 27, 2026
Merged

fix: remove $schema and additionalProperties recursively in to_google_format#460
mikehostetler merged 1 commit into
agentjido:mainfrom
jfpedroza:jp/google-format-remove-schema

Conversation

@jfpedroza
Copy link
Copy Markdown
Contributor

Description

ReqLLM.to_google_format/1 was only removing additionalProperties at the top level, but Google doesn't accept it at any level. $schema is also not accepted. Both are generated by Zoi.

Example of the error:

Provider response error (400): Google API error:
Invalid JSON payload received. Unknown name \"$schema\" at 'tools[0].function_declarations[2].parameters': Cannot find field.
Invalid JSON payload received. Unknown name \"additionalProperties\" at 'tools[0].function_declarations[2].parameters.properties[1].value.items': Cannot find field.

Type of Change

  • Bug fix (non-breaking change fixing an issue)
  • New feature (non-breaking change adding functionality)
  • Breaking change (fix or feature causing existing functionality to change)
  • Documentation update

Breaking Changes

Testing

  • Tests pass (mix test)
  • Quality checks pass (mix quality)

Checklist

  • My code follows the project's style guidelines
  • I have updated the documentation accordingly
  • I have added tests that prove my fix/feature works
  • All new and existing tests pass
  • My commits follow conventional commit format
  • I have NOT edited CHANGELOG.md (it is auto-generated by git_ops)

Related Issues

…_format

ReqLLM.to_google_format/1 was only removing additionalProperties at the
top level but Google doesn't accept it at any level. $schema is also not
accepted. Both are generated by Zoi.
@mikehostetler mikehostetler merged commit 6f5decc into agentjido:main Feb 27, 2026
6 checks passed
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.

2 participants