Skip to content

Fix Google integer tool schema#261

Merged
Ken Jiang (knjiang) merged 1 commit into
mainfrom
05-29-fix_google_integer_tool_calls
May 29, 2026
Merged

Fix Google integer tool schema#261
Ken Jiang (knjiang) merged 1 commit into
mainfrom
05-29-fix_google_integer_tool_calls

Conversation

@knjiang
Copy link
Copy Markdown
Contributor

@knjiang Ken Jiang (knjiang) commented May 29, 2026

Fix Google-native request detection for tool schemas whose typed parameters include numeric JSON-Schema bounds such as minLength: 1. Google’s typed Schema documents int64 validation fields as protobuf-JSON strings, but JSON Schema emitters and tool generators commonly produce numeric values.

without change:
image

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@knjiang Ken Jiang (knjiang) changed the title fix google integer tool calls Fix Google integer tool schema May 29, 2026
@knjiang Ken Jiang (knjiang) marked this pull request as ready for review May 29, 2026 15:32
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ae83909aad

ℹ️ 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 (@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 (@codex) address that feedback".

Comment on lines +24 to +27
fn deserialize_optional_i64_string<'de, D>(deserializer: D) -> Result<Option<String>, D::Error>
where
D: serde::Deserializer<'de>,
{
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Regenerate Google types from the generator

This generated helper does not match the helper added to crates/generate-types/src/main.rs (the generator emits an untagged enum implementation, while this file contains a hand-written visitor with extra behavior such as visit_f64). Because generated.rs is regenerated from the generator, the next Google type regeneration will overwrite this implementation and make the committed output non-reproducible; please regenerate the file from the updated generator so the checked-in generated code exactly reflects the source-of-truth pipeline.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

let me regenrate before merging

Copy link
Copy Markdown
Contributor

@erin2722 Erin McNulty (erin2722) left a comment

Choose a reason for hiding this comment

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

nice! 🚀

@knjiang Ken Jiang (knjiang) force-pushed the 05-29-fix_google_integer_tool_calls branch from ae83909 to c4d90a2 Compare May 29, 2026 17:33
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c4d90a29b6

ℹ️ 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 (@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 (@codex) address that feedback".

Comment thread crates/lingua/src/providers/google/convert.rs
@knjiang Ken Jiang (knjiang) merged commit 6186d35 into main May 29, 2026
8 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.

3 participants