Skip to content

Conversation

@shelpuk
Copy link

@shelpuk shelpuk commented Jan 3, 2026

Description

Enabling moonshotai/kimi-k2-thinking and z-ai/glm-4.7 (most capable open-source models as of today) for code review with PAL.

Added them to the OpenRouter configuration to allow proper context. Without this fix, PAL thinks their context window is 32k, rendering these most powerful open-source models virtually unusable for code review tasks.

Changes Made

  • Added moonshotai/kimi-k2-thinking with the proper context window configuration to conf/openrouter_models.json.
  • Added z-ai/glm-4.7 with the proper context window configuration to conf/openrouter_models.json.

Testing

Please review our Testing Guide before submitting.

Run all linting and tests (required):

  • All linting passes (ruff, black, isort)
  • All unit tests pass
  • For new features: Unit tests added in tests/
  • For tool changes: Simulator tests added in simulator_tests/
  • For bug fixes: Tests added to prevent regression
  • Simulator tests pass (if applicable)
  • Manual testing completed with realistic scenarios

Related Issues

Fixes #(issue number)

Checklist

  • PR title follows the format guidelines above
  • Activated venv and ran code quality checks: source venv/bin/activate && ./code_quality_checks.sh
  • Self-review completed
  • Tests added for ALL changes (see Testing section above)
  • Documentation updated as needed
  • All unit tests passing
  • Relevant simulator tests passing (if tool changes)
  • Ready for review

… to the OpenRouter configuration to allow proper context. Without this fix, PAL thinks their context window is 32k, rendering these most powerful open-source models virtually unusable for code review tasks.
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @shelpuk, 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 enhances the system's capabilities by integrating two highly capable open-source models, moonshotai/kimi-k2-thinking and z-ai/glm-4.7, into the OpenRouter configuration. The primary purpose is to ensure these models are properly configured with their accurate, significantly larger context window sizes, which was previously incorrect. This correction makes them fully functional and efficient for advanced code review tasks within PAL, leveraging their full potential.

Highlights

  • New Model Integration: Integrated moonshotai/kimi-k2-thinking and z-ai/glm-4.7 into the OpenRouter configuration, making these powerful open-source models available for code review with PAL.
  • Accurate Context Configuration: Correctly configured the context_window and max_output_tokens for the newly added models, resolving an issue where PAL previously assumed an incorrect 32k context window, thus enabling their effective use for large code review tasks.

🧠 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.

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.

Copy link
Contributor

@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 correctly adds configuration for two new models, moonshotai/kimi-k2-thinking and z-ai/glm-4.7, to openrouter_models.json. This will ensure they are used with their correct context windows. I've made a couple of minor suggestions to improve consistency and correctness of the configuration values. Additionally, please consider updating the documentation in docs/custom_models.md to include these new models in the table of available OpenRouter models, as this will be helpful for users.

shelpuk and others added 2 commits January 3, 2026 18:30
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
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.

1 participant