Skip to content

feat: add moonshotai as a supported provider - #4

Merged
dittops merged 2 commits into
mainfrom
feat/add-moonshotai-provider
Mar 20, 2026
Merged

dittops merged 2 commits into
mainfrom
feat/add-moonshotai-provider

Conversation

@dittops

@dittops dittops commented Mar 20, 2026

Copy link
Copy Markdown
Member

Summary

  • Add Moonshot AI (moonshot in LiteLLM) as a supported provider mapped to moonshotai in the catalog
  • Configure license mapping, research cost matching (moonshot-ai), and prefix stripping (moonshot/)

Test plan

  • All 65 existing tests pass with no regressions

🤖 Generated with Claude Code

Map LiteLLM's "moonshot" provider to "moonshotai" in the catalog,
including license, research cost matching, and prefix stripping.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@gemini-code-assist

Copy link
Copy Markdown

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 extends the model catalog's capabilities by adding comprehensive support for Moonshot AI. The changes ensure that Moonshot AI models are correctly recognized, cost-matched, and integrated across various internal systems, enhancing the catalog's coverage of available language models.

Highlights

  • New Provider Support: Integrated Moonshot AI as a new supported provider within the model catalog, mapping it to moonshotai.
  • Mapping Configuration: Configured the necessary mappings for Moonshot AI, including research cost matching (moonshot-ai) and prefix stripping (moonshot/).
  • LiteLLM Integration: Updated LiteLLM source mappings to correctly identify moonshot as moonshotai and included it in license and embedding provider lists.

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

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

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

Copy link
Copy Markdown

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 adds support for Moonshot AI as a provider. The changes correctly add the necessary mappings in mappings.py and litellm.py. My review includes a few suggestions to improve maintainability by keeping dictionary keys and set items sorted alphabetically. This will make it easier to manage these lists as more providers are added in the future.

"gemini": "google-gemini",
"vertex_ai-gemini-models": "google-vertex",
"vertex_ai-anthropic_models": "google-vertex",
"moonshotai": "moonshot-ai",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

To improve readability and maintainability, it's a good practice to keep dictionary keys sorted alphabetically. The new moonshotai entry is not in alphabetical order relative to other keys. Consider sorting all entries in the LITELLM_TO_RESEARCH dictionary.

"xai": "xai/",
"mistral": "mistral/",
"together_ai": "together_ai/",
"moonshotai": "moonshot/",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Similar to the previous comment, please keep dictionary entries sorted alphabetically by key for better readability and maintainability. The new moonshotai entry is not in alphabetical order. Consider sorting all entries in the STRIP_PREFIXES dictionary.

"gemini",
"deepseek",
"mistral",
"moonshotai",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

To improve readability and make it easier to find providers, it's good practice to keep the items in this set sorted alphabetically. Consider sorting all provider names in TENSORZERO_PROVIDERS.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dittops
dittops merged commit f86b910 into main Mar 20, 2026
5 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.

1 participant