Skip to content

v6.8.53#444

Merged
luispater merged 13 commits intomainfrom
plus
Mar 14, 2026
Merged

v6.8.53#444
luispater merged 13 commits intomainfrom
plus

Conversation

@luispater
Copy link

No description provided.

sususu98 and others added 12 commits March 13, 2026 12:37
1. Claude translator: add CleanJSONSchemaForGemini() to sanitize tool
   input schemas (removes $schema, anyOf, const, format, etc.) and
   delete eager_input_streaming from tool declarations. Remove fragile
   bytes.Replace for format:"uri" now covered by schema cleaner.

2. Gemini native translator: filter out content entries with empty or
   missing parts arrays to prevent Gemini API 400 error "required
   oneof field 'data' must have one initialized field".

Both fixes align gemini-cli with protections already present in the
antigravity translator.
fix(config): allow vertex keys without base-url
…-empty-parts

fix(gemini-cli): sanitize tool schemas and filter empty parts
feat(service): extend model registration for team and business types
Fix missing streaming usage tracking for OpenAI-compatible providers
docs: Add Shadow AI to 'Who is with us?' section
@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request, labeled v6.8.53, focuses on refining API integrations and improving compatibility across various AI models. It introduces more flexible configuration options for Vertex API keys, ensures better capture of usage data during OpenAI-compatible streaming, and enhances the robustness of Gemini CLI request translations. Additionally, it updates project documentation and expands support for specific Codex model tiers.

Highlights

  • Vertex API Key Configuration: Enhanced Vertex API key configuration by making the base-url optional and adding validation to ensure the api-key is always provided.
  • OpenAI-Compatible Streaming: Improved OpenAI-compatible streaming by automatically requesting usage data in the final streaming chunk to ensure token statistics are captured.
  • Gemini CLI Request Translation: Refined Gemini CLI request translation for both Claude and Gemini models, including schema cleaning for tools and filtering out empty content parts to prevent API errors.
  • Documentation Update: Updated the README.md files to include the new 'Shadow AI' project in the list of related projects.
  • Codex Model Tiers: Expanded the registration of Codex team models to include 'business' and 'go' tiers.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • README.md
    • Added a new entry for the "Shadow AI" project.
  • README_CN.md
    • Added a new entry for the "Shadow AI" project in Chinese.
  • config.example.yaml
    • Updated comments to clarify that base-url is optional for Vertex API keys.
  • internal/api/handlers/management/config_lists.go
    • Added validation for required api-key in Vertex-compatible keys.
    • Adjusted array assignment for Vertex-compatible API keys.
  • internal/config/config.go
    • Updated a comment related to Vertex-compatible API key sanitization.
  • internal/config/vertex_compat.go
    • Modified comments to reflect BaseURL as optional.
    • Removed the BaseURL requirement from the sanitization logic.
  • internal/runtime/executor/openai_compat_executor.go
    • Included stream_options.include_usage in OpenAI-compatible streaming requests.
  • internal/translator/gemini-cli/claude/gemini-cli_claude_request.go
    • Removed an unused import.
    • Deleted a specific string replacement for URL format.
    • Added handling for eager_input_streaming in tool processing.
  • internal/translator/gemini-cli/gemini/gemini-cli_gemini_request.go
    • Implemented filtering for empty content parts in Gemini requests.
  • sdk/cliproxy/service.go
    • Expanded model registration for Codex team tiers to include "business" and "go".
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@luispater luispater merged commit b93cce5 into router-for-me:main Mar 14, 2026
1 of 2 checks passed
@luispater luispater deleted the plus branch March 14, 2026 17:51
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request appears to be a patch release, v6.8.53. The changes include making base-url optional for Vertex-compatible keys, adding validation for Vertex API keys, enabling usage statistics for OpenAI-compatible streaming responses, and fixing an issue with Gemini API requests by filtering out content with empty parts. There are also documentation updates and minor refactorings. The overall changes improve the robustness and functionality of the proxy. My review includes one suggestion for a more efficient implementation of content filtering.

Comment on lines +116 to +129
filteredContents := "[]"
hasFiltered := false
gjson.GetBytes(rawJSON, "request.contents").ForEach(func(_, content gjson.Result) bool {
parts := content.Get("parts")
if !parts.IsArray() || len(parts.Array()) == 0 {
hasFiltered = true
return true
}
filteredContents, _ = sjson.SetRaw(filteredContents, "-1", content.Raw)
return true
})
if hasFiltered {
rawJSON, _ = sjson.SetRawBytes(rawJSON, "request.contents", []byte(filteredContents))
}

Choose a reason for hiding this comment

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

medium

For filtering the contents array, instead of creating a new JSON array string and replacing the old one, you could consider an in-place removal approach. This can be more efficient, especially if only a few items need to be removed, as it avoids reconstructing the entire array.

You can collect the indices of items to be deleted and then remove them from the JSON using sjson.DeleteBytes, iterating backwards to avoid index shifting issues.

Suggested change
filteredContents := "[]"
hasFiltered := false
gjson.GetBytes(rawJSON, "request.contents").ForEach(func(_, content gjson.Result) bool {
parts := content.Get("parts")
if !parts.IsArray() || len(parts.Array()) == 0 {
hasFiltered = true
return true
}
filteredContents, _ = sjson.SetRaw(filteredContents, "-1", content.Raw)
return true
})
if hasFiltered {
rawJSON, _ = sjson.SetRawBytes(rawJSON, "request.contents", []byte(filteredContents))
}
indicesToDelete := []int{}
gjson.GetBytes(rawJSON, "request.contents").ForEach(func(key, content gjson.Result) bool {
parts := content.Get("parts")
if !parts.IsArray() || len(parts.Array()) == 0 {
indicesToDelete = append(indicesToDelete, int(key.Int()))
}
return true
})
if len(indicesToDelete) > 0 {
// Iterate backwards to avoid index shifting issues during deletion.
for i := len(indicesToDelete) - 1; i >= 0; i-- {
path := fmt.Sprintf("request.contents.%d", indicesToDelete[i])
rawJSON, _ = sjson.DeleteBytes(rawJSON, path)
}
}

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.

5 participants